Version Notes
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
Release Info
Developer | Tealium Inc. |
Extension | Tealium_Tags |
Version | 2.0.3 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.0.3
- lib/Tealium/Tealium.php +2 -2
- lib/Tealium/TealiumInit.php +21 -2
- package.xml +7 -5
@@ -69,7 +69,7 @@ class Tealium {
|
|
69 |
}
|
70 |
public function render($type = null, $external = false, $sync = "sync") {
|
71 |
|
72 |
-
if ( !($_REQUEST
|
73 |
$type = "udo";
|
74 |
$is_async = ($sync == "sync") ? "" : "async";
|
75 |
$udo = "<script type=\"text/javascript\" src=\"";
|
@@ -121,7 +121,7 @@ EOD;
|
|
121 |
</script>
|
122 |
<!-- ************************************* -->
|
123 |
EOD;
|
124 |
-
if ($_REQUEST["tealium_api"] && $_REQUEST["tealium_api"] == "true") {
|
125 |
$tag = $insert_tag . "\n//TEALIUM_END\n";
|
126 |
$udo = "//TEALIUM_START\n" . $udoJs;
|
127 |
}
|
69 |
}
|
70 |
public function render($type = null, $external = false, $sync = "sync") {
|
71 |
|
72 |
+
if ( !(isset($_REQUEST["tealium_api"]) && $_REQUEST["tealium_api"] == "true") && $external) {
|
73 |
$type = "udo";
|
74 |
$is_async = ($sync == "sync") ? "" : "async";
|
75 |
$udo = "<script type=\"text/javascript\" src=\"";
|
121 |
</script>
|
122 |
<!-- ************************************* -->
|
123 |
EOD;
|
124 |
+
if (isset($_REQUEST["tealium_api"]) && $_REQUEST["tealium_api"] == "true") {
|
125 |
$tag = $insert_tag . "\n//TEALIUM_END\n";
|
126 |
$udo = "//TEALIUM_START\n" . $udoJs;
|
127 |
}
|
@@ -125,6 +125,9 @@ class TealiumData {
|
|
125 |
$outputArray['product_list_price'] = array();
|
126 |
}
|
127 |
|
|
|
|
|
|
|
128 |
if ( Mage::registry('current_category') ){
|
129 |
if ( Mage::registry('current_category')->getName() ){
|
130 |
$outputArray['product_category'] = array(Mage::registry('current_category')->getName());
|
@@ -170,6 +173,9 @@ class TealiumData {
|
|
170 |
$outputArray['product_quantity'] = $checkout_qtys ?: array();
|
171 |
$outputArray['product_unit_price'] = array();
|
172 |
$outputArray['product_list_price'] = $checkout_prices ?: array();
|
|
|
|
|
|
|
173 |
|
174 |
return $outputArray;
|
175 |
}
|
@@ -178,6 +184,14 @@ class TealiumData {
|
|
178 |
$store = TealiumData::$store;
|
179 |
$page = TealiumData::$page;
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
if (Mage::getModel('sales/order')) {
|
182 |
$order = Mage::getModel('sales/order')->loadByIncrementId($page->getOrderId());
|
183 |
foreach ($order->getAllVisibleItems() as $item) {
|
@@ -209,8 +223,10 @@ class TealiumData {
|
|
209 |
|
210 |
$outputArray = array();
|
211 |
|
212 |
-
$outputArray['site_region'] =
|
213 |
-
|
|
|
|
|
214 |
$outputArray['order_id'] = $order->getIncrementId() ?: "";
|
215 |
$outputArray['order_discount'] = number_format($order->getDiscountAmount(), 2, ".", "") ?: "";
|
216 |
$outputArray['order_subtotal'] = number_format($order->getSubtotal(), 2, ".", "") ?: "";
|
@@ -219,6 +235,7 @@ class TealiumData {
|
|
219 |
$outputArray['order_payment_type'] = $order->getPayment() ? $order->getPayment()->getMethodInstance()->getTitle() : 'unknown';
|
220 |
$outputArray['order_total'] = number_format($order->getGrandTotal(), 2, ".", "") ?: "";
|
221 |
$outputArray['order_currency'] = $order->getOrderCurrencyCode() ?: "";
|
|
|
222 |
$outputArray['customer_email'] = $order->getCustomerEmail() ?: "";
|
223 |
$outputArray['product_id'] = $ids ?: array();
|
224 |
$outputArray['product_sku'] = $skus ?: array();
|
@@ -227,6 +244,8 @@ class TealiumData {
|
|
227 |
$outputArray['product_category'] = array();
|
228 |
$outputArray['product_unit_price'] = array();
|
229 |
$outputArray['product_list_price'] = $prices ?: array();
|
|
|
|
|
230 |
$outputArray['product_quantity'] = $qtys ?: array();
|
231 |
$outputArray['product_discount'] = $discounts ?: array();
|
232 |
$outputArray['product_discounts'] = $discount_quantity ?: array();
|
125 |
$outputArray['product_list_price'] = array();
|
126 |
}
|
127 |
|
128 |
+
$outputArray['product_price'] = $outputArray['product_unit_price'];
|
129 |
+
$outputArray['product_original_price'] = $outputArray['product_list_price'];
|
130 |
+
|
131 |
if ( Mage::registry('current_category') ){
|
132 |
if ( Mage::registry('current_category')->getName() ){
|
133 |
$outputArray['product_category'] = array(Mage::registry('current_category')->getName());
|
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'];
|
179 |
|
180 |
return $outputArray;
|
181 |
}
|
184 |
$store = TealiumData::$store;
|
185 |
$page = TealiumData::$page;
|
186 |
|
187 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
188 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
189 |
+
$customer_id = $customer->getEntityId();
|
190 |
+
$customer_email = $customer->getEmail();
|
191 |
+
$groupId = $customer->getGroupId();
|
192 |
+
$customer_type = Mage::getModel('customer/group')->load($groupId)->getCode();
|
193 |
+
}
|
194 |
+
|
195 |
if (Mage::getModel('sales/order')) {
|
196 |
$order = Mage::getModel('sales/order')->loadByIncrementId($page->getOrderId());
|
197 |
foreach ($order->getAllVisibleItems() as $item) {
|
223 |
|
224 |
$outputArray = array();
|
225 |
|
226 |
+
$outputArray['site_region'] = Mage::app()->getLocale()->getLocaleCode() ?: "";
|
227 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ?: "";
|
228 |
+
$outputArray['page_name'] = "cart success";
|
229 |
+
$outputArray['page_type'] = "cart";
|
230 |
$outputArray['order_id'] = $order->getIncrementId() ?: "";
|
231 |
$outputArray['order_discount'] = number_format($order->getDiscountAmount(), 2, ".", "") ?: "";
|
232 |
$outputArray['order_subtotal'] = number_format($order->getSubtotal(), 2, ".", "") ?: "";
|
235 |
$outputArray['order_payment_type'] = $order->getPayment() ? $order->getPayment()->getMethodInstance()->getTitle() : 'unknown';
|
236 |
$outputArray['order_total'] = number_format($order->getGrandTotal(), 2, ".", "") ?: "";
|
237 |
$outputArray['order_currency'] = $order->getOrderCurrencyCode() ?: "";
|
238 |
+
$outputArray['customer_id'] = $customer_id ?: "";
|
239 |
$outputArray['customer_email'] = $order->getCustomerEmail() ?: "";
|
240 |
$outputArray['product_id'] = $ids ?: array();
|
241 |
$outputArray['product_sku'] = $skus ?: 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();
|
250 |
$outputArray['product_discount'] = $discounts ?: array();
|
251 |
$outputArray['product_discounts'] = $discount_quantity ?: array();
|
@@ -1,14 +1,16 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Tealium_Tags</name>
|
4 |
-
<version>2.0.
|
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.
|
|
|
|
|
12 |
2.0.1 - Fix for extended UDO rendering blank page
|
13 |
2.0.0 - Added external script support and refactored
|
14 |
1.2.0 - Added UI admin toggle for onePage Checkout
|
@@ -29,9 +31,9 @@
|
|
29 |
0.2.0 - fix for product page tag syntax
|
30 |
0.1.0 - initial release</notes>
|
31 |
<authors><author><name>Patrick McWilliams</name><user>Tealium</user><email>patrick.mcwilliams@tealium.com</email></author></authors>
|
32 |
-
<date>2015-
|
33 |
-
<time>
|
34 |
-
<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="
|
35 |
<compatible/>
|
36 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
37 |
</package>
|
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()
|
12 |
+
re-added page_type and page_name for order confirmation
|
13 |
+
2.0.2 - Fix typos
|
14 |
2.0.1 - Fix for extended UDO rendering blank page
|
15 |
2.0.0 - Added external script support and refactored
|
16 |
1.2.0 - Added UI admin toggle for onePage Checkout
|
31 |
0.2.0 - fix for product page tag syntax
|
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>
|