Tealium_Tags - Version 0.2.0

Version Notes

0.2.0 - fix for product page tag syntax
0.1.0 - initial release

Download this release

Release Info

Developer Tealium Inc.
Extension Tealium_Tags
Version 0.2.0
Comparing to
See all releases


Version 0.2.0

Files changed (25) hide show
  1. app/code/local/Tealium/Tags/Helper/Data.php +27 -0
  2. app/code/local/Tealium/Tags/etc/adminhtml.xml +23 -0
  3. app/code/local/Tealium/Tags/etc/config.xml +24 -0
  4. app/code/local/Tealium/Tags/etc/system.xml +69 -0
  5. app/design/frontend/base/default/layout/tealium_tags.xml +388 -0
  6. app/design/frontend/base/default/template/tealium_tags/base.phtml +18 -0
  7. app/design/frontend/base/default/template/tealium_tags/catalog_product_compare_index.phtml +32 -0
  8. app/design/frontend/base/default/template/tealium_tags/catalogsearch_advanced_result_index.phtml +38 -0
  9. app/design/frontend/base/default/template/tealium_tags/catalogsearch_result_index.phtml +22 -0
  10. app/design/frontend/base/default/template/tealium_tags/catalogsearch_term_popular.phtml +30 -0
  11. app/design/frontend/base/default/template/tealium_tags/category.phtml +53 -0
  12. app/design/frontend/base/default/template/tealium_tags/checkout_cart_index.phtml +41 -0
  13. app/design/frontend/base/default/template/tealium_tags/checkout_onepage.phtml +41 -0
  14. app/design/frontend/base/default/template/tealium_tags/checkout_success.phtml +53 -0
  15. app/design/frontend/base/default/template/tealium_tags/cms.phtml +20 -0
  16. app/design/frontend/base/default/template/tealium_tags/customer.phtml +34 -0
  17. app/design/frontend/base/default/template/tealium_tags/generic.phtml +20 -0
  18. app/design/frontend/base/default/template/tealium_tags/guest_sales.phtml +20 -0
  19. app/design/frontend/base/default/template/tealium_tags/product.phtml +29 -0
  20. app/design/frontend/base/default/template/tealium_tags/product_send.phtml +32 -0
  21. app/design/frontend/base/default/template/tealium_tags/seo.phtml +20 -0
  22. app/design/frontend/base/default/template/tealium_tags/tag_list_index.phtml +30 -0
  23. app/design/frontend/base/default/template/tealium_tags/tag_product_list.phtml +22 -0
  24. app/etc/modules/Tealium_Tags.xml +10 -0
  25. package.xml +19 -0
