yireo_googletagmanager - Version 1.3.9

Version Notes

No notes

Download this release

Release Info

Developer Yireo
Extension yireo_googletagmanager
Version 1.3.9
Comparing to
See all releases


Code changes from version 1.3.8 to 1.3.9

app/code/community/Yireo/GoogleTagManager/Block/Default.php CHANGED
@@ -20,7 +20,7 @@ class Yireo_GoogleTagManager_Block_Default extends Mage_Core_Block_Template
20
  */
21
  public function isEnabled()
22
  {
23
- return $this->getHelper()->isEnabled();
24
  }
25
 
26
  /**
@@ -30,7 +30,7 @@ class Yireo_GoogleTagManager_Block_Default extends Mage_Core_Block_Template
30
  */
31
  public function isDebug()
32
  {
33
- return $this->getHelper()->isDebug();
34
  }
35
 
36
  /**
@@ -40,7 +40,7 @@ class Yireo_GoogleTagManager_Block_Default extends Mage_Core_Block_Template
40
  */
41
  public function getId()
42
  {
43
- return $this->getHelper()->getId();
44
  }
45
 
46
  /**
@@ -53,7 +53,7 @@ class Yireo_GoogleTagManager_Block_Default extends Mage_Core_Block_Template
53
  */
54
  public function getConfig($key = null, $default_value = null)
55
  {
56
- return $this->getHelper()->getConfigValue($key, $default_value);
57
  }
58
 
59
  /**
@@ -61,7 +61,7 @@ class Yireo_GoogleTagManager_Block_Default extends Mage_Core_Block_Template
61
  *
62
  * @return Yireo_GoogleTagManager_Helper_Data
63
  */
64
- public function getHelper()
65
  {
66
  return Mage::helper('googletagmanager');
67
  }
20
  */
21
  public function isEnabled()
22
  {
23
+ return $this->getModuleHelper()->isEnabled();
24
  }
25
 
26
  /**
30
  */
31
  public function isDebug()
32
  {
33
+ return $this->getModuleHelper()->isDebug();
34
  }
35
 
36
  /**
40
  */
41
  public function getId()
42
  {
43
+ return $this->getModuleHelper()->getId();
44
  }
45
 
46
  /**
53
  */
54
  public function getConfig($key = null, $default_value = null)
55
  {
56
+ return $this->getModuleHelper()->getConfigValue($key, $default_value);
57
  }
58
 
59
  /**
61
  *
62
  * @return Yireo_GoogleTagManager_Helper_Data
63
  */
64
+ public function getModuleHelper()
65
  {
66
  return Mage::helper('googletagmanager');
67
  }
app/code/community/Yireo/GoogleTagManager/Model/Observer.php CHANGED
@@ -18,11 +18,11 @@ class Yireo_GoogleTagManager_Model_Observer
18
  */
19
  public function coreBlockAbstractToHtmlAfter($observer)
20
  {
21
- if ($this->getHelper()->isEnabled() == false) {
22
  return $this;
23
  }
24
 
25
- if ($this->getHelper()->isMethodObserver() == false) {
26
  return $this;
27
  }
28
 
@@ -35,12 +35,12 @@ class Yireo_GoogleTagManager_Model_Observer
35
  $script = Mage::helper('googletagmanager')->getHeaderScript();
36
 
37
  if (empty($script)) {
38
- $this->getHelper()->debug('Observer: Empty script');
39
  return $this;
40
  }
41
 
42
  $html = preg_replace('/\<body([^\>]+)\>/', '\0'.$script, $html);
43
- $this->getHelper()->debug('Observer: Replacing header');
44
 
45
  $transport->setHtml($html);
46
  }
@@ -53,7 +53,7 @@ class Yireo_GoogleTagManager_Model_Observer
53
  *
54
  * @return Yireo_GoogleTagManager_Helper_Data
55
  */
56
- protected function getHelper()
57
  {
58
  return Mage::helper('googletagmanager');
59
  }
18
  */
19
  public function coreBlockAbstractToHtmlAfter($observer)
