Version Notes
First Version
Download this release
Release Info
Developer | Cristian Darie |
Extension | Pleisty |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- app/code/community/F5/Pleisty/etc/adminhtml.xml +24 -0
- app/code/community/F5/Pleisty/etc/config.xml +28 -0
- app/code/community/F5/Pleisty/etc/system.xml +131 -0
- app/design/adminhtml/default/default/layout/pleisty.xml +16 -0
- app/design/adminhtml/default/default/template/pleisty/pleisty.phtml +93 -0
- app/design/frontend/base/default/layout/pleisty.xml +13 -0
- app/design/frontend/base/default/template/pleisty/pleisty.phtml +223 -0
- app/etc/modules/F5_Pleisty.xml +10 -0
- package.xml +18 -0
app/code/community/F5/Pleisty/etc/adminhtml.xml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<tab1>
|
12 |
+
<title translate="title" >Pleisty</title>
|
13 |
+
<sort_order>0</sort_order>
|
14 |
+
<!-- Used in resources tree -->
|
15 |
+
</tab1>
|
16 |
+
</children>
|
17 |
+
</config>
|
18 |
+
</children>
|
19 |
+
</system>
|
20 |
+
</children>
|
21 |
+
</admin>
|
22 |
+
</resources>
|
23 |
+
</acl>
|
24 |
+
</config>
|
app/code/community/F5/Pleisty/etc/config.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<F5_Pleisty>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</F5_Pleisty>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<adminhtml>
|
10 |
+
<layout>
|
11 |
+
<updates>
|
12 |
+
<pleisty>
|
13 |
+
<file>pleisty.xml</file>
|
14 |
+
</pleisty>
|
15 |
+
</updates>
|
16 |
+
</layout>
|
17 |
+
</adminhtml>
|
18 |
+
<frontend>
|
19 |
+
|
20 |
+
<layout>
|
21 |
+
<updates>
|
22 |
+
<pleisty>
|
23 |
+
<file>pleisty.xml</file>
|
24 |
+
</pleisty>
|
25 |
+
</updates>
|
26 |
+
</layout>
|
27 |
+
</frontend>
|
28 |
+
</config>
|
app/code/community/F5/Pleisty/etc/system.xml
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<tracker>
|
5 |
+
<label>Pleisty</label>
|
6 |
+
|
7 |
+
</tracker>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<tab1 translate="label">
|
11 |
+
<label>Tracker Setup</label>
|
12 |
+
<tab>tracker</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>0</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
|
20 |
+
<general translate="label">
|
21 |
+
<label>General</label>
|
22 |
+
<frontend_type>text</frontend_type>
|
23 |
+
<sort_order>1</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>0</show_in_website>
|
26 |
+
<show_in_store>0</show_in_store>
|
27 |
+
<fields>
|
28 |
+
<shop_id translate="label">
|
29 |
+
<label>Shop ID</label>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>0</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
|
35 |
+
</shop_id>
|
36 |
+
<customer_tracking translate="label">
|
37 |
+
<label>Customer Tracking</label>
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
40 |
+
<sort_order>1</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
|
43 |
+
|
44 |
+
</customer_tracking >
|
45 |
+
<product translate="label">
|
46 |
+
<label>Product Tracking</label>
|
47 |
+
<frontend_type>select</frontend_type>
|
48 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
49 |
+
<sort_order>2</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
|
53 |
+
</product >
|
54 |
+
|
55 |
+
<product_listing translate="label">
|
56 |
+
<label>Product Listing</label>
|
57 |
+
<frontend_type>select</frontend_type>
|
58 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
59 |
+
<sort_order>3</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
|
63 |
+
</product_listing >
|
64 |
+
|
65 |
+
<shopping_cart translate="label">
|
66 |
+
<label>Shopping Cart</label>
|
67 |
+
<frontend_type>select</frontend_type>
|
68 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
69 |
+
<sort_order>4</sort_order>
|
70 |
+
<show_in_default>1</show_in_default>
|
71 |
+
<show_in_website>1</show_in_website>
|
72 |
+
|
73 |
+
</shopping_cart >
|
74 |
+
<wishlist_tracking translate="label">
|
75 |
+
<label>Wishlist Tracking</label>
|
76 |
+
<frontend_type>select</frontend_type>
|
77 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
78 |
+
<sort_order>5</sort_order>
|
79 |
+
<show_in_default>1</show_in_default>
|
80 |
+
<show_in_website>1</show_in_website>
|
81 |
+
|
82 |
+
</wishlist_tracking>
|
83 |
+
<!-- <checkout_process_tracking translate="label">
|
84 |
+
<label>Checkout Process Tracking</label>
|
85 |
+
<frontend_type>select</frontend_type>
|
86 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
87 |
+
<sort_order>0</sort_order>
|
88 |
+
<show_in_default>1</show_in_default>
|
89 |
+
<show_in_website>1</show_in_website>
|
90 |
+
<show_in_store>1</show_in_store>
|
91 |
+
</checkout_process_tracking > -->
|
92 |
+
|
93 |
+
<checkout_finalized translate="label">
|
94 |
+
<label>Checkout Finalized Tracking</label>
|
95 |
+
<frontend_type>select</frontend_type>
|
96 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
97 |
+
<sort_order>6</sort_order>
|
98 |
+
<show_in_default>1</show_in_default>
|
99 |
+
<show_in_website>1</show_in_website>
|
100 |
+
|
101 |
+
</checkout_finalized>
|
102 |
+
<!--
|
103 |
+
<pseudo_checkout translate="label">
|
104 |
+
<label>Pseudo Checkout </label>
|
105 |
+
<frontend_type>select</frontend_type>
|
106 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
107 |
+
<sort_order>0</sort_order>
|
108 |
+
<show_in_default>1</show_in_default>
|
109 |
+
<show_in_website>1</show_in_website>
|
110 |
+
<show_in_store>1</show_in_store>
|
111 |
+
</pseudo_checkout> -->
|
112 |
+
|
113 |
+
<other_content translate="label">
|
114 |
+
<label>Other Content </label>
|
115 |
+
<frontend_type>select</frontend_type>
|
116 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
117 |
+
<sort_order>7</sort_order>
|
118 |
+
<show_in_default>1</show_in_default>
|
119 |
+
<show_in_website>1</show_in_website>
|
120 |
+
|
121 |
+
</other_content>
|
122 |
+
</fields>
|
123 |
+
|
124 |
+
</general>
|
125 |
+
|
126 |
+
|
127 |
+
</groups>
|
128 |
+
</tab1>
|
129 |
+
|
130 |
+
</sections>
|
131 |
+
</config>
|
app/design/adminhtml/default/default/layout/pleisty.xml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
|
4 |
+
<default>
|
5 |
+
|
6 |
+
<reference name="before_body_end">
|
7 |
+
<!-- ... another sub block ... -->
|
8 |
+
<block type="page/html" name="pleisty_javascript" template="pleisty/pleisty.phtml" />
|
9 |
+
</reference>
|
10 |
+
|
11 |
+
</default>
|
12 |
+
|
13 |
+
</layout>
|
14 |
+
|
15 |
+
|
16 |
+
|
app/design/adminhtml/default/default/template/pleisty/pleisty.phtml
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style type="text/css">
|
2 |
+
|
3 |
+
#row_tab1_general_shop_id
|
4 |
+
.scope-label{
|
5 |
+
display:none;
|
6 |
+
}
|
7 |
+
#row_tab1_general_customer_tracking
|
8 |
+
.scope-label{
|
9 |
+
display:none;
|
10 |
+
}
|
11 |
+
#row_tab1_general_product_listing
|
12 |
+
.scope-label{
|
13 |
+
display:none;
|
14 |
+
}
|
15 |
+
#row_tab1_general_shopping_cart
|
16 |
+
.scope-label{
|
17 |
+
display:none;
|
18 |
+
}
|
19 |
+
#row_tab1_general_wishlist_tracking
|
20 |
+
.scope-label{
|
21 |
+
display:none;
|
22 |
+
}
|
23 |
+
#row_tab1_general_checkout_process_tracking
|
24 |
+
.scope-label{
|
25 |
+
display:none;
|
26 |
+
}
|
27 |
+
#row_tab1_general_checkout_finalized
|
28 |
+
.scope-label{
|
29 |
+
display:none;
|
30 |
+
}
|
31 |
+
#row_tab1_general_product
|
32 |
+
.scope-label{
|
33 |
+
display:none;
|
34 |
+
}
|
35 |
+
#row_tab1_general_other_content
|
36 |
+
.scope-label{
|
37 |
+
display:none;
|
38 |
+
}
|
39 |
+
|
40 |
+
</style>
|
41 |
+
|
42 |
+
<?php
|
43 |
+
$shop_id = Mage::getStoreConfig('tab1/general/shop_id');
|
44 |
+
$customer_tracking = Mage::getStoreConfig('tab1/general/customer_tracking');
|
45 |
+
$product = Mage::getStoreConfig('tab1/general/product');
|
46 |
+
$product_listing = Mage::getStoreConfig('tab1/general/product_listing');
|
47 |
+
$shopping_cart = Mage::getStoreConfig('tab1/general/shopping_cart');
|
48 |
+
$wishlist_tracking = Mage::getStoreConfig('tab1/general/wishlist_tracking');
|
49 |
+
$checkout_process_tracking = Mage::getStoreConfig('tab1/general/checkout_process_tracking');
|
50 |
+
$checkout_finalized = Mage::getStoreConfig('tab1/general/checkout_finalized');
|
51 |
+
$other_content = Mage::getStoreConfig('tab1/general/other_content');
|
52 |
+
if($shop_id==''&& $customer_tracking==''&& $product=='' && $product_listing==''&& $shopping_cart==''&& $wishlist_tracking==''&& $checkout_finalized=='' && $other_content==''){
|
53 |
+
|
54 |
+
$config = array(
|
55 |
+
array(
|
56 |
+
'path' => 'tab1/general/customer_tracking',
|
57 |
+
'value' => '1',
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'path' => 'tab1/general/product',
|
61 |
+
'value' => '1',
|
62 |
+
),
|
63 |
+
array(
|
64 |
+
'path' => 'tab1/general/product_listing',
|
65 |
+
'value' => '1',
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'path' => 'tab1/general/shopping_cart',
|
69 |
+
'value' => '1',
|
70 |
+
),
|
71 |
+
array(
|
72 |
+
'path' => 'tab1/general/wishlist_tracking',
|
73 |
+
'value' => '1',
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'path' => 'tab1/general/checkout_finalized',
|
77 |
+
'value' => '1',
|
78 |
+
),
|
79 |
+
array(
|
80 |
+
'path' => 'tab1/general/other_content',
|
81 |
+
'value' => '1',
|
82 |
+
),
|
83 |
+
);
|
84 |
+
|
85 |
+
foreach ($config as $item) {
|
86 |
+
$setup = new Mage_Core_Model_Config();
|
87 |
+
$setup->saveConfig($item['path'], $item['value'], 'default', 0);
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
|
93 |
+
}
|
app/design/frontend/base/default/layout/pleisty.xml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
|
4 |
+
<default>
|
5 |
+
<reference name="head">
|
6 |
+
<!-- ... another sub block ... -->
|
7 |
+
<block type="page/html" name="pleisty_javascript" template="pleisty/pleisty.phtml" />
|
8 |
+
</reference>
|
9 |
+
|
10 |
+
</default>
|
11 |
+
|
12 |
+
</layout>
|
13 |
+
|
app/design/frontend/base/default/template/pleisty/pleisty.phtml
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$shop_id = Mage::getStoreConfig('tab1/general/shop_id');
|
3 |
+
$customer_tracking = Mage::getStoreConfig('tab1/general/customer_tracking');
|
4 |
+
$product = Mage::getStoreConfig('tab1/general/product');
|
5 |
+
$product_listing = Mage::getStoreConfig('tab1/general/product_listing');
|
6 |
+
$shopping_cart = Mage::getStoreConfig('tab1/general/shopping_cart');
|
7 |
+
$wishlist_tracking = Mage::getStoreConfig('tab1/general/wishlist_tracking');
|
8 |
+
$checkout_process_tracking = Mage::getStoreConfig('tab1/general/checkout_process_tracking');
|
9 |
+
$checkout_finalized = Mage::getStoreConfig('tab1/general/checkout_finalized');
|
10 |
+
$other_content = Mage::getStoreConfig('tab1/general/other_content');
|
11 |
+
|
12 |
+
//echo $checkout_finalized;
|
13 |
+
$page_type=Mage::app()->getFrontController()->getAction()->getFullActionName();
|
14 |
+
//echo $page_type;
|
15 |
+
switch ($page_type) {
|
16 |
+
case 'catalog_category_view': $pagetype='product_listing';break;
|
17 |
+
case 'cms_page_view': $pagetype='other_content';break;
|
18 |
+
case 'cms_index_index': $pagetype='homepage';break;
|
19 |
+
case 'catalog_product_view': $pagetype='product';break;
|
20 |
+
case 'checkout_cart_index': $pagetype='shopping_cart';break;
|
21 |
+
case 'checkout_onepage_success': $pagetype='checkout_finalized';break;
|
22 |
+
default:$pagetype='';break;
|
23 |
+
}
|
24 |
+
|
25 |
+
//Base Code Start
|
26 |
+
if($shop_id!='') { ?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
(function() {
|
29 |
+
var site_hash = '<?php echo $shop_id;?>';
|
30 |
+
var domain = "pleisty.com";
|
31 |
+
var ldr = document.createElement('script');
|
32 |
+
ldr.type = 'text/javascript'; ldr.async = true;
|
33 |
+
|
34 |
+
ldr.src = document.location.protocol + '//tr-' +
|
35 |
+
site_hash.substr(2) + '.' + domain + '/tracker/load/' +
|
36 |
+
site_hash + '/tracker.js?_=' + (+new Date);
|
37 |
+
|
38 |
+
var s = document.getElementsByTagName('script')[0];
|
39 |
+
s.parentNode.insertBefore(ldr, s);
|
40 |
+
})();
|
41 |
+
</script>
|
42 |
+
<script>
|
43 |
+
var _pleistyq = _pleistyq || [];
|
44 |
+
_pleistyq.push(['page_type', '<?php echo $pagetype; ?>']);
|
45 |
+
</script>
|
46 |
+
<?php }
|
47 |
+
//Base Code End
|
48 |
+
//Customer Info Tracking Start.
|
49 |
+
?>
|
50 |
+
<?php
|
51 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn() && $customer_tracking=='1') {
|
52 |
+
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
53 |
+
$customer_id = $customerData->getId();
|
54 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
55 |
+
$customerData = Mage::getModel('customer/customer')->load($customer->getId())->getData();
|
56 |
+
Mage::log($customerData);
|
57 |
+
|
58 |
+
$customer_id=$customerData['entity_id'];
|
59 |
+
$customer_website_id=$customerData['website_id'];
|
60 |
+
$customer_email=$customerData['email'];
|
61 |
+
$customer_is_active=$customerData['is_active'];
|
62 |
+
$customer_firstname =$customerData['firstname'];
|
63 |
+
$customer_lastname =$customerData['lastname'];
|
64 |
+
$customer_middlename = $customerData['middlename'];
|
65 |
+
|
66 |
+
?>
|
67 |
+
<script>
|
68 |
+
var _pleistyq = _pleistyq || [];
|
69 |
+
_pleistyq.push(['customer_id','<?php echo $customer_id;?>']);
|
70 |
+
_pleistyq.push(['customer_logged', 'true']);
|
71 |
+
var _pleistyq = _pleistyq || [];
|
72 |
+
_pleistyq.push(["custom_event","identify",{
|
73 |
+
"customer_id": "<?php echo $customer_id ;?>",
|
74 |
+
"email": "<?php echo $customer_email ;?>",
|
75 |
+
"first_name": "<?php echo $customer_firstname;?>",
|
76 |
+
"last_name": "<?php echo $customer_lastname ;?>",
|
77 |
+
"name": "<?php echo $customer_firstname.' '.$customer_lastname;?>",
|
78 |
+
"is_active": "<?php echo $customer_is_active;?>",
|
79 |
+
}]);
|
80 |
+
</script>
|
81 |
+
|
82 |
+
<?php } else { ?>
|
83 |
+
|
84 |
+
<script>
|
85 |
+
var _pleistyq = _pleistyq || [];
|
86 |
+
_pleistyq.push(['customer_logged', 'false']);
|
87 |
+
</script>
|
88 |
+
|
89 |
+
<?php }
|
90 |
+
//Customer Info Tracking End.
|
91 |
+
?>
|
92 |
+
|
93 |
+
<?php
|
94 |
+
//Cart Info Tracking Start.
|
95 |
+
|
96 |
+
if($shopping_cart=='1' && $page_type == 'checkout_cart_index') {
|
97 |
+
$items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();
|
98 |
+
if(count($items))
|
99 |
+
{
|
100 |
+
?>
|
101 |
+
|
102 |
+
<script>
|
103 |
+
var _pleistyq = _pleistyq || [];
|
104 |
+
_pleistyq.push(['cart', [
|
105 |
+
<?php
|
106 |
+
foreach($items as $item) {
|
107 |
+
echo "{";
|
108 |
+
$my_product = Mage::getModel('catalog/product')->load($item->getProductId());
|
109 |
+
echo "'url': '".$my_product->getProductUrl()."',";
|
110 |
+
echo "'item_id': '".$item->getProductId()."',";
|
111 |
+
echo "'qty': '".$item->getQty()."',";
|
112 |
+
echo "'price': '".$item->getPrice()."'";
|
113 |
+
echo "},";
|
114 |
+
}
|
115 |
+
?>
|
116 |
+
]]);
|
117 |
+
</script>
|
118 |
+
|
119 |
+
<?php } else { ?>
|
120 |
+
|
121 |
+
<script>
|
122 |
+
var _pleistyq = _pleistyq || [];
|
123 |
+
_pleistyq.push(['cart', []]);
|
124 |
+
</script>
|
125 |
+
|
126 |
+
<?php } }
|
127 |
+
//Cart Info Tracking End.
|
128 |
+
//Product Info Tracking Start.
|
129 |
+
if($page_type == 'catalog_product_view' && $product=='1') {
|
130 |
+
?>
|
131 |
+
|
132 |
+
<script>
|
133 |
+
var _pleistyq = _pleistyq || [];
|
134 |
+
_pleistyq.push(['product_id', '<?php echo Mage::registry('current_product')->getId(); ?>']);
|
135 |
+
</script>
|
136 |
+
|
137 |
+
<?php }
|
138 |
+
|
139 |
+
//Product Info Tracking End.
|
140 |
+
|
141 |
+
//Category Info Tracking Start.
|
142 |
+
if($page_type == 'catalog_category_view' && $product_listing=='1') {
|
143 |
+
?>
|
144 |
+
|
145 |
+
<script>
|
146 |
+
var _pleistyq = _pleistyq || [];
|
147 |
+
_pleistyq.push(['cat', '<?php echo Mage::registry('current_category')->getName(); ?>']);
|
148 |
+
</script>
|
149 |
+
|
150 |
+
<?php } //Category Info Tracking Start.
|
151 |
+
|
152 |
+
if($page_type == 'wishlist_index_index' && $wishlist_tracking=='1') {
|
153 |
+
?>
|
154 |
+
|
155 |
+
<?php
|
156 |
+
//Wishlist Info Tracking End.
|
157 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
158 |
+
if($customer->getId()) {
|
159 |
+
$wishlist = Mage::getModel('wishlist/wishlist')->loadByCustomer($customer, true);
|
160 |
+
$wishListItemCollection = $wishlist->getItemCollection();
|
161 |
+
?>
|
162 |
+
|
163 |
+
<script>
|
164 |
+
_pleistyq.push(['wishlist',{
|
165 |
+
'wishlist_id': 'wishlist', // An identifier for the wishlist, ex. "Favorites"
|
166 |
+
'items':
|
167 |
+
[
|
168 |
+
<?php
|
169 |
+
foreach($wishListItemCollection as $item) {
|
170 |
+
echo "{";
|
171 |
+
$my_product = Mage::getModel('catalog/product')->load($item->getProductId());
|
172 |
+
echo "'url': '".$my_product->getProductUrl()."',";
|
173 |
+
echo "'item_id': '".$item->getProductId()."',";
|
174 |
+
echo "'qty': '".$item->getQty()."',";
|
175 |
+
echo "'price': '".$item->getPrice()."'";
|
176 |
+
echo "},";
|
177 |
+
}
|
178 |
+
?>
|
179 |
+
]
|
180 |
+
}]);
|
181 |
+
</script>
|
182 |
+
<?php } ?>
|
183 |
+
<?php } //Wishlist Info Tracking End. ?>
|
184 |
+
|
185 |
+
<?php
|
186 |
+
if($page_type=='checkout_onepage_success' && $checkout_finalized=='1') {
|
187 |
+
|
188 |
+
$_customerId = Mage::getSingleton('customer/session')->getCustomerId();
|
189 |
+
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
190 |
+
$order = Mage::getSingleton('sales/order');
|
191 |
+
$order->load($lastOrderId);
|
192 |
+
$_totalData =$order->getData();
|
193 |
+
$_sub = $_totalData['subtotal'];
|
194 |
+
$_order = $this->getOrder();
|
195 |
+
$allitems = $order->getAllItems();
|
196 |
+
?>
|
197 |
+
<script>
|
198 |
+
|
199 |
+
// Please add this script to your checkout-finalized pages
|
200 |
+
var _pleistyq = _pleistyq || [];
|
201 |
+
_pleistyq.push(['checkout_finalized',{
|
202 |
+
'transaction_id': '<?php echo $order->getIncrementId(); ?>', // Transaction ID
|
203 |
+
'total': '<?php echo $_sub; ?>', // Total amount of the finalized transaction
|
204 |
+
'items':
|
205 |
+
[
|
206 |
+
<?php
|
207 |
+
foreach($allitems as $item) {
|
208 |
+
echo "{";
|
209 |
+
$my_product = Mage::getModel('catalog/product')->load($item->getProductId());
|
210 |
+
echo "'url': '".$my_product->getProductUrl()."',";
|
211 |
+
echo "'item_id': '".$item->getProductId()."',";
|
212 |
+
echo "'qty': '".$item->getQty()."',";
|
213 |
+
echo "'price': '".$item->getPrice()."'";
|
214 |
+
echo "},";
|
215 |
+
}
|
216 |
+
?>
|
217 |
+
]
|
218 |
+
}]);
|
219 |
+
</script>
|
220 |
+
<?php }
|
221 |
+
//Checkout Finalized Info Tracking End.
|
222 |
+
?>
|
223 |
+
|
app/etc/modules/F5_Pleisty.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<F5_Pleisty>
|
5 |
+
<!-- This activates the module, flip to false to deactivate -->
|
6 |
+
<active>true</active>
|
7 |
+
<codePool>community</codePool><!-- Remember we talked about code pools -->
|
8 |
+
</F5_Pleisty>
|
9 |
+
</modules>
|
10 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Pleisty</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Web and Email Personalization and Marketing Automation Platform</summary>
|
10 |
+
<description>Deploy AI-powered product marketing in minutes</description>
|
11 |
+
<notes>First Version</notes>
|
12 |
+
<authors><author><name>Cristian Darie</name><user>cristiandarie</user><email>cristian.darie@pleisty.com</email></author></authors>
|
13 |
+
<date>2016-12-17</date>
|
14 |
+
<time>23:25:55</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="F5"><dir name="Pleisty"><dir name="etc"><file name="adminhtml.xml" hash="752d8ed736a2a0eb3cc9a7e3f3029f0e"/><file name="config.xml" hash="40f0ffafb12c4913179b0fe0cf41991f"/><file name="system.xml" hash="56f06fbd410c9a6596384a0433bac803"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="F5_Pleisty.xml" hash="e797718b5f3928eba82e8fa84207328a"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pleisty.xml" hash="21ef71a2ed057a59802db10628439afd"/></dir><dir name="template"><dir name="pleisty"><file name="pleisty.phtml" hash="0932e062e65bea0eb3d30c5baa2254a3"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pleisty.xml" hash="87976e4d2d929521b85e115214d855b7"/></dir><dir name="template"><dir name="pleisty"><file name="pleisty.phtml" hash="7e0a62b259cee74f2290387a1030df11"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.0.0</min><max>7.0.8</max></php></required></dependencies>
|
18 |
+
</package>
|