Tealium_Tags - Version 2.0.4

Version Notes

2.0.4 - fixed one page checkout
2.0.3 - Fixed warnings for REQUEST isset()
re-added page_type and page_name for order confirmation
2.0.2 - Fix typos
2.0.1 - Fix for extended UDO rendering blank page
2.0.0 - Added external script support and refactored
1.2.0 - Added UI admin toggle for onePage Checkout
1.1.1 - Fixed pages not rendering
1.1.0 - Added support for alternate checkout pages
1.0.2 - Added html/text help to admin config
1.0.1 - Fixed arrays that were rendering as strings
1.0.0 - refactored based on Tealium class
* added support for external UDO definition
* added support for diagnostic pixel
0.4.4d - added output of diagnostic pixel
0.4.4 - strip commas from all dollar values
0.4.3 - fix for bad array on order page
0.4.2 - added simple discount array
0.4.0 - fix for individual discounts and number formats
0.3.1 - fix for configurable product arrays
0.3.0 - fix for missing support message
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 2.0.4
Comparing to
See all releases


Code changes from version 2.0.3 to 2.0.4

app/design/frontend/base/default/template/tealium_tags/checkout_onepage.phtml CHANGED
@@ -34,13 +34,12 @@ echo <<<EOD
34
  <script type="text/javascript">