20
  {
21
+ if ($this->getModuleHelper()->isEnabled() == false) {
22
  return $this;
23
  }
24
 
25
+ if ($this->getModuleHelper()->isMethodObserver() == false) {
26
  return $this;
27
  }
28
 
35
  $script = Mage::helper('googletagmanager')->getHeaderScript();
36
 
37
  if (empty($script)) {
38
+ $this->getModuleHelper()->debug('Observer: Empty script');
39
  return $this;
40
  }
41
 
42
  $html = preg_replace('/\<body([^\>]+)\>/', '\0'.$script, $html);
43
+ $this->getModuleHelper()->debug('Observer: Replacing header');
44
 
45
  $transport->setHtml($html);
46
  }
53
  *
54
  * @return Yireo_GoogleTagManager_Helper_Data
55
  */
56
+ protected function getModuleHelper()
57
  {
58
  return Mage::helper('googletagmanager');
59
  }
app/code/community/Yireo/GoogleTagManager/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <Yireo_GoogleTagManager>
15
- <version>1.3.8</version>
16
  </Yireo_GoogleTagManager>
17
  </modules>
18
 
12
  <config>
13
  <modules>
14
  <Yireo_GoogleTagManager>
15
+ <version>1.3.9</version>
16
  </Yireo_GoogleTagManager>
17
  </modules>
18
 
package.xml CHANGED
@@ -1,2 +1,2 @@
1
  <?xml version="1.0"?>
