Version Notes
1.0.0 - initial release
Download this release
Release Info
Developer | Tealium Inc. |
Extension | Tealium_Extend |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
app/code/local/Tealium/Extend/Helper/Data.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Tealium_Extend_Helper_Data extends Tealium_Tags_Helper_Data {
|
4 |
+
|
5 |
+
protected $tealium;
|
6 |
+
protected $store;
|
7 |
+
protected $page;
|
8 |
+
|
9 |
+
//@Override
|
10 |
+
public function addCustomDataFromSetup(&$store, $pageType){
|
11 |
+
$data = array (
|
12 |
+
"store" => $this->store,
|
13 |
+
"page" => $this->page
|
14 |
+
);
|
15 |
+
if (Mage::getStoreConfig ( 'tealium_tags/general/udo_enable', $store )) {
|
16 |
+
include_once (__DIR__.'/TealiumCustomData.php');
|
17 |
+
|
18 |
+
if ( function_exists("getCustomUdo") ){
|
19 |
+
$customUdoElements = getCustomUdo();
|
20 |
+
if ( is_array($customUdoElements) && parent::isAssocArray($customUdoElements) ){
|
21 |
+
$udoElements = $customUdoElements;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
elseif (!isset($udoElements) || ( isset($udoElements) && !parent::isAssocArray($udoElements) )){
|
25 |
+
$udoElements = array();
|
26 |
+
}
|
27 |
+
|
28 |
+
if ( isset($udoElements[$pageType]) ){
|
29 |
+
$this->tealium->setCustomUdo($udoElements[$pageType]);
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
}
|
app/code/local/Tealium/Extend/Helper/TealiumCustomData.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class TealiumExtendData {
|
4 |
+
private static $store;
|
5 |
+
private static $page;
|
6 |
+
|
7 |
+
public static function setStore($store){
|
8 |
+
TealiumExtendData::$store = $store;
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function setPage($page){
|
12 |
+
TealiumExtendData::$page = $page;
|
13 |
+
}
|
14 |
+
|
15 |
+
public function getHome(){
|
16 |
+
$store = TealiumExtendData::$store;
|
17 |
+
$page = TealiumExtendData::$page;
|
18 |
+
|
19 |
+
$outputArray = array();
|
20 |
+
//$outputArray['custom_key'] = "value";
|
21 |
+
|
22 |
+
return $outputArray;
|
23 |
+
}
|
24 |
+
|
25 |
+
public function getSearch(){
|
26 |
+
$store = TealiumExtendData::$store;
|
27 |
+
$page = TealiumExtendData::$page;
|
28 |
+
|
29 |
+
$outputArray = array();
|
30 |
+
//$outputArray['custom_key'] = "value";
|
31 |
+
|
32 |
+
return $outputArray;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function getCategory(){
|
36 |
+
$store = TealiumExtendData::$store;
|
37 |
+
$page = TealiumExtendData::$page;
|
38 |
+
|
39 |
+
$outputArray = array();
|
40 |
+
//$outputArray['custom_key'] = "value";
|
41 |
+
|
42 |
+
return $outputArray;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getProductPage(){
|
46 |
+
$store = TealiumExtendData::$store;
|
47 |
+
$page = TealiumExtendData::$page;
|
48 |
+
|
49 |
+
$outputArray = array();
|
50 |
+
//$outputArray['custom_key'] = "value";
|
51 |
+
// make sure any product values are in an array
|
52 |
+
|
53 |
+
return $outputArray;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getCartPage() {
|
57 |
+
$store = TealiumExtendData::$store;
|
58 |
+
$page = TealiumExtendData::$page;
|
59 |
+
|
60 |
+
$outputArray = array();
|
61 |
+
//$outputArray['custom_key'] = "value";
|
62 |
+
// make sure any product values are in an array
|
63 |
+
|
64 |
+
return $outputArray;
|
65 |
+
}
|
66 |
+
|
67 |
+
public function getOrderConfirmation(){
|
68 |
+
$store = TealiumExtendData::$store;
|
69 |
+
$page = TealiumExtendData::$page;
|
70 |
+
|
71 |
+
$outputArray = array();
|
72 |
+
//$outputArray['custom_key'] = "value";
|
73 |
+
// make sure any product values are in an array
|
74 |
+
|
75 |
+
return $outputArray;
|
76 |
+
}
|
77 |
+
|
78 |
+
public function getCustomerData(){
|
79 |
+
$store = TealiumExtendData::$store;
|
80 |
+
$page = TealiumExtendData::$page;
|
81 |
+
|
82 |
+
$outputArray = array();
|
83 |
+
//$outputArray['custom_key'] = "value";
|
84 |
+
|
85 |
+
return $outputArray;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
|
90 |
+
function getCustomUdo(){
|
91 |
+
TealiumExtendData::setStore($data["store"]);
|
92 |
+
TealiumExtendData::setPage($data["page"]);
|
93 |
+
|
94 |
+
$udoElements = array(
|
95 |
+
'Home' => function(){
|
96 |
+
$tealiumData = new TealiumExtendData();
|
97 |
+
return $tealiumData->getHome();
|
98 |
+
},
|
99 |
+
'Search' => function(){
|
100 |
+
$tealiumData = new TealiumExtendData();
|
101 |
+
return $tealiumData->getSearch();
|
102 |
+
},
|
103 |
+
'Category' => function(){
|
104 |
+
$tealiumData = new TealiumExtendData();
|
105 |
+
return $tealiumData->getCategory();
|
106 |
+
},
|
107 |
+
'ProductPage' => function(){
|
108 |
+
$tealiumData = new TealiumExtendData();
|
109 |
+
return $tealiumData->getProductPage();
|
110 |
+
},
|
111 |
+
'Cart' => function(){
|
112 |
+
$tealiumData = new TealiumExtendData();
|
113 |
+
return $tealiumData->getCartPage();
|
114 |
+
},
|
115 |
+
'Confirmation' => function(){
|
116 |
+
$tealiumData = new TealiumExtendData();
|
117 |
+
return $tealiumData->getOrderConfirmation();
|
118 |
+
},
|
119 |
+
'Customer' => function(){
|
120 |
+
$tealiumData = new TealiumExtendData();
|
121 |
+
return $tealiumData->getCustomerData();
|
122 |
+
}
|
123 |
+
);
|
124 |
+
|
125 |
+
return $udoElements;
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
+
?>
|
131 |
+
|
app/code/local/Tealium/Extend/etc/config.xml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<modules>
|
3 |
+
<Tealium_Extend>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
</Tealium_Extend>
|
6 |
+
</modules>
|
7 |
+
<global>
|
8 |
+
<helpers>
|
9 |
+
<tealium_tags>
|
10 |
+
<rewrite>
|
11 |
+
<data>Tealium_Extend_Helper_Data</data>
|
12 |
+
</rewrite>
|
13 |
+
</tealium_tags>
|
14 |
+
<tealium_extend>
|
15 |
+
<class>Tealium_Extend_Helper</class>
|
16 |
+
</tealium_extend>
|
17 |
+
</helpers>
|
18 |
+
</global>
|
19 |
+
</config>
|
app/code/local/Tealium/Extend/etc/system.xml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<tealium_tags translate="label" module="tealium_tags">
|
5 |
+
<groups>
|
6 |
+
<general translate="label">
|
7 |
+
<fields>
|
8 |
+
<udo translate="label">
|
9 |
+
<comment>
|
10 |
+
<![CDATA[<span class="notice"></span>]]>
|
11 |
+
</comment>
|
12 |
+
<label>Custom UDO file path</label>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>16</sort_order>
|
15 |
+
<show_in_default>0</show_in_default>
|
16 |
+
<show_in_website>0</show_in_website>
|
17 |
+
<show_in_store>0</show_in_store>
|
18 |
+
</udo>
|
19 |
+
</fields>
|
20 |
+
</general>
|
21 |
+
</groups>
|
22 |
+
</tealium_tags>
|
23 |
+
</sections>
|
24 |
+
</config>
|
app/etc/modules/Tealium_Extend.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Tealium_Extend>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
<depends>
|
8 |
+
<Tealium_Tags/>
|
9 |
+
</depends>
|
10 |
+
</Tealium_Extend>
|
11 |
+
</modules>
|
12 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Tealium_Extend</name>
|
4 |
+
<version>1.0.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 Custom Data for Tealium Tags Module</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>1.0.0 - initial release</notes>
|
12 |
+
<authors><author><name>Patrick McWilliams</name><user>Tealium</user><email>patrick.mcwilliams@tealium.com</email></author></authors>
|
13 |
+
<date>2015-02-19</date>
|
14 |
+
<time>04:17:05</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Tealium"><dir name="Extend"><dir name="Helper"><file name="Data.php" hash="7dd8fdb8c04bf51546ba910b0864aa14"/><file name="TealiumCustomData.php" hash="84011e774a9ac40f5a0e70495bc835d1"/></dir><dir name="etc"><file name="config.xml" hash="62a1126187b92611dd7a8970cdeb202a"/><file name="system.xml" hash="59b7b2f5df0d9ba3b6cded885d55df5d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tealium_Extend.xml" hash="1002be213b286213b632ba2227e17471"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Tealium_Tags</name><channel>community</channel><min></min><max></max></package></required></dependencies>
|
18 |
+
</package>
|