Version Notes
Update:
* added debugging feature.
Download this release
Release Info
Developer | Vladas Tomkevicius |
Extension | Anaraky_GDRT_1 |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.5
app/code/community/Anaraky/Gdrt/Block/Script.php
CHANGED
@@ -132,6 +132,34 @@ class Anaraky_Gdrt_Block_Script extends Mage_Core_Block_Abstract {
|
|
132 |
return urlencode(implode(';', $result));
|
133 |
}
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
protected function _toHtml()
|
136 |
{
|
137 |
$storeId = Mage::app()->getStore()->getId();
|
@@ -157,6 +185,26 @@ class Anaraky_Gdrt_Block_Script extends Mage_Core_Block_Abstract {
|
|
157 |
'</div>' . PHP_EOL .
|
158 |
'</noscript>';
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
return $s;
|
161 |
}
|
162 |
}
|
132 |
return urlencode(implode(';', $result));
|
133 |
}
|
134 |
|
135 |
+
private function paramsToDebug($params)
|
136 |
+
{
|
137 |
+
$result = '';
|
138 |
+
|
139 |
+
foreach ($params as $key => $value)
|
140 |
+
{
|
141 |
+
if (is_array($value) && count($value) == 1)
|
142 |
+
$value = $value[0];
|
143 |
+
|
144 |
+
if (is_array($value))
|
145 |
+
{
|
146 |
+
if (is_string($value[0]))
|
147 |
+
$value = '["' . implode('","', $value) . '"]';
|
148 |
+
else
|
149 |
+
$value = '[' . implode(',', $value) . ']';
|
150 |
+
}
|
151 |
+
elseif (is_string($value))
|
152 |
+
$value = '"' . $value . '"';
|
153 |
+
|
154 |
+
$result .= '<tr>' .
|
155 |
+
' <td style="text-align:right;font-weight:bold;">' . $key . ': </td>' .
|
156 |
+
' <td style="text-align:left;"> ' . $value . '</td>' .
|
157 |
+
' </tr>';
|
158 |
+
}
|
159 |
+
|
160 |
+
return $result;
|
161 |
+
}
|
162 |
+
|
163 |
protected function _toHtml()
|
164 |
{
|
165 |
$storeId = Mage::app()->getStore()->getId();
|
185 |
'</div>' . PHP_EOL .
|
186 |
'</noscript>';
|
187 |
|
188 |
+
if ((int)Mage::getStoreConfig('gdrt/debug/show_info', $storeId) === 1)
|
189 |
+
{
|
190 |
+
$lk = str_replace(' ', '', Mage::getStoreConfig('dev/restrict/allow_ips', $storeId));
|
191 |
+
$ips = explode(',', $lk);
|
192 |
+
if (empty($ips[0]) || in_array(Mage::helper('core/http')->getRemoteAddr(), $ips))
|
193 |
+
{
|
194 |
+
$s .= PHP_EOL .
|
195 |
+
'<div style="position:fixed; left:0; right:0; bottom:0; padding:5px 0; background:rgba(255, 208, 202, 0.8); border:1px solid #f92104;">' . PHP_EOL .
|
196 |
+
' <table style="margin:0 auto;font-size:13px;color:#222;">' .
|
197 |
+
' <tr>' .
|
198 |
+
' <td rowspan="' . (count($gcParams) + 1) . '" style="vertical-align:middle;padding-right:40px;"><h3 style="margin:0;">Anaraky GDRT debug</h3></td>' .
|
199 |
+
' <td style="text-align:right;font-weight:bold;">Model/Controller/Action: </td>' .
|
200 |
+
' <td style="text-align:left;"> ' . $this->getData('pagePath') . '</td>' .
|
201 |
+
' </tr>' .
|
202 |
+
$this->paramsToDebug($gcParams) .
|
203 |
+
' </table>' .
|
204 |
+
'</div>';
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
return $s;
|
209 |
}
|
210 |
}
|
app/code/community/Anaraky/Gdrt/Model/Observer.php
CHANGED
@@ -27,8 +27,13 @@ class Anaraky_Gdrt_Model_Observer {
|
|
27 |
<key>pageType</key>
|
28 |
<value>' . $pageType . '</value>
|
29 |
</action>
|
|
|
|
|
|
|
|
|
30 |
</block>
|
31 |
</reference>';
|
|
|
32 |
$layout->getUpdate()->addUpdate($block);
|
33 |
return $this;
|
34 |
}
|
27 |
<key>pageType</key>
|
28 |
<value>' . $pageType . '</value>
|
29 |
</action>
|
30 |
+
<action method="setData">
|
31 |
+
<key>pagePath</key>
|
32 |
+
<value>' . $mName . '/' . $cName . '/' . $aName . '</value>
|
33 |
+
</action>
|
34 |
</block>
|
35 |
</reference>';
|
36 |
+
|
37 |
$layout->getUpdate()->addUpdate($block);
|
38 |
return $this;
|
39 |
}
|
app/code/community/Anaraky/Gdrt/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Anaraky_Gdrt>
|
5 |
-
<version>1.0.
|
6 |
</Anaraky_Gdrt>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Anaraky_Gdrt>
|
5 |
+
<version>1.0.5</version>
|
6 |
</Anaraky_Gdrt>
|
7 |
</modules>
|
8 |
|
app/code/community/Anaraky/Gdrt/etc/system.xml
CHANGED
@@ -153,6 +153,31 @@
|
|
153 |
</purchase>
|
154 |
</fields>
|
155 |
</pages>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
</groups>
|
157 |
</gdrt>
|
158 |
</sections>
|
153 |
</purchase>
|
154 |
</fields>
|
155 |
</pages>
|
156 |
+
|
157 |
+
<debug translate="label">
|
158 |
+
<label>Debug</label>
|
159 |
+
<comment>
|
160 |
+
<![CDATA[
|
161 |
+
Highly recommended to set the "Allowed IPs" in the "Developer Client Restrictions"
|
162 |
+
(System > Configuration > Developer).
|
163 |
+
]]>
|
164 |
+
</comment>
|
165 |
+
<sort_order>3</sort_order>
|
166 |
+
<show_in_default>1</show_in_default>
|
167 |
+
<show_in_website>1</show_in_website>
|
168 |
+
<show_in_store>1</show_in_store>
|
169 |
+
<fields>
|
170 |
+
<show_info>
|
171 |
+
<label>Show page information</label>
|
172 |
+
<frontend_type>select</frontend_type>
|
173 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
174 |
+
<sort_order>1</sort_order>
|
175 |
+
<show_in_default>1</show_in_default>
|
176 |
+
<show_in_website>1</show_in_website>
|
177 |
+
<show_in_store>1</show_in_store>
|
178 |
+
</show_info>
|
179 |
+
</fields>
|
180 |
+
</debug>
|
181 |
</groups>
|
182 |
</gdrt>
|
183 |
</sections>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Anaraky_GDRT_1</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl.html">GNU General Public License</license>
|
7 |
<channel>community</channel>
|
@@ -9,11 +9,11 @@
|
|
9 |
<summary>Google Dynamic Remarketing Tag extension for Magento</summary>
|
10 |
<description>With this extension is simply and easy to integrate the Google Dynamic Remarketing Tag into Magento.</description>
|
11 |
<notes>Update:
|
12 |
-
*
|
13 |
<authors><author><name>Vladas Tomkevicius</name><user>Neodan</user><email>neodann@gmail.com</email></author></authors>
|
14 |
-
<date>2013-
|
15 |
-
<time>
|
16 |
-
<contents><target name="magecommunity"><dir name="Anaraky"><dir name="Gdrt"><dir name="Block"><file name="Script.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.5.1.0</min><max>1.7.0.2</max></package></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Anaraky_GDRT_1</name>
|
4 |
+
<version>1.0.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl.html">GNU General Public License</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>Google Dynamic Remarketing Tag extension for Magento</summary>
|
10 |
<description>With this extension is simply and easy to integrate the Google Dynamic Remarketing Tag into Magento.</description>
|
11 |
<notes>Update:
|
12 |
+
* added debugging feature.</notes>
|
13 |
<authors><author><name>Vladas Tomkevicius</name><user>Neodan</user><email>neodann@gmail.com</email></author></authors>
|
14 |
+
<date>2013-09-22</date>
|
15 |
+
<time>15:03:21</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Anaraky"><dir name="Gdrt"><dir name="Block"><file name="Script.php" hash="dedb97fde54a96f4d9a6bf5ec3830d83"/></dir><dir name="Helper"><file name="Data.php" hash="e1dfad9d739c7c3bc6094abae0af01e7"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Useasid.php" hash="d0f1371d883f6dd3af422e907770ee87"/></dir></dir></dir></dir><file name="Observer.php" hash="4182860b2afe88fc3f5f83dbef6adc0f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="03a29217c242534e2f13fe79e5fb43c7"/><file name="config.xml" hash="28d5dc5d95d27c68c846606fad5b2b49"/><file name="system.xml" hash="d531ca0e511be24d6769256fb0846bed"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Anaraky_Gdrt.xml" hash="43fa98d76721559c9ca20636dcb6af61"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.5.1.0</min><max>1.7.0.2</max></package></required></dependencies>
|
19 |
</package>
|