2
- <package><name>yireo_googletagmanager</name><version>1.3.8</version><stability>stable</stability><license>Open Source License</license><channel>community</channel><extends></extends><summary>No summary</summary><description>No description</description><notes>No notes</notes><authors><author><name>Yireo</name><user>yireo</user><email>info@yireo.com</email></author></authors><date>2016-01-28</date><time>2:14:36</time><compatible></compatible><dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Yireo_GoogleTagManager.xml" hash="420bde8207c2ed151e50ef4b7df1c28f"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="googletagmanager"><file name="category.phtml" hash="ac826696d14d1985864563900264537b"/><file name="custom.phtml" hash="b888cea900aba4a488968ca88a42813d"/><file name="customer.phtml" hash="3db76ba18473a1c7f664c1b50db622a4"/><file name="default.phtml" hash="b2247df055e48fc6ae8cb535e8ec9f52"/><file name="ecommerce.phtml" hash="da3bbe9f182ff24a62ad84d7d8c8b7bc"/><file name="order.phtml" hash="5dadb37be8798f76651e9bbb55a9bf4a"/><file name="product.phtml" hash="c9c3856a68f686dd225738d7c3947d29"/><file name="product_addtocart.phtml" hash="61928e816993230f6de9925d83fe6219"/><file name="product_click.phtml" hash="1946b2edbcd2295cc21031e72293f268"/><file name="product_removefromcart.phtml" hash="694db96f70ab2fddc2d1e116582567e7"/><file name="quote.phtml" hash="18c5352672c1b6ef704e60f8c3f035f2"/><file name="script.phtml" hash="9fc6143f2237988f1ff4325d5cfc0969"/></dir></dir><dir name="layout"><file name="googletagmanager.xml" hash="4b2e83f2e964891da358c9a64647a043"/></dir></dir></dir></dir></dir><dir name="code"><dir name="community"><dir name="Yireo"><dir name="GoogleTagManager"><dir name="etc"><file name="config.xml" hash="f2d35d9183ada60f72a1719d4e5064c4"/><file name="system.xml" hash="1a0483ed2cd30bd1ec806797a8624225"/></dir><dir name="Model"><file name="Container.php" hash="70873159e8eb2254b8f701bc7ccf313e"/><file name="Observer.php" hash="e9055a00cd61dfaea748e42d0ed7457f"/><dir name="Backend"><dir name="Source"><file name="Method.php" hash="8af7a0459aaa78c93bf8c2d11a1bd46c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="bfaf7740830c6f557fae81e108bd70f4"/></dir><dir name="Block"><file name="Category.php" hash="63aac465df78b4f57b93831ff02c6d55"/><file name="Custom.php" hash="e208f2669b99b54001d90730b1fa5e2f"/><file name="Customer.php" hash="b8c90683ce9860d530c1dfb16e15ecda"/><file name="Default.php" hash="0e169aa24248e08f4a6ffbb3d286df41"/><file name="Ecommerce.php" hash="13bb03fab65e9afe756bc087ba328302"/><file name="Order.php" hash="eaaa92e54a6f98c8c39ee484dff1a7bb"/><file name="Product.php" hash="7427e6ff8ef6efa9acaac933a3e76b4a"/><file name="Quote.php" hash="d4ada2d05f420e396849780ad547c1dd"/><file name="Script.php" hash="efe492a317563bfe87772f678a338088"/></dir></dir></dir></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>yireo_googletagmanager</name><version>1.3.9</version><stability>stable</stability><license>Open Source License</license><channel>community</channel><extends></extends><summary>No summary</summary><description>No description</description><notes>No notes</notes><authors><author><name>Yireo</name><user>yireo</user><email>info@yireo.com</email></author></authors><date>2016-02-03</date><time>0:32:33</time><compatible></compatible><dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Yireo_GoogleTagManager.xml" hash="420bde8207c2ed151e50ef4b7df1c28f"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="googletagmanager"><file name="category.phtml" hash="ac826696d14d1985864563900264537b"/><file name="custom.phtml" hash="b888cea900aba4a488968ca88a42813d"/><file name="customer.phtml" hash="3db76ba18473a1c7f664c1b50db622a4"/><file name="default.phtml" hash="b2247df055e48fc6ae8cb535e8ec9f52"/><file name="ecommerce.phtml" hash="da3bbe9f182ff24a62ad84d7d8c8b7bc"/><file name="order.phtml" hash="5dadb37be8798f76651e9bbb55a9bf4a"/><file name="product.phtml" hash="c9c3856a68f686dd225738d7c3947d29"/><file name="product_addtocart.phtml" hash="61928e816993230f6de9925d83fe6219"/><file name="product_click.phtml" hash="1946b2edbcd2295cc21031e72293f268"/><file name="product_removefromcart.phtml" hash="694db96f70ab2fddc2d1e116582567e7"/><file name="quote.phtml" hash="18c5352672c1b6ef704e60f8c3f035f2"/><file name="script.phtml" hash="9fc6143f2237988f1ff4325d5cfc0969"/></dir></dir><dir name="layout"><file name="googletagmanager.xml" hash="4b2e83f2e964891da358c9a64647a043"/></dir></dir></dir></dir></dir><dir name="code"><dir name="community"><dir name="Yireo"><dir name="GoogleTagManager"><dir name="etc"><file name="config.xml" hash="fe3355ba2d164effd21306577dcec2ef"/><file name="system.xml" hash="1a0483ed2cd30bd1ec806797a8624225"/></dir><dir name="Model"><file name="Container.php" hash="70873159e8eb2254b8f701bc7ccf313e"/><file name="Observer.php" hash="fd35c56d813aac90583321588b355a0b"/><dir name="Backend"><dir name="Source"><file name="Method.php" hash="8af7a0459aaa78c93bf8c2d11a1bd46c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="bfaf7740830c6f557fae81e108bd70f4"/></dir><dir name="Block"><file name="Category.php" hash="63aac465df78b4f57b93831ff02c6d55"/><file name="Custom.php" hash="e208f2669b99b54001d90730b1fa5e2f"/><file name="Customer.php" hash="b8c90683ce9860d530c1dfb16e15ecda"/><file name="Default.php" hash="8bedea987a1738d400eb2f0ddc10bb94"/><file name="Ecommerce.php" hash="13bb03fab65e9afe756bc087ba328302"/><file name="Order.php" hash="eaaa92e54a6f98c8c39ee484dff1a7bb"/><file name="Product.php" hash="7427e6ff8ef6efa9acaac933a3e76b4a"/><file name="Quote.php" hash="d4ada2d05f420e396849780ad547c1dd"/><file name="Script.php" hash="efe492a317563bfe87772f678a338088"/></dir></dir></dir></dir></dir></dir></target></contents></package>