2015-02-23

Get helper from template (.phtml) in magento 2.0

Let's imagine that you have a helper app/code/SliRx/News/Helper/Date.php.
You can get the helper from template (.phtml file) like this:
$helper = $this->helper('SliRx\News\Helper\Date');

2015-02-22

Changing page layout in magento 2.0

You can change page layout by adding:
$layout = '2columns-left';
$this->pageConfig->setPageLayout($layout);
to your block's constructor.

2015-02-13

Magento google tag manager gtm

Google Tag Manager integration

With Google Tag Manager you can manage your Analytics events, Adwords conversion tracking, remarketing, etc. in one place. This module allows you to integrate Google Tag Manager to your site.
All you need is insert your container id to configuration of this extension.

 

You can get Google Tag Manager Integration GTM for magento here

 

Where to configure the extension?

System > Configuration > Google Tag Manager > Configuration.

Extension features:

  • Support multi-store
  • Support transactions (ecommerce tracking)
  • Support remarketing

Transaction features:

  • Support all product types
  • You can specify a name of your shop for each store
Remarketing allows you to show ads to your past site visitors and customize those ads based on the section of your site people visited. With dynamic remarketing, you can take this a step further, and show your site visitors an ad with the specific product they viewed on your site.