35
  document.addEventListener('DOMContentLoaded',function(){
36
  if(!!window.Checkout){
37
- Checkout.prototype.gotoSection = function(section) {
 
38
  utag.data=$jsonUDO;
39
  utag.data["page_name"] = section;
40
  utag.view(utag.data);
41
- section = $('opc-'+section);
42
- section.addClassName('allow');
43
- this.accordion.openSection(section)
44
  }
45
  }
46
 
34
  <script type="text/javascript">
35
  document.addEventListener('DOMContentLoaded',function(){
36
  if(!!window.Checkout){
37
+ Checkout.prototype.namespaceOriginalGotoSection = Checkout.prototype.gotoSection;
38
+ Checkout.prototype.gotoSection = function(section,reloadProgressBlock) {
39
  utag.data=$jsonUDO;
40
  utag.data["page_name"] = section;
41
  utag.view(utag.data);
42
+ this.namespaceOriginalGotoSection(section,reloadProgressBlock);
 
 
43
  }
44
  }
45
 
lib/Tealium/TealiumInit.php CHANGED
@@ -146,6 +146,7 @@ class TealiumData {
146
  public function getCartPage() {
147
  $store = TealiumData::$store;
148
  $page = TealiumData::$page;
 
149
 
150
  if (Mage::helper('checkout')) {
151
  $quote = Mage::helper('checkout')->getQuote();
@@ -155,6 +156,8 @@ class TealiumData {
155
  $checkout_names[] = $item->getName();
156
  $checkout_qtys[] = number_format($item->getQty(), 0, ".", "");
157
  $checkout_prices[] = number_format($item->getPrice(), 2, ".", "");
 
 
158
  }
159
  }
160
 
@@ -168,11 +171,11 @@ class TealiumData {
168
  $outputArray['product_id'] = $checkout_ids ?: array();
169
  $outputArray['product_sku'] = $checkout_skus ?: array();
170
  $outputArray['product_name'] = $checkout_names ?: array();
171
- $outputArray['product_brand'] = array();
172
  $outputArray['product_category'] = array();
173
  $outputArray['product_quantity'] = $checkout_qtys ?: array();
174
- $outputArray['product_unit_price'] = array();
175
- $outputArray['product_list_price'] = $checkout_prices ?: array();
176
 
177
  $outputArray['product_price'] = $outputArray['product_unit_price'];
178
  $outputArray['product_original_price'] = $outputArray['product_list_price'];
@@ -201,10 +204,12 @@ class TealiumData {
201
  $names[] = $item->getName();
202
  $qtys[] = number_format($item->getQtyOrdered(), 0, ".", "");
203
  $prices[] = number_format($item->getPrice(), 2, ".", "");
 
204
  $discount = number_format($item->getDiscountAmount(), 2, ".", "");
205
  $discounts[] = $discount;
206
  $applied_rules = explode(",", $item->getAppliedRuleIds());
207
  $discount_object = array();
 
208
  foreach ($applied_rules as $rule) {
209
  $quantity = number_format(Mage::getModel('salesrule/rule')->load($rule)->getDiscountQty(), 0, ".", "");
210
  $amount = number_format(Mage::getModel('salesrule/rule')->load($rule)->getDiscountAmount(), 2, ".", "");
@@ -240,10 +245,10 @@ class TealiumData {
240
  $outputArray['product_id'] = $ids ?: array();
241
  $outputArray['product_sku'] = $skus ?: array();
242
  $outputArray['product_name'] = $names ?: array();
243
- $outputArray['product_brand'] = array();
244
  $outputArray['product_category'] = array();
245
- $outputArray['product_unit_price'] = array();
246
- $outputArray['product_list_price'] = $prices ?: array();
247
  $outputArray['product_price'] = $outputArray['product_unit_price'];
248
  $outputArray['product_original_price'] = $outputArray['product_list_price'];
249
  $outputArray['product_quantity'] = $qtys ?: array();
146
  public function getCartPage() {
147
  $store = TealiumData::$store;
148
  $page = TealiumData::$page;
149
+ $checkout_ids = $checkout_skus = $checkout_names = $checkout_qtys = $checkout_prices = $checkout_original_prices = $checkout_brands = array();
150
 
151
  if (Mage::helper('checkout')) {
152
  $quote = Mage::helper('checkout')->getQuote();
156
  $checkout_names[] = $item->getName();
157
  $checkout_qtys[] = number_format($item->getQty(), 0, ".", "");
158
  $checkout_prices[] = number_format($item->getPrice(), 2, ".", "");
159
+ $checkout_original_prices[] = number_format($item->getProduct()->getPrice(), 2, ".", "");
160
+ $checkout_brands[] = $item->getProduct()->getBrand();
161
  }
162
  }
163
 
171
  $outputArray['product_id'] = $checkout_ids ?: array();
172
  $outputArray['product_sku'] = $checkout_skus ?: array();
173
  $outputArray['product_name'] = $checkout_names ?: array();
174
+ $outputArray['product_brand'] = $checkout_brands ?: array();
175
  $outputArray['product_category'] = array();
176
  $outputArray['product_quantity'] = $checkout_qtys ?: array();
177
+ $outputArray['product_unit_price'] = $checkout_prices ?: array();
178
+ + $outputArray['product_list_price'] = $checkout_original_prices ?: array();
179
 
180
  $outputArray['product_price'] = $outputArray['product_unit_price'];
181
  $outputArray['product_original_price'] = $outputArray['product_list_price'];
204
  $names[] = $item->getName();
205
  $qtys[] = number_format($item->getQtyOrdered(), 0, ".", "");
206
  $prices[] = number_format($item->getPrice(), 2, ".", "");
207
+ $original_prices[] = number_format($item->getProduct()->getPrice(), 2, ".", "");
208
  $discount = number_format($item->getDiscountAmount(), 2, ".", "");
209
  $discounts[] = $discount;
210
  $applied_rules = explode(",", $item->getAppliedRuleIds());
211
  $discount_object = array();
212
+ $brands[] = $item->getProduct()->getBrand();
213
  foreach ($applied_rules as $rule) {
214
  $quantity = number_format(Mage::getModel('salesrule/rule')->load($rule)->getDiscountQty(), 0, ".", "");
215
  $amount = number_format(Mage::getModel('salesrule/rule')->load($rule)->getDiscountAmount(), 2, ".", "");
245
  $outputArray['product_id'] = $ids ?: array();
246
  $outputArray['product_sku'] = $skus ?: array();
247
  $outputArray['product_name'] = $names ?: array();
248
+ $outputArray['product_brand'] = $brands ?: array();
249
  $outputArray['product_category'] = array();
250
+ $outputArray['product_unit_price'] = $prices ?: array();
251
+ $outputArray['product_list_price'] = $original_prices ?: array();
252
  $outputArray['product_price'] = $outputArray['product_unit_price'];
253
  $outputArray['product_original_price'] = $outputArray['product_list_price'];
254
  $outputArray['product_quantity'] = $qtys ?: array();
package.xml CHANGED
@@ -1,14 +1,15 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tealium_Tags</name>
4
- <version>2.0.3</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>2.0.3 - Fixed warnings for REQUEST isset()&#xD;
 
12
  re-added page_type and page_name for order confirmation&#xD;
13
  2.0.2 - Fix typos&#xD;
14
  2.0.1 - Fix for extended UDO rendering blank page&#xD;
@@ -31,9 +32,9 @@
31
  0.2.0 - fix for product page tag syntax&#xD;
32
  0.1.0 - initial release</notes>
33
  <authors><author><name>Patrick McWilliams</name><user>Tealium</user><email>patrick.mcwilliams@tealium.com</email></author></authors>
34
- <date>2015-05-01</date>
35
- <time>21:31:21</time>
36
- <contents><target name="magelocal"><dir name="Tealium"><dir name="Tags"><dir name="Helper"><file name="Data.php" hash="365fb4cdcd062ea8ff4c283fa0f9f61d"/><file name="Observer.php" hash="a4da187ee890256d09daa97c81a28795"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e6ec5ba973cdb97a9925f02575392865"/><file name="config.xml" hash="022d31160f742934ad5a72a10703415a"/><file name="system.xml" hash="9c36bda7c12499354368fd21535222ec"/></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="f1a764ba60627bbf4b0113c454bb892a"/></dir><dir name="template"><dir name="tealium_tags"><file name="base.phtml" hash="dc238fd913df60276c99a6c198716320"/><file name="catalog_product_compare_index.phtml" hash="2cddf1f61676707e75e8c6a6efa7dd93"/><file name="catalogsearch_advanced_result_index.phtml" hash="55751b56fdb95124e18e28dc22d310cf"/><file name="catalogsearch_result_index.phtml" hash="20534c754c0b52967cede5295925dc2f"/><file name="catalogsearch_term_popular.phtml" hash="31dea56323eb8329c35e9c3f147afca0"/><file name="category.phtml" hash="f6da5b510bac6c9b273de054046aa0e3"/><file name="checkout_cart_index.phtml" hash="6c6df883fb6375f15aa3c3a206026ac0"/><file name="checkout_onepage.phtml" hash="0ccfc96f256b254661dba05321809995"/><file name="checkout_success.phtml" hash="f3f2f13637a56d0193a0a711bdd9cef9"/><file name="cms.phtml" hash="6b22c74137dae766bb518da903629369"/><file name="customer.phtml" hash="9531acc69dbcebf685f54d9f0f3e5f83"/><file name="generic.phtml" hash="e08d99f69ddf6aca7db07e5fed9920d7"/><file name="guest_sales.phtml" hash="2568dbfff3033301e79850d69ac5335a"/><file name="product.phtml" hash="ff43f09465b688ee88e78838b2c7be0a"/><file name="product_send.phtml" hash="56cfd43733fae931410f29bdf8a812cf"/><file name="seo.phtml" hash="733576edcc66d64551afc61f99875c70"/><file name="tag_list_index.phtml" hash="4b234a62599ccaeb0f73d9373cc270b7"/><file name="tag_product_list.phtml" hash="58af545fe5a6dc1185d2507128aa9dbc"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Tealium"><file name="Tealium.php" hash="225ba8d89aa7a90cb21fa8e0473756d9"/><file name="TealiumCustomData.php" hash="c7d066cbf120d79460928872d62f72e1"/><file name="TealiumInit.php" hash="e43b1ca911741abb3f9ac043c1ff5f65"/></dir></target></contents>
37
  <compatible/>
38
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
39
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tealium_Tags</name>
4
+ <version>2.0.4</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>2.0.4 - fixed one page checkout&#xD;
12
+ 2.0.3 - Fixed warnings for REQUEST isset()&#xD;
13
  re-added page_type and page_name for order confirmation&#xD;
14
  2.0.2 - Fix typos&#xD;
15
  2.0.1 - Fix for extended UDO rendering blank page&#xD;
32
  0.2.0 - fix for product page tag syntax&#xD;
33
  0.1.0 - initial release</notes>
34
  <authors><author><name>Patrick McWilliams</name><user>Tealium</user><email>patrick.mcwilliams@tealium.com</email></author></authors>
35
+ <date>2015-05-08</date>
36
+ <time>21:56:03</time>
37
+ <contents><target name="magelocal"><dir name="Tealium"><dir name="Tags"><dir name="Helper"><file name="Data.php" hash="365fb4cdcd062ea8ff4c283fa0f9f61d"/><file name="Observer.php" hash="a4da187ee890256d09daa97c81a28795"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e6ec5ba973cdb97a9925f02575392865"/><file name="config.xml" hash="022d31160f742934ad5a72a10703415a"/><file name="system.xml" hash="9c36bda7c12499354368fd21535222ec"/></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="f1a764ba60627bbf4b0113c454bb892a"/></dir><dir name="template"><dir name="tealium_tags"><file name="base.phtml" hash="dc238fd913df60276c99a6c198716320"/><file name="catalog_product_compare_index.phtml" hash="2cddf1f61676707e75e8c6a6efa7dd93"/><file name="catalogsearch_advanced_result_index.phtml" hash="55751b56fdb95124e18e28dc22d310cf"/><file name="catalogsearch_result_index.phtml" hash="20534c754c0b52967cede5295925dc2f"/><file name="catalogsearch_term_popular.phtml" hash="31dea56323eb8329c35e9c3f147afca0"/><file name="category.phtml" hash="f6da5b510bac6c9b273de054046aa0e3"/><file name="checkout_cart_index.phtml" hash="6c6df883fb6375f15aa3c3a206026ac0"/><file name="checkout_onepage.phtml" hash="db2ba9369a563c2c4ac9e20007fab72f"/><file name="checkout_success.phtml" hash="f3f2f13637a56d0193a0a711bdd9cef9"/><file name="cms.phtml" hash="6b22c74137dae766bb518da903629369"/><file name="customer.phtml" hash="9531acc69dbcebf685f54d9f0f3e5f83"/><file name="generic.phtml" hash="e08d99f69ddf6aca7db07e5fed9920d7"/><file name="guest_sales.phtml" hash="2568dbfff3033301e79850d69ac5335a"/><file name="product.phtml" hash="ff43f09465b688ee88e78838b2c7be0a"/><file name="product_send.phtml" hash="56cfd43733fae931410f29bdf8a812cf"/><file name="seo.phtml" hash="733576edcc66d64551afc61f99875c70"/><file name="tag_list_index.phtml" hash="4b234a62599ccaeb0f73d9373cc270b7"/><file name="tag_product_list.phtml" hash="58af545fe5a6dc1185d2507128aa9dbc"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Tealium"><file name="Tealium.php" hash="225ba8d89aa7a90cb21fa8e0473756d9"/><file name="TealiumCustomData.php" hash="c7d066cbf120d79460928872d62f72e1"/><file name="TealiumInit.php" hash="ff1e1aa076bd1d5e944c47b3e40ce0a6"/></dir></target></contents>
38
  <compatible/>
39
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
40
  </package>