app/code/local/Tealium/Tags/Helper/Data.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Tealium_Tags_Helper_Data extends Mage_Core_Helper_Abstract {
3
+
4
+ public function isEnabled($store) {
5
+ return Mage::getStoreConfig('tealium_tags/general/enable', $store);
6
+ }
7
+
8
+ function getTealiumBaseUrl($store){
9
+ $account = $this->getAccount($store);
10
+ $profile = $this->getProfile($store);
11
+ $env = $this->getEnv($store);
12
+ return "//tags.tiqcdn.com/utag/$account/$profile/$env/utag.js";
13
+ }
14
+
15
+ public function getAccount($store) {
16
+ return Mage::getStoreConfig('tealium_tags/general/account', $store);
17
+ }
18
+
19
+ public function getProfile($store) {
20
+ return Mage::getStoreConfig('tealium_tags/general/profile', $store);
21
+ }
22
+ public function getEnv($store) {
23
+ return Mage::getStoreConfig('tealium_tags/general/env', $store);
24
+ }
25
+
26
+ }
27
+
app/code/local/Tealium/Tags/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <tealium_tags translate="title" module="tealium_tags">
12
+ <title>Tealium</title>
13
+ <sort_order>100</sort_order>
14
+ </tealium_tags>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/local/Tealium/Tags/etc/config.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Tealium_Tags>
5
+ <version>0.2.0</version>
6
+ </Tealium_Tags>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <tealium_tags>
11
+ <class>Tealium_Tags_Helper</class>
12
+ </tealium_tags>
13
+ </helpers>
14
+ </global>
15
+ <frontend>
16
+ <layout>
17
+ <updates>
18
+ <tealium_tags>
19
+ <file>tealium_tags.xml</file>
20
+ </tealium_tags>
21
+ </updates>
22
+ </layout>
23
+ </frontend>
24
+ </config>
app/code/local/Tealium/Tags/etc/system.xml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <tealium translate="label" module="tealium_tags">
5
+ <label>Tealium</label>
6
+ <sort_order>600</sort_order>
7
+ <show_in_default>1</show_in_default>
8
+ <show_in_website>1</show_in_website>
9
+ <show_in_store>1</show_in_store>
10
+ </tealium>
11
+ </tabs>
12
+ <sections>
13
+ <tealium_tags translate="label" module="tealium_tags">
14
+ <label>Tag Management</label>
15
+ <tab>tealium</tab>
16
+ <frontend_type>text</frontend_type>
17
+ <sort_order>100</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>1</show_in_store>
21
+ <groups>
22
+ <general translate="label">
23
+ <comment>&lt;div style='background-color: #ffffff;margin-bottom: 10px;height: 90px;'&gt; &lt;img style='float:left;width: 205px;' src='http://www.tealium.com/assets/img/tealium.gif' /&gt; &lt;span style='float:left;font-size: 20px; margin: 35px 0px 0px 20px;'&gt;Tag Management For Magento&lt;/span&gt; &lt;/div&gt; (Introductory blurb goes here, links to support pages, email address for support etc).</comment>
24
+ <label>General</label>
25
+ <frontend_type>text</frontend_type>
26
+ <sort_order>0</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ <fields>
31
+ <enable translate="label">
32
+ <label>Enable</label>
33
+ <frontend_type>select</frontend_type>
34
+ <source_model>adminhtml/system_config_source_yesno</source_model>
35
+ <sort_order>1</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ </enable>
40
+ <account translate="label">
41
+ <label>Account</label>
42
+ <frontend_type>text</frontend_type>
43
+ <sort_order>5</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ </account>
48
+ <profile translate="label">
49
+ <label>Profile</label>
50
+ <frontend_type>text</frontend_type>
51
+ <sort_order>10</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ </profile>
56
+ <env translate="label">
57
+ <label>Environment</label>
58
+ <frontend_type>text</frontend_type>
59
+ <sort_order>14</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </env>
64
+ </fields>
65
+ </general>
66
+ </groups>
67
+ </tealium_tags>
68
+ </sections>
69
+ </config>
app/design/frontend/base/default/layout/tealium_tags.xml ADDED
@@ -0,0 +1,388 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <layout version="0.1.0">
2
+
3
+ <!--
4
+
5
+ Add specific blocks on all frontend pages
6
+ catalog
7
+ sendfriend
8
+ customer
9
+ cms
10
+ checkout
11
+ search
12
+ (and remove the generic code)
13
+ -->
14
+
15
+ <!-- Category Pages -->
16
+ <catalog_category_default>
17
+ <reference name="after_body_start">
18
+ <remove name="tealium_generic" />
19
+ <block type="catalog/category_view" name="tealium_category" as="tealium_category" template="tealium_tags/category.phtml" before="tealium_base" />
20
+ </reference>
21
+ </catalog_category_default>
22
+
23
+ <catalog_category_layered>
24
+ <reference name="after_body_start">
25
+ <remove name="tealium_generic" />
26
+ <block type="catalog/category_view" name="tealium_category" as="tealium_category" template="tealium_tags/category.phtml" before="tealium_base" />
27
+ </reference>
28
+ </catalog_category_layered>
29
+
30
+ <!-- Product Page -->
31
+ <catalog_product_view>
32
+ <reference name="after_body_start">
33
+ <remove name="tealium_generic" />
34
+ <block type="catalog/product_view" name="tealium_product" as="tealium_product" template="tealium_tags/product.phtml" before="tealium_base" />
35
+ </reference>
36
+ </catalog_product_view>
37
+
38
+ <catalog_product_compare_index>
39
+ <reference name="after_body_start">
40
+ <remove name="tealium_generic" />
41
+ <block type="catalog/product_compare_list" name="tealium_catalog_product_compare_index" as="tealium_catalog_product_compare_index" template="tealium_tags/catalog_product_compare_index.phtml" before="tealium_base" />
42
+ </reference>
43
+ </catalog_product_compare_index>
44
+
45
+ <!-- SEO Sitemap -->
46
+ <catalog_seo_sitemap>
47
+ <!-- Covered by layouts below -->
48
+ </catalog_seo_sitemap>
49
+
50
+ <catalog_seo_sitemap_category>
51
+ <reference name="after_body_start">
52
+ <remove name="tealium_generic" />
53
+ <block type="core/template" name="tealium_product" as="tealium_product" template="tealium_tags/seo.phtml" before="tealium_base">
54
+ <action method="setData">
55
+ <name>tealium_type</name>
56
+ <value>seo sitemap category</value>
57
+ </action>
58
+ </block>
59
+ </reference>
60
+ </catalog_seo_sitemap_category>
61
+
62
+ <catalog_seo_sitemap_category_tree>
63
+ <reference name="after_body_start">
64
+ <remove name="tealium_generic" />
65
+ <block type="core/template" name="tealium_product" as="tealium_product" template="tealium_tags/seo.phtml" before="tealium_base">
66
+ <action method="setData">
67
+ <name>tealium_type</name>
68
+ <value>seo sitemap category tree</value>
69
+ </action>
70
+ </block>
71
+ </reference>
72
+ </catalog_seo_sitemap_category_tree>
73
+
74
+ <catalog_seo_sitemap_product>
75
+ <reference name="after_body_start">
76
+ <remove name="tealium_generic" />
77
+ <block type="core/template" name="tealium_product" as="tealium_product" template="tealium_tags/seo.phtml" before="tealium_base">
78
+ <action method="setData">
79
+ <name>tealium_type</name>
80
+ <value>seo sitemap product</value>
81
+ </action>
82
+ </block>
83
+ </reference>
84
+ </catalog_seo_sitemap_product>
85
+
86
+ <catalog_seo_searchterm_popular>
87
+ <reference name="after_body_start">
88
+ <remove name="tealium_generic" />
89
+ <block type="core/template" name="tealium_product" as="tealium_product" template="tealium_tags/seo.phtml" before="tealium_base">
90
+ <action method="setData">
91
+ <name>tealium_type</name>
92
+ <value>seo searchterm popular</value>
93
+ </action>
94
+ </block>
95
+ </reference>
96
+ </catalog_seo_searchterm_popular>
97
+
98
+ <!-- Send to friend -->
99
+ <sendfriend_product_send>
100
+ <reference name="after_body_start">
101
+ <remove name="tealium_generic" />
102
+ <block type="sendfriend/send" name="tealium_product_send" as="tealium_product_send" template="tealium_tags/product_send.phtml" before="tealium_base" />
103
+ </reference>
104
+ </sendfriend_product_send>
105
+
106
+ <!-- Customer -->
107
+
108
+ <customer_account>
109
+ <reference name="after_body_start">
110
+ <remove name="tealium_generic" />
111
+ <block type="core/template" name="tealium_product" as="tealium_product" template="tealium_tags/customer.phtml" before="tealium_base">
112
+ <action method="setData">
113
+ <name>tealium_type</name>
114
+ <value>customer account</value>
115
+ </action>
116
+ </block>
117
+ </reference>
118
+ </customer_account>
119
+
120
+ <!-- CMS -->
121
+
122
+ <cms_page>
123
+ <reference name="after_body_start">
124
+ <remove name="tealium_generic" />
125
+ <block type="core/template" name="tealium_product" as="tealium_product" template="tealium_tags/cms.phtml" before="tealium_base">
126
+ <action method="setData">
127
+ <name>tealium_type</name>
128
+ <value>cms page</value>
129
+ </action>
130
+ </block>
131
+ </reference>
132
+ </cms_page>
133
+
134
+ <!-- Checkout/Cart steps/Success -->
135
+ <checkout_cart_index>
136
+ <reference name="after_body_start">
137
+ <remove name="tealium_generic" />
138
+ <block type="core/template" name="tealium_checkout_cart_index" as="tealium_checkout_cart_index" template="tealium_tags/checkout_cart_index.phtml" before="tealium_base" />
139
+ </reference>
140
+ </checkout_cart_index>
141
+
142
+ <checkout_onepage_index>
143
+ <reference name="after_body_start">
144
+ <remove name="tealium_generic" />
145
+ <block type="core/template" name="tealium_checkout_onepage" as="tealium_checkout_onepage" template="tealium_tags/checkout_onepage.phtml" before="tealium_base" />
146
+ </reference>
147
+ </checkout_onepage_index>
148
+
149
+ <checkout_onepage_success>
150
+ <reference name="after_body_start">
151
+ <remove name="tealium_generic" />
152
+ <block type="checkout/onepage_success" name="checkout_onepage_success" as="checkout_onepage_success" template="tealium_tags/checkout_success.phtml" before="tealium_base" />
153
+ </reference>
154
+ </checkout_onepage_success>
155
+
156
+ <!-- Multi-shipping uses same template as above -->
157
+ <checkout_multishipping>
158
+ <reference name="after_body_start">
159
+ <remove name="tealium_generic" />
160
+ <block type="core/template" name="tealium_checkout_onepage" as="tealium_checkout_onepage" template="tealium_tags/checkout_onepage.phtml" before="tealium_base" />
161
+ </reference>
162
+ </checkout_multishipping>
163
+
164
+
165
+ <!-- Search/Advanced Search -->
166
+ <catalogsearch_result_index>
167
+ <reference name="after_body_start">
168
+ <remove name="tealium_generic" />
169
+ <block type="catalogsearch/result" name="tealium_catalogsearch_result_index" as="tealium_catalogsearch_result_index" template="tealium_tags/catalogsearch_result_index.phtml" before="tealium_base">
170
+ <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
171
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
172
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
173
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
174
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
175
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
176
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
177
+ </block>
178
+ <action method="setListOrders"/>
179
+ <action method="setListModes"/>
180
+ <action method="setListCollection"/>
181
+ </block>
182
+ </reference>
183
+ </catalogsearch_result_index>
184
+
185
+ <catalogsearch_advanced_result>
186
+ <reference name="after_body_start">
187
+ <remove name="tealium_generic" />
188
+ <block type="catalogsearch/advanced_result" name="tealium_catalogsearch_result_index" as="tealium_catalogsearch_result_index" template="tealium_tags/catalogsearch_advanced_result_index.phtml" before="tealium_base" />
189
+ </reference>
190
+ </catalogsearch_advanced_result>
191
+
192
+ <catalogsearch_term_popular>
193
+ <reference name="after_body_start">
194
+ <remove name="tealium_generic" />
195
+ <block type="catalogsearch/term" name="tealium_catalogsearch_term_popular" as="tealium_catalogsearch_term_popular" template="tealium_tags/catalogsearch_term_popular.phtml" before="tealium_base" />
196
+ </reference>
197
+ </catalogsearch_term_popular>
198
+
199
+ <!-- Tags -->
200
+
201
+ <tag_list_index>
202
+ <reference name="after_body_start">
203
+ <remove name="tealium_generic" />
204
+ <block type="tag/all" name="tealium_tag_list_index" as="tealium_tag_list_index" template="tealium_tags/tag_list_index.phtml" before="tealium_base" />
205
+ </reference>
206
+ </tag_list_index>
207
+
208
+ <tag_product_list>
209
+ <reference name="after_body_start">
210
+ <remove name="tealium_generic" />
211
+ <block type="tag/product_result" name="tealium_tag_product_list" as="tealium_tag_product_list" template="tealium_tags/tag_product_list.phtml" before="tealium_base">
212
+ <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
213
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
214
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
215
+ </block>
216
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
217
+ </block>
218
+ <action method="setListOrders"/>
219
+ <action method="setListModes"/>
220
+ <action method="setListCollection"/>
221
+ </block>
222
+ </reference>
223
+ </tag_product_list>
224
+
225
+ <!-- Guest Sales -->
226
+
227
+ <sales_guest_form>
228
+ <reference name="after_body_start">
229
+ <remove name="tealium_generic" />
230
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
231
+ <action method="setData">
232
+ <name>tealium_type</name>
233
+ <value>sales guest form</value>
234
+ </action>
235
+ <action method="setData">
236
+ <name>tealium_name</name>
237
+ <value>Orders and Returns</value>
238
+ </action>
239
+ </block>
240
+ </reference>
241
+ </sales_guest_form>
242
+ <sales_guest_view>
243
+ <reference name="after_body_start">
244
+ <remove name="tealium_generic" />
245
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
246
+ <action method="setData">
247
+ <name>tealium_type</name>
248
+ <value>sales guest view</value>
249
+ </action>
250
+ <action method="setData">
251
+ <name>tealium_name</name>
252
+ <value>Guest View order</value>
253
+ </action>
254
+ </block>
255
+ </reference>
256
+ </sales_guest_view>
257
+ <sales_guest_invoice>
258
+ <reference name="after_body_start">
259
+ <remove name="tealium_generic" />
260
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
261
+ <action method="setData">
262
+ <name>tealium_type</name>
263
+ <value>sales guest view invoice</value>
264
+ </action>
265
+ <action method="setData">
266
+ <name>tealium_name</name>
267
+ <value>Guest View Invoice</value>
268
+ </action>
269
+ </block>
270
+ </reference>
271
+ </sales_guest_invoice>
272
+ <sales_guest_shipment>
273
+ <reference name="after_body_start">
274
+ <remove name="tealium_generic" />
275
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
276
+ <action method="setData">
277
+ <name>tealium_type</name>
278
+ <value>sales guest view shipment</value>
279
+ </action>
280
+ <action method="setData">
281
+ <name>tealium_name</name>
282
+ <value>Guest View Shipment</value>
283
+ </action>
284
+ </block>
285
+ </reference>
286
+ </sales_guest_shipment>
287
+ <sales_guest_creditmemo>
288
+ <reference name="after_body_start">
289
+ <remove name="tealium_generic" />
290
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
291
+ <action method="setData">
292
+ <name>tealium_type</name>
293
+ <value>sales guest view creditmemo</value>
294
+ </action>
295
+ <action method="setData">
296
+ <name>tealium_name</name>
297
+ <value>Guest View Credit Memo</value>
298
+ </action>
299
+ </block>
300
+ </reference>
301
+ </sales_guest_creditmemo>
302
+ <sales_guest_reorder>
303
+ <reference name="after_body_start">
304
+ <remove name="tealium_generic" />
305
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
306
+ <action method="setData">
307
+ <name>tealium_type</name>
308
+ <value>sales guest reorder</value>
309
+ </action>
310
+ <action method="setData">
311
+ <name>tealium_name</name>
312
+ <value>Guest Reorder</value>
313
+ </action>
314
+ </block>
315
+ </reference>
316
+ </sales_guest_reorder>
317
+
318
+ <sales_guest_print>
319
+ <reference name="after_body_start">
320
+ <remove name="tealium_generic" />
321
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
322
+ <action method="setData">
323
+ <name>tealium_type</name>
324
+ <value>sales guest print</value>
325
+ </action>
326
+ <action method="setData">
327
+ <name>tealium_name</name>
328
+ <value>Guest Print Order</value>
329
+ </action>
330
+ </block>
331
+ </reference>
332
+ </sales_guest_print>
333
+ <sales_guest_printinvoice>
334
+ <reference name="after_body_start">
335
+ <remove name="tealium_generic" />
336
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
337
+ <action method="setData">
338
+ <name>tealium_type</name>
339
+ <value>sales guest print invoice</value>
340
+ </action>
341
+ <action method="setData">
342
+ <name>tealium_name</name>
343
+ <value>Guest Print Invoice</value>
344
+ </action>
345
+ </block>
346
+ </reference>
347
+ </sales_guest_printinvoice>
348
+ <sales_guest_printshipment>
349
+ <reference name="after_body_start">
350
+ <remove name="tealium_generic" />
351
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
352
+ <action method="setData">
353
+ <name>tealium_type</name>
354
+ <value>sales guest print shipment</value>
355
+ </action>
356
+ <action method="setData">
357
+ <name>tealium_name</name>
358
+ <value>Guest Print Shipment</value>
359
+ </action>
360
+ </block>
361
+ </reference>
362
+ </sales_guest_printshipment>
363
+ <sales_guest_printcreditmemo>
364
+ <reference name="after_body_start">
365
+ <remove name="tealium_generic" />
366
+ <block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
367
+ <action method="setData">
368
+ <name>tealium_type</name>
369
+ <value>sales guest print credit memo</value>
370
+ </action>
371
+ <action method="setData">
372
+ <name>tealium_name</name>
373
+ <value>Guest Print Credit Memo</value>
374
+ </action>
375
+ </block>
376
+ </reference>
377
+ </sales_guest_printcreditmemo>
378
+
379
+
380
+
381
+ <!-- Add base tealium script on all pages, and the generic script -->
382
+ <default>
383
+ <reference name="after_body_start">
384
+ <block type="core/template" name="tealium_base" as="tealium_base" template="tealium_tags/base.phtml" />
385
+ <block type="core/template" name="tealium_generic" as="tealium_generic" template="tealium_tags/generic.phtml" before="tealium_base" />
386
+ </reference>
387
+ </default>
388
+ </layout>
app/design/frontend/base/default/template/tealium_tags/base.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper('tealium_tags');
3
+ $store = Mage::app()->getStore();
4
+
5
+ if (!$helper->isEnabled($store)) {
6
+ return; // not enabled, no javascript inserted
7
+ }
8
+ ?>
9
+
10
+ <!-- Tealium Base javascript -->
11
+ <script type="text/javascript">
12
+ (function(a,b,c,d){
13
+ a='<?php echo $helper->getTealiumBaseUrl($store); ?>';
14
+ b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;d.
15
+ async=true;
16
+ a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
17
+ })();
18
+ </script>
app/design/frontend/base/default/template/tealium_tags/catalog_product_compare_index.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $ids = array();
11
+ $skus = array();
12
+ $names = array();
13
+
14
+ foreach($this->getItems() as $item) {
15
+ $ids[] = $item->getProductId();
16
+ $skus[] = $item->getSku();
17
+ $names[] = $item->getName();
18
+ }
19
+ ?>
20
+
21
+ <!-- Tealium Product Compare javascript -->
22
+ <script type="text/javascript">
23
+ var utag_data={
24
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
25
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
26
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
27
+ page_type: "product compare",
28
+ product_id: ["<?php echo implode('","', $ids) ?>"],
29
+ product_sku: ["<?php echo implode('","', $skus) ?>"],
30
+ product_name: ["<?php echo implode('","', $names) ?>"]
31
+ };
32
+ </script>
app/design/frontend/base/default/template/tealium_tags/catalogsearch_advanced_result_index.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $terms = array();
11
+
12
+ $searchCriterias = $this->getSearchCriterias();
13
+ foreach (array('left', 'right') as $side) {
14
+ if(@$searchCriterias[$side]) {
15
+ foreach($searchCriterias[$side] as $criteria) {
16
+ $terms[] = $this->htmlEscape($this->helper('catalog')->__($criteria['name'])) .
17
+ ":" . $this->htmlEscape($criteria['value']);
18
+ }
19
+ }
20
+ }
21
+
22
+ if (empty($terms)) {
23
+ $terms[] = "no-criteria";
24
+ }
25
+
26
+ ?>
27
+
28
+ <!-- Tealium Search Results page javascript -->
29
+ <script type="text/javascript">
30
+ var utag_data={
31
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
32
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
33
+ page_name: "advanced search results",
34
+ page_type: "advanced search",
35
+ search_results: "<?php echo $this->getResultCount(); ?>",
36
+ search_keyword: ["<?php echo implode('","', $terms) ?>"]
37
+ };
38
+ </script>
app/design/frontend/base/default/template/tealium_tags/catalogsearch_result_index.phtml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ ?>
11
+
12
+ <!-- Tealium Search Results page javascript -->
13
+ <script type="text/javascript">
14
+ var utag_data={
15
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
16
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
17
+ page_name: "search results",
18
+ page_type: "search",
19
+ search_results: "<?php echo $this->getResultCount(); ?>",
20
+ search_keyword: "<?php echo $this->helper('catalogsearch')->getEscapedQueryText(); ?>"
21
+ };
22
+ </script>
app/design/frontend/base/default/template/tealium_tags/catalogsearch_term_popular.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $terms = array();
11
+
12
+ if( sizeof($this->getTerms()) > 0 ) {
13
+ foreach ($this->getTerms() as $_term) {
14
+ $terms[] = $_term->getName();
15
+ }
16
+ } else {
17
+ $terms[] = "no-terms";
18
+ }
19
+ ?>
20
+
21
+ <!-- Tealium Popular Search terms page javascript -->
22
+ <script type="text/javascript">
23
+ var utag_data={
24
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
25
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
26
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
27
+ page_type: "popular search terms",
28
+ search_keyword: ["<?php echo implode('","', $terms) ?>"]
29
+ };
30
+ </script>
app/design/frontend/base/default/template/tealium_tags/category.phtml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $_category = $this->getCurrentCategory();
11
+ $parent = false;
12
+ $grandparent = false;
13
+
14
+ // check for parent and grandparent
15
+ if ($_category->getParentId()) {
16
+ $parent = Mage::getModel('catalog/category')->load($_category->getParentId());
17
+
18
+ if ($parent->getParentId()) {
19
+ $grandparent = Mage::getModel('catalog/category')->load($parent->getParentId());
20
+ }
21
+ }
22
+
23
+ // Set the section and subcategory with parent and grandparent
24
+ $section = "n/a";
25
+ $category = "n/a";
26
+ $subcategory = "n/a";
27
+
28
+ if ($grandparent) {
29
+ $section = $grandparent->getName();
30
+ $category = $parent->getName();
31
+ $subcategory = $_category->getName();
32
+ } elseif ($parent) {
33
+ $section = $parent->getName();
34
+ $category = $_category->getName();
35
+ } else {
36
+ $category = $_category->getName();
37
+ }
38
+
39
+ ?>
40
+
41
+ <!-- Tealium Category javascript -->
42
+ <script type="text/javascript">
43
+ var utag_data={
44
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
45
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
46
+ page_name: "<?php echo $_category->getName(); ?>",
47
+ page_type: "category",
48
+ page_section_name: "<?php echo $section; ?>",
49
+ page_category_name: "<?php echo $category; ?>",
50
+ page_subcategory_name: "<?php echo $subcategory; ?>"
51
+
52
+ };
53
+ </script>
app/design/frontend/base/default/template/tealium_tags/checkout_cart_index.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $quote = Mage::helper('checkout')->getQuote();
11
+
12
+ $ids = array();
13
+ $skus = array();
14
+ $names = array();
15
+ $qtys = array();
16
+ $prices = array();
17
+
18
+ foreach ($quote->getItemsCollection() as $item) {
19
+ $ids[] = $item->getProductId();
20
+ $skus[] = $item->getSku();
21
+ $names[] = $item->getName();
22
+ $qtys[] = $item->getQty();
23
+ $prices[] = $item->getPrice();
24
+ }
25
+
26
+ ?>
27
+
28
+ <!-- Tealium Checkout_Cart javascript -->
29
+ <script type="text/javascript">
30
+ var utag_data={
31
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
32
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
33
+ page_name: "cart index",
34
+ page_type: "cart",
35
+ product_id: ["<?php echo implode('","', $ids) ?>"],
36
+ product_sku: ["<?php echo implode('","', $skus) ?>"],
37
+ product_name: ["<?php echo implode('","', $names) ?>"],
38
+ product_quantity: ["<?php echo implode('","', $qtys) ?>"],
39
+ product_list_price: ["<?php echo implode('","', $prices) ?>"]
40
+ };
41
+ </script>
app/design/frontend/base/default/template/tealium_tags/checkout_onepage.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $quote = Mage::helper('checkout')->getQuote();
11
+
12
+ $ids = array();
13
+ $skus = array();
14
+ $names = array();
15
+ $qtys = array();
16
+ $prices = array();
17
+
18
+ foreach ($quote->getItemsCollection() as $item) {
19
+ $ids[] = $item->getProductId();
20
+ $skus[] = $item->getSku();
21
+ $names[] = $item->getName();
22
+ $qtys[] = $item->getQty();
23
+ $prices[] = $item->getPrice();
24
+ }
25
+
26
+ ?>
27
+
28
+ <!-- Tealium Checkout javascript -->
29
+ <script type="text/javascript">
30
+ var utag_data={
31
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
32
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
33
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
34
+ page_type: "checkout",
35
+ product_id: ["<?php echo implode('","', $ids) ?>"],
36
+ product_sku: ["<?php echo implode('","', $skus) ?>"],
37
+ product_name: ["<?php echo implode('","', $names) ?>"],
38
+ product_quantity: ["<?php echo implode('","', $qtys) ?>"],
39
+ product_list_price: ["<?php echo implode('","', $prices) ?>"]
40
+ };
41
+ </script>
app/design/frontend/base/default/template/tealium_tags/checkout_success.phtml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
11
+
12
+ $ids = array();
13
+ $skus = array();
14
+ $names = array();
15
+ $qtys = array();
16
+ $prices = array();
17
+
18
+ foreach($order->getAllItems() as $item) {
19
+
20
+ $ids[] = $item->getProductId();
21
+ $skus[] = $item->getSku();
22
+ $names[] = $item->getName();
23
+ $qtys[] = $item->getQtyOrdered();
24
+ $prices[] = $item->getPrice();
25
+ }
26
+
27
+ ?>
28
+
29
+ <!-- Tealium Checkout Success javascript -->
30
+ <script type="text/javascript">
31
+ var utag_data={
32
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
33
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
34
+ page_name: "cart success",
35
+ page_type: "cart",
36
+ product_id: ["<?php echo implode('","', $ids) ?>"],
37
+ product_sku: ["<?php echo implode('","', $skus) ?>"],
38
+ product_name: ["<?php echo implode('","', $names) ?>"],
39
+ product_quantity: ["<?php echo implode('","', $qtys) ?>"],
40
+ product_list_price: ["<?php echo implode('","', $prices) ?>"],
41
+ order_id: "<?php echo $order->getIncrementId(); ?>",
42
+ order_subtotal: "<?php echo $order->getSubtotal(); ?>",
43
+ order_payment_type: "<?php echo $order->getPayment() ? $order->getPayment()->getMethodInstance()->getTitle() : 'unknown'; ?>",
44
+ order_total: "<?php echo $order->getGrandTotal(); ?>",
45
+ customer_email: "<?php echo $order->getCustomerEmail(); ?>",
46
+ order_discount: "<?php echo $order->getDiscountAmount(); ?>",
47
+ order_shipping: "<?php echo $order->getShippingAmount(); ?>",
48
+ order_tax: "<?php echo $order->getTaxAmount(); ?>",
49
+ order_currency: "<?php echo $order->getOrderCurrencyCode(); ?>"
50
+ };
51
+ </script>
52
+
53
+
app/design/frontend/base/default/template/tealium_tags/cms.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ ?>
11
+
12
+ <!-- Tealium CMS page javascript -->
13
+ <script type="text/javascript">
14
+ var utag_data={
15
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
16
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
17
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
18
+ page_type: "<?php echo $this->getTealiumType(); ?>"
19
+ };
20
+ </script>
app/design/frontend/base/default/template/tealium_tags/customer.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $customer_id = "n/a";
11
+ $customer_email = "n/a";
12
+ $customer_type = "n/a";
13
+
14
+ if (Mage::getSingleton('customer/session')->isLoggedIn()) {
15
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
16
+ $customer_id = $customer->getEntityId();
17
+ $customer_email = $customer->getEmail();
18
+ $groupId = $customer->getGroupId();
19
+ $customer_type = Mage::getModel('customer/group')->load($groupId)->getCode();
20
+ }
21
+ ?>
22
+
23
+ <!-- Tealium Customer page javascript -->
24
+ <script type="text/javascript">
25
+ var utag_data={
26
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
27
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
28
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
29
+ page_type: "<?php echo $this->getTealiumType(); ?>",
30
+ customer_id: "<?php echo $customer_id; ?>",
31
+ customer_email: "<?php echo $customer_email; ?>",
32
+ customer_type: "<?php echo $customer_type; ?>"
33
+ };
34
+ </script>
app/design/frontend/base/default/template/tealium_tags/generic.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ ?>
11
+
12
+ <!-- Tealium Generic page javascript -->
13
+ <script type="text/javascript">
14
+ var utag_data={
15
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
16
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
17
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
18
+ page_type: "generic"
19
+ };
20
+ </script>
app/design/frontend/base/default/template/tealium_tags/guest_sales.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ ?>
11
+
12
+ <!-- Tealium Guest Sales page javascript -->
13
+ <script type="text/javascript">
14
+ var utag_data={
15
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
16
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
17
+ page_name: "<?php echo $this->getTealiumName(); ?>",
18
+ page_type: "<?php echo $this->getTealiumType(); ?>"
19
+ };
20
+ </script>
app/design/frontend/base/default/template/tealium_tags/product.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $_product = $this->getProduct();
11
+ $_category = Mage::registry('current_category');
12
+ ?>
13
+
14
+ <!-- Tealium Product javascript -->
15
+ <script type="text/javascript">
16
+ var utag_data={
17
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
18
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
19
+ page_name: "<?php echo $_product->getName(); ?>",
20
+ page_type: "product",
21
+ product_id: ["<?php echo $_product->getId(); ?>"],
22
+ product_sku: ["<?php echo $_product->getSku(); ?>"],
23
+ product_name: ["<?php echo $_product->getName(); ?>"],
24
+ product_brand: ["<?php echo $_product->getBrand(); ?>"],
25
+ product_category: ["<?php echo $_category ? $_category->getName() : 'no_category'; ?>"],
26
+ <?php if ($_product->getSpecialPrice()!='') echo 'product_unit_price: ["'.$_product->getSpecialPrice() .'"],'; ?>
27
+ product_list_price: ["<?php echo $_product->getPrice(); ?>"]
28
+ };
29
+ </script>
app/design/frontend/base/default/template/tealium_tags/product_send.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $_product_id = $this->getProductId();
11
+ $_category_id = $this->getCategoryId();
12
+
13
+ $_product = Mage::getModel('catalog/product')->load($_product_id);;
14
+ $_category = Mage::getModel('catalog/category')->load($_category_id);;
15
+ ?>
16
+
17
+ <!-- Tealium Send Friend javascript -->
18
+ <script type="text/javascript">
19
+ var utag_data={
20
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
21
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
22
+ page_name: "<?php echo $_product->getName(); ?>",
23
+ page_type: "product send",
24
+ product_id: ["<?php echo $_product->getId(); ?>"],
25
+ product_sku: ["<?php echo $_product->getSku(); ?>"],
26
+ product_name: ["<?php echo $_product->getName(); ?>"],
27
+ product_brand: ["<?php echo $_product->getBrand(); ?>"],
28
+ product_category: ["<?php echo $_category ? $_category->getName() : 'no_category'; ?>"],
29
+ <?php if ($_product->getSpecialPrice()!='') echo 'product_unit_price: ["'.$_product->getSpecialPrice() .'"],'; ?>
30
+ product_list_price: ["<?php echo $_product->getPrice(); ?>"]
31
+ };
32
+ </script>
app/design/frontend/base/default/template/tealium_tags/seo.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ ?>
11
+
12
+ <!-- Tealium SEO page javascript -->
13
+ <script type="text/javascript">
14
+ var utag_data={
15
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
16
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
17
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
18
+ page_type: "<?php echo $this->getTealiumType(); ?>"
19
+ };
20
+ </script>
app/design/frontend/base/default/template/tealium_tags/tag_list_index.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ $tags = array();
11
+
12
+ if( sizeof($this->getTags()) > 0 ) {
13
+ foreach ($this->getTags()as $name => $tag) {
14
+ $tags[] = $name;
15
+ }
16
+ } else {
17
+ $tags[] = "no-tags";
18
+ }
19
+ ?>
20
+
21
+ <!-- Tealium Tag List page javascript -->
22
+ <script type="text/javascript">
23
+ var utag_data={
24
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
25
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
26
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
27
+ page_type: "tag list",
28
+ search_keyword: ["<?php echo implode('","', $tags) ?>"]
29
+ };
30
+ </script>
app/design/frontend/base/default/template/tealium_tags/tag_product_list.phtml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $helper = Mage::helper('tealium_tags');
4
+ $store = Mage::app()->getStore();
5
+
6
+ if (!$helper->isEnabled($store)) {
7
+ return; // not enabled, no javascript inserted
8
+ }
9
+
10
+ ?>
11
+
12
+ <!-- Tealium Tag Product List page javascript -->
13
+ <script type="text/javascript">
14
+ var utag_data={
15
+ site_region: "<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>",
16
+ site_currency: "<?php echo $store->getCurrentCurrencyCode(); ?>",
17
+ page_name: "<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>",
18
+ page_type: "tag product list",
19
+ search_results: "<?php echo $this->getResultCount(); ?>",
20
+ search_keyword: "<?php echo $this->getTag()->getName(); ?>"
21
+ };
22
+ </script>
app/etc/modules/Tealium_Tags.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Tealium_Tags>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <version>0.1.0</version>
8
+ </Tealium_Tags>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Tealium_Tags</name>
4
+ <version>0.2.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Tealum tag management solution</summary>
10
+ <description>Tealum tag management solution extension injects the Tealium javascript into your magento pages, and on specific pages injects special javascript so that you can access specific data elements such as product, category or cart data.</description>
11
+ <notes>0.2.0 - fix for product page tag syntax&#xD;
12
+ 0.1.0 - initial release</notes>
13
+ <authors><author><name>Tealium</name><user>tealium</user><email>adam.corey@tealium.com</email></author></authors>
14
+ <date>2013-06-26</date>
15
+ <time>09:41:39</time>
16
+ <contents><target name="magelocal"><dir name="Tealium"><dir name="Tags"><dir name="Helper"><file name="Data.php" hash="13a0233e34f932751381744f835f9a1d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e6ec5ba973cdb97a9925f02575392865"/><file name="config.xml" hash="ba6ac6a8b6693625cec516ec7f95526a"/><file name="system.xml" hash="2b0d8b1845f33dd6efe7c035ad047a47"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tealium_Tags.xml" hash="3d6843433dffefb4600573950a83e765"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="tealium_tags.xml" hash="8cc1b6255886de56c9a31ee63524f618"/></dir><dir name="template"><dir name="tealium_tags"><file name="base.phtml" hash="f09cb5b4e9b123e733e18164fe046673"/><file name="catalog_product_compare_index.phtml" hash="9383606f64e5a5918a42dade26427b82"/><file name="catalogsearch_advanced_result_index.phtml" hash="ae59d3320276e4b8697811317d913400"/><file name="catalogsearch_result_index.phtml" hash="de8a77ac81f67d05d24a174caebf5d7f"/><file name="catalogsearch_term_popular.phtml" hash="a181fe2776e1accee8b6ccb5fce43e89"/><file name="category.phtml" hash="54a9cf9d39d812fde48250dba5ff3b03"/><file name="checkout_cart_index.phtml" hash="18d0a7adafc4ad3428e72d84401c62e4"/><file name="checkout_onepage.phtml" hash="e6d35b3f0ae5d5cc5698671a4d42996e"/><file name="checkout_success.phtml" hash="4bca4247174383c8ae12ffcf6fd93248"/><file name="cms.phtml" hash="01f737af394efe30f12747898c180e04"/><file name="customer.phtml" hash="6c31ee97cab35adfcc8467df0d099d47"/><file name="generic.phtml" hash="9581dfa0fa958b71e5e01391860ec2b7"/><file name="guest_sales.phtml" hash="727f38f359cf83d979cf83ef71fe75a5"/><file name="product.phtml" hash="71bbd4d74633611a60491581db5b7f27"/><file name="product_send.phtml" hash="440e697c1ba12461efd5f18b40fe0940"/><file name="seo.phtml" hash="45d794ab2ce0bf3a9c7568203d3106e7"/><file name="tag_list_index.phtml" hash="a62362c42fc1639c63e7b940b13d4119"/><file name="tag_product_list.phtml" hash="c555519f13540a7cd68966ee0770d85d"/></dir></dir></dir></dir></dir></target></contents>
17
+ <compatible/>
18
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
19
+ </package>