Converdo_Analytics - Version 2.0.0.0

Version Notes

Rewrite

Download this release

Release Info

Developer Roeland van Oostenbrugge
Extension Converdo_Analytics
Version 2.0.0.0
Comparing to
See all releases


Code changes from version 1.2.5.0 to 2.0.0.0

Files changed (68) hide show
  1. app/code/community/Converdo/Analytics/Block/Tracker.php +18 -72
  2. app/code/community/Converdo/Analytics/Helper/Data.php +12 -0
  3. app/code/community/Converdo/Analytics/etc/config.xml +1 -1
  4. app/design/adminhtml/default/default/layout/converdoanalytics.xml +12 -0
  5. app/design/frontend/base/default/template/analytics/analytics.phtml +13 -13
  6. lib/Converdo/Analytics/Models/CategoryView.php +56 -0
  7. lib/Converdo/Analytics/Models/Configuration.php +170 -0
  8. lib/Converdo/Analytics/Models/EcommerceCartUpdate.php +46 -0
  9. lib/Converdo/Analytics/Models/EcommerceOrder.php +158 -0
  10. lib/Converdo/Analytics/Models/EcommerceProduct.php +159 -0
  11. lib/Converdo/Analytics/Models/EcommerceView.php +341 -0
  12. lib/Converdo/Analytics/Models/PageView.php +18 -0
  13. lib/Converdo/Analytics/Models/SearchView.php +103 -0
  14. lib/Converdo/Analytics/Support/AbstractTracker.php +31 -0
  15. lib/Converdo/Analytics/Support/Arrayable.php +14 -0
  16. lib/Converdo/{Support → Analytics/Support}/Crypt.php +1 -1
  17. lib/Converdo/Analytics/Support/HoldsAttributes.php +14 -0
  18. lib/Converdo/Analytics/Tracker.php +200 -0
  19. lib/Converdo/Analytics/Trackers/Cart.php +67 -0
  20. lib/Converdo/Analytics/Trackers/CategoryView.php +40 -0
  21. lib/Converdo/Analytics/Trackers/Configuration.php +38 -0
  22. lib/Converdo/Analytics/Trackers/EcommerceView.php +59 -0
  23. lib/Converdo/Analytics/Trackers/Options.php +43 -0
  24. lib/Converdo/Analytics/Trackers/Order.php +77 -0
  25. lib/Converdo/{Tracker/Processor/PageViewProcessor.php → Analytics/Trackers/PageView.php} +25 -11
  26. lib/Converdo/Analytics/Trackers/SearchView.php +49 -0
  27. lib/Converdo/Entity/AbstractEntity.php +0 -6
  28. lib/Converdo/Entity/Interface/EntityInterface.php +0 -6
  29. lib/Converdo/Entity/Interface/ProductInterface.php +0 -137
  30. lib/Converdo/Entity/Product.php +0 -214
  31. lib/Converdo/Support/QueryParser.php +0 -92
  32. lib/Converdo/Support/QueryType.php +0 -49
  33. lib/Converdo/Support/StringBuilder.php +0 -170
  34. lib/Converdo/Tracker/Page/AbstractPage.php +0 -31
  35. lib/Converdo/Tracker/Page/Cart.php +0 -31
  36. lib/Converdo/Tracker/Page/Category.php +0 -31
  37. lib/Converdo/Tracker/Page/Checkout.php +0 -32
  38. lib/Converdo/Tracker/Page/Contact.php +0 -31
  39. lib/Converdo/Tracker/Page/Customer.php +0 -45
  40. lib/Converdo/Tracker/Page/Homepage.php +0 -31
  41. lib/Converdo/Tracker/Page/Product.php +0 -31
  42. lib/Converdo/Tracker/Page/Search.php +0 -34
  43. lib/Converdo/Tracker/Processor/AbstractProcessor.php +0 -76
  44. lib/Converdo/Tracker/Processor/CartProcessor.php +0 -49
  45. lib/Converdo/Tracker/Processor/CategoryViewProcessor.php +0 -26
  46. lib/Converdo/Tracker/Processor/CheckoutProcessor.php +0 -62
  47. lib/Converdo/Tracker/Processor/CustomUrlProcessor.php +0 -81
  48. lib/Converdo/Tracker/Processor/CustomVariableProcessor.php +0 -35
  49. lib/Converdo/Tracker/Processor/FootProcessor.php +0 -15
  50. lib/Converdo/Tracker/Processor/HeadProcessor.php +0 -14
  51. lib/Converdo/Tracker/Processor/Interface/ProcessorInterface.php +0 -19
  52. lib/Converdo/Tracker/Processor/ProductViewProcessor.php +0 -124
  53. lib/Converdo/Tracker/Query/AbstractQuery.php +0 -38
  54. lib/Converdo/Tracker/Query/CategoryView.php +0 -35
  55. lib/Converdo/Tracker/Query/CustomUrl.php +0 -32
  56. lib/Converdo/Tracker/Query/CustomVariable.php +0 -33
  57. lib/Converdo/Tracker/Query/EcommerceCartUpdate.php +0 -33
  58. lib/Converdo/Tracker/Query/EcommerceItem.php +0 -40
  59. lib/Converdo/Tracker/Query/EcommerceTracking.php +0 -22
  60. lib/Converdo/Tracker/Query/HeartBeat.php +0 -21
  61. lib/Converdo/Tracker/Query/Interface/QueryInterface.php +0 -26
  62. lib/Converdo/Tracker/Query/LinkTracking.php +0 -21
  63. lib/Converdo/Tracker/Query/PageTracking.php +0 -21
  64. lib/Converdo/Tracker/Query/PageView.php +0 -33
  65. lib/Converdo/Tracker/Query/ProductView.php +0 -35
  66. lib/Converdo/Tracker/Query/SiteId.php +0 -32
  67. lib/Converdo/Tracker/Query/TrackerUrl.php +0 -32
  68. package.xml +5 -5
app/code/community/Converdo/Analytics/Block/Tracker.php CHANGED
@@ -7,11 +7,6 @@ class Converdo_Analytics_Block_Tracker extends Mage_Core_Block_Template
7
  */
8
  protected $orderedIds = [];
9
 
10
- /**
11
- * @var array
12
- */
13
- public $configuration = [];
14
-
15
  /**
16
  * Render Converdo tracking scripts
17
  *
@@ -19,81 +14,32 @@ class Converdo_Analytics_Block_Tracker extends Mage_Core_Block_Template
19
  */
20
  protected function trackers()
21
  {
22
- if (!Mage::helper('analytics')->isEnabled()) {
23
  return null;
24
  }
25
 
26
- foreach (Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems() as $productId) {
27
- $this->addOrderedId($productId->getProductId());
28
- }
29
-
30
- $processors[] = new Converdo_Tracker_Processor_HeadProcessor;
31
- $processors[] = new Converdo_Tracker_Processor_CartProcessor;
32
- $processors[] = new Converdo_Tracker_Processor_CheckoutProcessor;
33
- $processors[] = new Converdo_Tracker_Processor_ProductViewProcessor;
34
- $processors[] = new Converdo_Tracker_Processor_CustomUrlProcessor;
35
- $processors[] = new Converdo_Tracker_Processor_CategoryViewProcessor;
36
- $processors[] = new Converdo_Tracker_Processor_PageViewProcessor;
37
- $processors[] = new Converdo_Tracker_Processor_FootProcessor;
38
-
39
- foreach ($processors as $key => $processor) {
40
- if (!($processor->responsible($this))) {
41
  continue;
42
  }
43
 
44
- $processor->process($this);
45
-
46
- if ($processor->hasConfiguration()) {
47
- $this->configuration = array_merge($this->configuration, $processor->getConfiguration());
48
- }
49
 
50
- if ($key === count($processors) - 2) {
51
- $customVariables = new Converdo_Tracker_Processor_CustomVariableProcessor;
52
- $customVariables->responsible($this);
53
- $customVariables->process();
54
- }
55
  }
56
-
57
- echo Converdo_Support_QueryParser::parse();
58
- }
59
-
60
- /**
61
- * Set the ordered ids.
62
- *
63
- * @param array $orderedIds
64
- */
65
- public function setOrderedIds(array $orderedIds = [])
66
- {
67
- $this->orderedIds = $orderedIds;
68
- }
69
 
70
- /**
71
- * Add an order id.
72
- *
73
- * @param array $id
74
- */
75
- public function addOrderedId($id)
76
- {
77
- $this->orderedIds[] = $id;
78
- }
79
-
80
- /**
81
- * Get the ordered ids.
82
- *
83
- * @return array
84
- */
85
- public function getOrderedIds()
86
- {
87
- return (array) $this->orderedIds;
88
- }
89
-
90
- /**
91
- * Get whether the ordered ids are set.
92
- *
93
- * @return bool
94
- */
95
- public function hasOrderedIds()
96
- {
97
- return (bool) is_array($this->orderedIds) && count($this->orderedIds);
98
  }
99
  }
7
  */
8
  protected $orderedIds = [];
9
 
 
 
 
 
 
10
  /**
11
  * Render Converdo tracking scripts
12
  *
14
  */
15
  protected function trackers()
16
  {
17
+ if (! Mage::helper('analytics')->isEnabled()) {
18
  return null;
19
  }
20
 
21
+ $trackers = [
22
+ new Converdo_Analytics_Trackers_Configuration(),
23
+ new Converdo_Analytics_Trackers_PageView(),
24
+ new Converdo_Analytics_Trackers_SearchView(),
25
+ new Converdo_Analytics_Trackers_EcommerceView(),
26
+ new Converdo_Analytics_Trackers_CategoryView(),
27
+ new Converdo_Analytics_Trackers_Cart(),
28
+ new Converdo_Analytics_Trackers_Order(),
29
+ new Converdo_Analytics_Trackers_Options(),
30
+ ];
31
+
32
+ foreach ($trackers as $tracker) {
33
+ if (! $tracker->responsible()) {
 
 
34
  continue;
35
  }
36
 
37
+ $tracker->track();
 
 
 
 
38
 
39
+ Converdo_Analytics_Tracker::attributes($tracker->attributes());
40
+ Converdo_Analytics_Tracker::query($tracker->toArray());
 
 
 
41
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
+ echo implode("\r\n\t\t\t\t", Converdo_Analytics_Tracker::query());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
  }
app/code/community/Converdo/Analytics/Helper/Data.php CHANGED
@@ -59,4 +59,16 @@ class Converdo_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
59
 
60
  return 'tracker.js';
61
  }
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
59
 
60
  return 'tracker.js';
61
  }
62
+
63
+ public function isSearchPage()
64
+ {
65
+ return isset(Converdo_Analytics_Tracker::attributes()['pt2'])
66
+ && Converdo_Analytics_Tracker::attributes()['pt2'] === 'search_results';
67
+ }
68
+
69
+ public function isSuccessPage()
70
+ {
71
+ return isset(Converdo_Analytics_Tracker::attributes()['pt2'])
72
+ && Converdo_Analytics_Tracker::attributes()['pt2'] === 'success_index';
73
+ }
74
  }
app/code/community/Converdo/Analytics/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Converdo_Analytics>
6
- <version>1.2.5.0</version>
7
  </Converdo_Analytics>
8
  </modules>
9
  <global>
3
  <config>
4
  <modules>
5
  <Converdo_Analytics>
6
+ <version>2.0.0.0</version>
7
  </Converdo_Analytics>
8
  </modules>
9
  <global>
app/design/adminhtml/default/default/layout/converdoanalytics.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <layout>
4
+ <default>
5
+ <reference name="head">
6
+ <action method="addCss">
7
+ <name>converdoanalytics/css/system_config_edit.css</name>
8
+ </action>
9
+ </reference>
10
+ </default>
11
+ </layout>
12
+
app/design/frontend/base/default/template/analytics/analytics.phtml CHANGED
@@ -1,16 +1,16 @@
1
- <?php if (Mage::helper('analytics')->isEnabled()) { ?>
2
 
3
- <!-- START CONVERDO TRACKING CODE -->
4
- <script type="text/javascript">
5
- var _paq = _paq || [];
6
- (function(){
7
- <?php $this->trackers(); ?>
8
 
9
- var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src='<?= Mage::helper('analytics')->getJsTracker(true); ?>';
10
- s.parentNode.insertBefore(g,s);
11
- })();
12
- </script>
13
- <noscript><p><img src="<?= Mage::helper('analytics')->getPhpTracker(true) ?>?idsite=<?= Mage::helper('analytics')->getSiteId() ?>" style="border:0" alt="" /></p></noscript>
14
- <!-- END CONVERDO TRACKING CODE -->
15
 
16
- <?php } ?>
1
+ <?php if (Mage::helper('analytics')->isEnabled()) { ?>
2
 
3
+ <!-- START CONVERDO TRACKING CODE -->
4
+ <script type="text/javascript">
5
+ var _paq = _paq || [];
6
+ (function(){
7
+ <?php $this->trackers(); ?>
8
 
9
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src='<?= Mage::helper('analytics')->getJsTracker(true); ?>';
10
+ s.parentNode.insertBefore(g,s);
11
+ })();
12
+ </script>
13
+ <noscript><p><img src="<?= Mage::helper('analytics')->getPhpTracker(true) ?>?idsite=<?= Mage::helper('analytics')->getSiteId() ?>" style="border:0" alt="" /></p></noscript>
14
+ <!-- END CONVERDO TRACKING CODE -->
15
 
16
+ <?php } ?>
lib/Converdo/Analytics/Models/CategoryView.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_CategoryView
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable;
6
+
7
+ /**
8
+ * @var string
9
+ */
10
+ protected $category;
11
+
12
+ /**
13
+ * Sets the Category Name.
14
+ *
15
+ * @param string $category
16
+ * @return $this
17
+ */
18
+ public function setCategory($category)
19
+ {
20
+ $this->category = $category;
21
+
22
+ return $this;
23
+ }
24
+
25
+ /**
26
+ * Gets the Category Name.
27
+ *
28
+ * @return string
29
+ */
30
+ public function getCategory()
31
+ {
32
+ return (string) $this->category;
33
+ }
34
+
35
+ /**
36
+ * Gets whether the Category Name is set.
37
+ *
38
+ * @return bool
39
+ */
40
+ public function hasCategory()
41
+ {
42
+ return (bool) $this->category;
43
+ }
44
+
45
+ /**
46
+ * Returns the data as an array.
47
+ *
48
+ * @return array
49
+ */
50
+ public function toArray()
51
+ {
52
+ return [
53
+ "_paq.push(['setEcommerceView', false, false, '" . $this->getCategory() . "']);",
54
+ ];
55
+ }
56
+ }
lib/Converdo/Analytics/Models/Configuration.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_Configuration
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable;
6
+
7
+ /**
8
+ * @var string
9
+ */
10
+ protected $token;
11
+
12
+ /**
13
+ * @var string
14
+ */
15
+ protected $linkTracking;
16
+
17
+ /**
18
+ * @var string
19
+ */
20
+ protected $pageTracking;
21
+
22
+ /**
23
+ * @var string
24
+ */
25
+ protected $heartBeat;
26
+
27
+ /**
28
+ * @var null
29
+ */
30
+ protected $ecommerce;
31
+
32
+ /**
33
+ * @var null
34
+ */
35
+ protected $view;
36
+
37
+ /**
38
+ * Sets the Converdo Analytics Website Token.
39
+ *
40
+ * @param string $token
41
+ * @return $this
42
+ */
43
+ public function setToken($token)
44
+ {
45
+ $this->token = (string) $token;
46
+
47
+ return $this;
48
+ }
49
+
50
+ /**
51
+ * Retrieves the Converdo Analytics Website Token.
52
+ *
53
+ * @return string
54
+ */
55
+ public function getToken()
56
+ {
57
+ return (string) $this->token;
58
+ }
59
+
60
+ /**
61
+ * Gets whether the Converdo Analytics Website Token is set.
62
+ *
63
+ * @return bool
64
+ */
65
+ public function hasToken()
66
+ {
67
+ return (bool) $this->token;
68
+ }
69
+
70
+ /**
71
+ * Enables the tracking of links.
72
+ *
73
+ * @param bool $status
74
+ * @return $this
75
+ */
76
+ public function enableLinkTracking($status)
77
+ {
78
+ $this->linkTracking = (bool) $status;
79
+
80
+ return $this;
81
+ }
82
+
83
+ /**
84
+ * Gets whether the tracking of links is enabled.
85
+ *
86
+ * @return bool
87
+ */
88
+ public function hasLinkTrackingEnabled()
89
+ {
90
+ return (bool) $this->linkTracking;
91
+ }
92
+
93
+ /**
94
+ * Enables the tracking of pages.
95
+ *
96
+ * @param bool $status
97
+ * @return $this
98
+ */
99
+ public function enablePageTracking($status)
100
+ {
101
+ $this->pageTracking = (bool) $status;
102
+
103
+ return $this;
104
+ }
105
+
106
+ /**
107
+ * Gets whether the tracking of pages is enabled.
108
+ *
109
+ * @return bool
110
+ */
111
+ public function hasPageTrackingEnabled()
112
+ {
113
+ return (bool) $this->pageTracking;
114
+ }
115
+
116
+ /**
117
+ * Enables HeartBeat.
118
+ *
119
+ * @param bool $status
120
+ * @return $this
121
+ */
122
+ public function enableHeartBeat($status)
123
+ {
124
+ $this->heartBeat = (bool) $status;
125
+
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Gets whether the HeartBeat is enabled.
131
+ *
132
+ * @return bool
133
+ */
134
+ public function hasHeartBeatEnabled()
135
+ {
136
+ return (bool) $this->heartBeat;
137
+ }
138
+
139
+ /**
140
+ * Returns the data as an array.
141
+ *
142
+ * @return array
143
+ */
144
+ public function toConfigurationArray()
145
+ {
146
+ return [
147
+ "_paq.push(['setSiteId', '" . $this->getToken() . "']);",
148
+ "_paq.push(['setTrackerUrl', '" . Mage::helper('analytics')->getPhpTracker(true) . "']);",
149
+ ];
150
+ }
151
+
152
+ public function toOptionsArray()
153
+ {
154
+ $output = [];
155
+
156
+ if ($this->hasPageTrackingEnabled() && ! Mage::helper('analytics')->isSearchPage()) {
157
+ $output[] = "_paq.push(['trackPageView']);";
158
+ }
159
+
160
+ if ($this->hasLinkTrackingEnabled()) {
161
+ $output[] = "_paq.push(['enableLinkTracking']);";
162
+ }
163
+
164
+ if ($this->hasHeartBeatEnabled()) {
165
+ $output[] = "_paq.push(['enableHeartBeatTimer']);";
166
+ }
167
+
168
+ return $output;
169
+ }
170
+ }
lib/Converdo/Analytics/Models/EcommerceCartUpdate.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_EcommerceCartUpdate
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable;
6
+
7
+ /**
8
+ * @var float
9
+ */
10
+ protected $total;
11
+
12
+ /**
13
+ * Sets the Cart Total.
14
+ *
15
+ * @param float $total
16
+ * @return $this
17
+ */
18
+ public function setTotal($total)
19
+ {
20
+ $this->total = (float) $total;
21
+
22
+ return $this;
23
+ }
24
+
25
+ /**
26
+ * Gets the Product Sku.
27
+ *
28
+ * @return string
29
+ */
30
+ public function getTotal()
31
+ {
32
+ return (float) $this->total;
33
+ }
34
+
35
+ /**
36
+ * Returns the data as an array.
37
+ *
38
+ * @return array
39
+ */
40
+ public function toArray()
41
+ {
42
+ return [
43
+ "_paq.push(['trackEcommerceCartUpdate', " . $this->getTotal() . "]);",
44
+ ];
45
+ }
46
+ }
lib/Converdo/Analytics/Models/EcommerceOrder.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_EcommerceOrder
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable;
6
+
7
+ /**
8
+ * @var int
9
+ */
10
+ protected $orderId;
11
+
12
+ /**
13
+ * @var float
14
+ */
15
+ protected $total;
16
+
17
+ /**
18
+ * @var float
19
+ */
20
+ protected $subtotal;
21
+
22
+ /**
23
+ * @var float
24
+ */
25
+ protected $tax;
26
+
27
+ /**
28
+ * @var float
29
+ */
30
+ protected $shipping;
31
+
32
+ /**
33
+ * Sets the Order ID.
34
+ *
35
+ * @param int $orderId
36
+ * @return $this
37
+ */
38
+ public function setOrderId($orderId)
39
+ {
40
+ $this->orderId = $orderId;
41
+
42
+ return $this;
43
+ }
44
+
45
+ /**
46
+ * Gets the Order ID.
47
+ *
48
+ * @return int
49
+ */
50
+ public function getOrderId()
51
+ {
52
+ return (int) $this->orderId;
53
+ }
54
+
55
+ /**
56
+ * Sets the Order Total.
57
+ *
58
+ * @param float $total
59
+ * @return $this
60
+ */
61
+ public function setTotal($total)
62
+ {
63
+ $this->total = $total;
64
+
65
+ return $this;
66
+ }
67
+
68
+ /**
69
+ * Gets the Order Total.
70
+ *
71
+ * @return float
72
+ */
73
+ public function getTotal()
74
+ {
75
+ return (float) $this->total;
76
+ }
77
+
78
+ /**
79
+ * Sets the Order Subtotal.
80
+ *
81
+ * @param float $subtotal
82
+ * @return $this
83
+ */
84
+ public function setSubtotal($subtotal)
85
+ {
86
+ $this->subtotal = $subtotal;
87
+
88
+ return $this;
89
+ }
90
+
91
+ /**
92
+ * Gets the Order Subtotal.
93
+ *
94
+ * @return float
95
+ */
96
+ public function getSubtotal()
97
+ {
98
+ return (float) $this->subtotal;
99
+ }
100
+
101
+ /**
102
+ * Sets the Order Tax.
103
+ *
104
+ * @param float $tax
105
+ * @return $this
106
+ */
107
+ public function setTax($tax)
108
+ {
109
+ $this->tax = $tax;
110
+
111
+ return $this;
112
+ }
113
+
114
+ /**
115
+ * Gets the Order Tax.
116
+ *
117
+ * @return float
118
+ */
119
+ public function getTax()
120
+ {
121
+ return (float) $this->tax;
122
+ }
123
+
124
+ /**
125
+ * Sets the Order Shipping.
126
+ *
127
+ * @param float $shipping
128
+ * @return $this
129
+ */
130
+ public function setShipping($shipping)
131
+ {
132
+ $this->shipping = $shipping;
133
+
134
+ return $this;
135
+ }
136
+
137
+ /**
138
+ * Gets the Order Shipping.
139
+ *
140
+ * @return float
141
+ */
142
+ public function getShipping()
143
+ {
144
+ return (float) $this->shipping;
145
+ }
146
+
147
+ /**
148
+ * Returns the data as an array.
149
+ *
150
+ * @return array
151
+ */
152
+ public function toArray()
153
+ {
154
+ return [
155
+ "_paq.push(['trackEcommerceOrder', '" . $this->getOrderId() . "', " . $this->getTotal() . ", " . $this->getSubtotal() . ", " . $this->getTax() . ", " . $this->getShipping() . ", false]);",
156
+ ];
157
+ }
158
+ }
lib/Converdo/Analytics/Models/EcommerceProduct.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_EcommerceProduct
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * @var string
10
+ */
11
+ protected $sku;
12
+
13
+ /**
14
+ * @var string
15
+ */
16
+ protected $name;
17
+
18
+ /**
19
+ * @var string
20
+ */
21
+ protected $category;
22
+
23
+ /**
24
+ * @var float
25
+ */
26
+ protected $price;
27
+
28
+ /**
29
+ * @var float
30
+ */
31
+ protected $quantity;
32
+
33
+ /**
34
+ * Sets the Product Sku.
35
+ *
36
+ * @param string $sku
37
+ * @return $this
38
+ */
39
+ public function setSku($sku)
40
+ {
41
+ $this->sku = (string) $sku;
42
+
43
+ return $this;
44
+ }
45
+
46
+ /**
47
+ * Gets the Product Sku.
48
+ *
49
+ * @return string
50
+ */
51
+ public function getSku()
52
+ {
53
+ return (string) $this->sku;
54
+ }
55
+
56
+ /**
57
+ * Sets the Product Name.
58
+ *
59
+ * @param string $name
60
+ * @return $this
61
+ */
62
+ public function setName($name)
63
+ {
64
+ $this->name = $name;
65
+
66
+ return $this;
67
+ }
68
+
69
+ /**
70
+ * Gets the Product Name.
71
+ *
72
+ * @return string
73
+ */
74
+ public function getName()
75
+ {
76
+ return (string) $this->name;
77
+ }
78
+
79
+ /**
80
+ * Sets the Product Category.
81
+ *
82
+ * @param string $category
83
+ * @return $this
84
+ */
85
+ public function setCategory($category)
86
+ {
87
+ $this->category = $category;
88
+
89
+ return $this;
90
+ }
91
+
92
+ /**
93
+ * Gets the Product Category.
94
+ *
95
+ * @return string
96
+ */
97
+ public function getCategory()
98
+ {
99
+ return $this->category;
100
+ }
101
+
102
+ /**
103
+ * Sets the Product Price.
104
+ *
105
+ * @param float $price
106
+ * @return $this
107
+ */
108
+ public function setPrice($price)
109
+ {
110
+ $this->price = $price;
111
+
112
+ return $this;
113
+ }
114
+
115
+ /**
116
+ * Gets the Product Price.
117
+ *
118
+ * @return float|null
119
+ */
120
+ public function getPrice()
121
+ {
122
+ return (float) $this->price;
123
+ }
124
+
125
+ /**
126
+ * Sets the Product Quantity.
127
+ *
128
+ * @param float $quantity
129
+ * @return $this
130
+ */
131
+ public function setQuantity($quantity)
132
+ {
133
+ $this->quantity = $quantity;
134
+
135
+ return $this;
136
+ }
137
+
138
+ /**
139
+ * Gets the Product Quantity.
140
+ *
141
+ * @return float
142
+ */
143
+ public function getQuantity()
144
+ {
145
+ return (float) $this->quantity;
146
+ }
147
+
148
+ /**
149
+ * Returns the data as an array.
150
+ *
151
+ * @return array
152
+ */
153
+ public function toArray()
154
+ {
155
+ return [
156
+ "_paq.push(['addEcommerceItem', '" . $this->getSku() . "', '" . $this->getName() . "', '" . $this->getCategory() . "', " . $this->getPrice() .", " . $this->getQuantity() . "]);",
157
+ ];
158
+ }
159
+ }
lib/Converdo/Analytics/Models/EcommerceView.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_EcommerceView
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * @var int
10
+ */
11
+ protected $id;
12
+
13
+ /**
14
+ * @var string
15
+ */
16
+ protected $sku;
17
+
18
+ /**
19
+ * @var string
20
+ */
21
+ protected $name;
22
+
23
+ /**
24
+ * @var mixed
25
+ */
26
+ protected $categories = [];
27
+
28
+ /**
29
+ * @var float|null
30
+ */
31
+ protected $price;
32
+
33
+ /**
34
+ * @var string
35
+ */
36
+ protected $imageUrl;
37
+
38
+ /**
39
+ * @var string
40
+ */
41
+ protected $type;
42
+
43
+ /**
44
+ * @var bool
45
+ */
46
+ protected $isInStock;
47
+
48
+ /**
49
+ * @var int
50
+ */
51
+ protected $stockQuantity;
52
+
53
+ /**
54
+ * Sets the Product ID.
55
+ *
56
+ * @param int $id
57
+ * @return $this
58
+ */
59
+ public function setId($id)
60
+ {
61
+ $this->id = $id;
62
+
63
+ return $this;
64
+ }
65
+
66
+ /**
67
+ * Gets the Product ID.
68
+ *
69
+ * @return int
70
+ */
71
+ public function getId()
72
+ {
73
+ return (int) $this->id;
74
+ }
75
+
76
+ /**
77
+ * Sets the Product Sku.
78
+ *
79
+ * @param string $sku
80
+ * @return $this
81
+ */
82
+ public function setSku($sku)
83
+ {
84
+ $this->sku = (string) $sku;
85
+
86
+ return $this;
87
+ }
88
+
89
+ /**
90
+ * Gets the Product Sku.
91
+ *
92
+ * @return string
93
+ */
94
+ public function getSku()
95
+ {
96
+ return (string) $this->sku;
97
+ }
98
+
99
+ /**
100
+ * Sets the Product Name.
101
+ *
102
+ * @param string $name
103
+ * @return $this
104
+ */
105
+ public function setName($name)
106
+ {
107
+ $this->name = $name;
108
+
109
+ return $this;
110
+ }
111
+
112
+ /**
113
+ * Gets the Product Name.
114
+ *
115
+ * @return string
116
+ */
117
+ public function getName()
118
+ {
119
+ return (string) $this->name;
120
+ }
121
+
122
+ /**
123
+ * Sets the Product Categories (up to five).
124
+ *
125
+ * @param array $categories
126
+ * @return $this
127
+ */
128
+ public function setCategories($categories)
129
+ {
130
+ foreach ($categories as $category) {
131
+ $category = Mage::getModel('catalog/category')->load($category);
132
+ $this->categories[] = addslashes($category->getName());
133
+ }
134
+
135
+ $this->categories = array_splice(array_filter($this->categories), 0, 5);
136
+
137
+ return $this;
138
+ }
139
+
140
+ /**
141
+ * Gets the Product Categories.
142
+ *
143
+ * @return null|string
144
+ */
145
+ public function getCategories()
146
+ {
147
+ return (array) $this->categories;
148
+ }
149
+
150
+ /**
151
+ * Sets the Product Price.
152
+ *
153
+ * @param float $price
154
+ * @return $this
155
+ */
156
+ public function setPrice($price)
157
+ {
158
+ $this->price = $price;
159
+
160
+ return $this;
161
+ }
162
+
163
+ /**
164
+ * Gets the Product Price.
165
+ *
166
+ * @return float|null
167
+ */
168
+ public function getPrice()
169
+ {
170
+ return $this->price;
171
+ }
172
+
173
+ /**
174
+ * Sets the Product Image URL.
175
+ *
176
+ * @param string $imageUrl
177
+ * @return $this
178
+ */
179
+ public function setImageUrl($imageUrl)
180
+ {
181
+ $this->imageUrl = $imageUrl;
182
+
183
+ return $this;
184
+ }
185
+
186
+ /**
187
+ * Gets the Product Image URL.
188
+ *
189
+ * @return string
190
+ */
191
+ public function getImageUrl()
192
+ {
193
+ return (string) $this->imageUrl;
194
+ }
195
+
196
+ /**
197
+ * Sets the Product Type.
198
+ *
199
+ * @param int $type
200
+ * @return $this
201
+ */
202
+ public function setType($type)
203
+ {
204
+ $this->type = $type;
205
+
206
+ return $this;
207
+ }
208
+
209
+ /**
210
+ * Gets the Product Type.
211
+ *
212
+ * @return int
213
+ */
214
+ public function getType()
215
+ {
216
+ return (string) $this->type;
217
+ }
218
+
219
+ /**
220
+ * Sets the Product Stock.
221
+ *
222
+ * @param bool $isInStock
223
+ * @return $this
224
+ */
225
+ public function setIsInStock($isInStock)
226
+ {
227
+ $this->isInStock = $isInStock;
228
+
229
+ return $this;
230
+ }
231
+
232
+ /**
233
+ * Gets the Product Stock.
234
+ *
235
+ * @return bool
236
+ */
237
+ public function getIsInStock()
238
+ {
239
+ return (bool) $this->isInStock;
240
+ }
241
+
242
+ /**
243
+ * Sets the Product Stock Quantity.
244
+ *
245
+ * @param int $quantity
246
+ * @return $this
247
+ */
248
+ public function setStockQuantity($quantity)
249
+ {
250
+ $this->stockQuantity = $quantity;
251
+
252
+ return $this;
253
+ }
254
+
255
+ /**
256
+ * Gets the Product Stock Quantity.
257
+ *
258
+ * @return bool
259
+ */
260
+ public function getStockQuantity()
261
+ {
262
+ return (float) $this->stockQuantity;
263
+ }
264
+
265
+ /**
266
+ * Retrieves the Product IDs of children for a configurable product.
267
+ *
268
+ * @return array
269
+ */
270
+ protected function resolveChildren()
271
+ {
272
+ if ($this->getType() !== 'configurable') {
273
+ return [];
274
+ }
275
+
276
+ $children = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($this->getId());
277
+
278
+ if (count($children) < 0) {
279
+ return [];
280
+ }
281
+
282
+ return array_keys($children[0]);
283
+ }
284
+
285
+ /**
286
+ * Adds attributes to the stack.
287
+ *
288
+ * @return array
289
+ */
290
+ public function attributes()
291
+ {
292
+ return [
293
+ 'pti' => $this->getName(),
294
+
295
+ // Product Sku
296
+ 'sku' => $this->getSku(),
297
+
298
+ // Product Price
299
+ 'pri' => $this->getPrice(),
300
+
301
+ // Product Image
302
+ 'ima' => $this->getImageUrl(),
303
+
304
+ // Product categories
305
+ 'cat' => implode(', ', $this->getCategories()),
306
+
307
+ // Product Id
308
+ 'rid' => $this->getId(),
309
+
310
+ // Product Children Id
311
+ 'tid' => $this->resolveChildren(),
312
+
313
+ // Product Type
314
+ 'typ' => $this->getType(),
315
+
316
+ // Product Attributes
317
+ 'att' => null,
318
+
319
+ // Product Is In Stock
320
+ 'stb' => $this->getIsInStock(),
321
+
322
+ // Product Is In Stock
323
+ 'bra' => null,
324
+
325
+ // Product Stock Quantity
326
+ 'sqn' => $this->getStockQuantity(),
327
+ ];
328
+ }
329
+
330
+ /**
331
+ * Returns the data as an array.
332
+ *
333
+ * @return array
334
+ */
335
+ public function toArray()
336
+ {
337
+ return [
338
+ "_paq.push(['setEcommerceView', '" . $this->getSku() . "', '" . $this->getName() . "', '" . implode(', ', $this->getCategories()) . "', " . $this->getPrice() . "]);",
339
+ ];
340
+ }
341
+ }
lib/Converdo/Analytics/Models/PageView.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_PageView
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable;
6
+
7
+ /**
8
+ * Returns the data as an array.
9
+ *
10
+ * @return array
11
+ */
12
+ public function toArray()
13
+ {
14
+ return [
15
+ "_paq.push(['setCustomVariable', 1, 'configuration', '" . Converdo_Analytics_Support_Crypt::encrypt(json_encode(Converdo_Analytics_Tracker::attributes(), true)) . "', 'page']);",
16
+ ];
17
+ }
18
+ }
lib/Converdo/Analytics/Models/SearchView.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Models_SearchView
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * @var string
10
+ */
11
+ protected $keyword;
12
+
13
+ /**
14
+ * @var string|false
15
+ */
16
+ protected $category;
17
+
18
+ /**
19
+ * @var int
20
+ */
21
+ protected $results;
22
+
23
+ /**
24
+ * Sets the Search Keywords.
25
+ *
26
+ * @param string $keyword
27
+ * @return $this
28
+ */
29
+ public function setKeyword($keyword)
30
+ {
31
+ $this->keyword = $keyword;
32
+
33
+ return $this;
34
+ }
35
+
36
+ /**
37
+ * Gets the Search Keywords.
38
+ *
39
+ * @return bool
40
+ */
41
+ public function getKeyword()
42
+ {
43
+ return (string) $this->keyword;
44
+ }
45
+
46
+ /**
47
+ * Sets the selected Category to search in, false if no Category was selected.
48
+ *
49
+ * @param string $category
50
+ * @return $this
51
+ */
52
+ public function setCategory($category)
53
+ {
54
+ $this->category = $category;
55
+
56
+ return $this;
57
+ }
58
+
59
+ /**
60
+ * Gets the selected Search Category.
61
+ *
62
+ * @return bool
63
+ */
64
+ public function getCategory()
65
+ {
66
+ return $this->category;
67
+ }
68
+
69
+ /**
70
+ * Sets the Search Result count.
71
+ *
72
+ * @param int $results
73
+ * @return $this
74
+ */
75
+ public function setResultCount($results)
76
+ {
77
+ $this->results = $results;
78
+
79
+ return $this;
80
+ }
81
+
82
+ /**
83
+ * Gets the Search Keywords.
84
+ *
85
+ * @return bool
86
+ */
87
+ public function getResultCount()
88
+ {
89
+ return (int) $this->results;
90
+ }
91
+
92
+ /**
93
+ * Returns the data as an array.
94
+ *
95
+ * @return array
96
+ */
97
+ public function toArray()
98
+ {
99
+ return [
100
+ "_paq.push(['trackSiteSearch', '" . $this->getKeyword() . "', null, " . $this->getResultCount() . "]);",
101
+ ];
102
+ }
103
+ }
lib/Converdo/Analytics/Support/AbstractTracker.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ abstract class Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ /**
6
+ * Determines whether the Tracker is responsible during the Request.
7
+ *
8
+ * @return bool
9
+ */
10
+ public function responsible()
11
+ {
12
+ return false;
13
+ }
14
+
15
+ /**
16
+ * Parses the JavaScript using the collected data.
17
+ *
18
+ * @return array
19
+ */
20
+ public function parse()
21
+ {
22
+ return [];
23
+ }
24
+
25
+ /**
26
+ * Track data for the Request.
27
+ *
28
+ * @return void
29
+ */
30
+ abstract public function track();
31
+ }
lib/Converdo/Analytics/Support/Arrayable.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ trait Converdo_Analytics_Support_Arrayable
4
+ {
5
+ /**
6
+ * Returns the data as an array.
7
+ *
8
+ * @return array
9
+ */
10
+ public function toArray()
11
+ {
12
+ return [];
13
+ }
14
+ }
lib/Converdo/{Support → Analytics/Support}/Crypt.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class Converdo_Support_Crypt
4
  {
5
  /**
6
  * Encrypt a given input.
1
  <?php
2
 
3
+ class Converdo_Analytics_Support_Crypt
4
  {
5
  /**
6
  * Encrypt a given input.
lib/Converdo/Analytics/Support/HoldsAttributes.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ trait Converdo_Analytics_Support_HoldsAttributes
4
+ {
5
+ /**
6
+ * Adds attributes to the stack.
7
+ *
8
+ * @return array
9
+ */
10
+ public function attributes()
11
+ {
12
+ return [];
13
+ }
14
+ }
lib/Converdo/Analytics/Tracker.php ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Tracker
4
+ {
5
+ /**
6
+ * @var Converdo_Analytics_Models_Configuration
7
+ */
8
+ protected static $configuration;
9
+
10
+ /**
11
+ * @var Converdo_Analytics_Models_EcommerceView
12
+ */
13
+ protected static $ecommerceView;
14
+
15
+ /**
16
+ * @var Converdo_Analytics_Models_CategoryView
17
+ */
18
+ protected static $categoryView;
19
+
20
+ /**
21
+ * @var Converdo_Analytics_Models_PageView
22
+ */
23
+ protected static $pageView;
24
+
25
+ /**
26
+ * @var Converdo_Analytics_Models_SearchView
27
+ */
28
+ protected static $searchView;
29
+
30
+ /**
31
+ * @var Converdo_Analytics_Models_EcommerceCartUpdate
32
+ */
33
+ protected static $ecommerceCartUpdate;
34
+
35
+ /**
36
+ * @var array
37
+ */
38
+ protected static $ecommerceProducts = [];
39
+
40
+ /**
41
+ * @var Converdo_Analytics_Models_EcommerceOrder
42
+ */
43
+ protected static $ecommerceOrder;
44
+
45
+ /**
46
+ * @var array
47
+ */
48
+ protected static $query = [];
49
+
50
+ /**
51
+ * @var Converdo_Analytics_Models_EcommerceProduct[]
52
+ */
53
+ protected static $attributes = [];
54
+
55
+ protected static $collected = [];
56
+
57
+ /**
58
+ * Retrieves the Converdo Analytics Tracker Configuration.
59
+ *
60
+ * @return Converdo_Analytics_Models_Configuration
61
+ */
62
+ public static function configuration()
63
+ {
64
+ if (! self::$configuration) {
65
+ self::$configuration = new Converdo_Analytics_Models_Configuration();
66
+ }
67
+
68
+ return self::$configuration;
69
+ }
70
+
71
+ /**
72
+ * Manages the Ecommerce View.
73
+ *
74
+ * @return Converdo_Analytics_Models_EcommerceView
75
+ */
76
+ public static function ecommerceView()
77
+ {
78
+ if (! self::$ecommerceView) {
79
+ self::$ecommerceView = new Converdo_Analytics_Models_EcommerceView();
80
+ }
81
+
82
+ return self::$ecommerceView;
83
+ }
84
+
85
+ /**
86
+ * Manages the Category View.
87
+ *
88
+ * @return Converdo_Analytics_Models_CategoryView
89
+ */
90
+ public static function categoryView()
91
+ {
92
+ if (! self::$categoryView) {
93
+ self::$categoryView = new Converdo_Analytics_Models_CategoryView();
94
+ }
95
+
96
+ return self::$categoryView;
97
+ }
98
+
99
+ /**
100
+ * Manages the Page View.
101
+ *
102
+ * @return Converdo_Analytics_Models_PageView
103
+ */
104
+ public static function pageView()
105
+ {
106
+ if (! self::$pageView) {
107
+ self::$pageView = new Converdo_Analytics_Models_PageView();
108
+ }
109
+
110
+ return self::$pageView;
111
+ }
112
+
113
+ /**
114
+ * Manages the Search View.
115
+ *
116
+ * @return Converdo_Analytics_Models_SearchView
117
+ */
118
+ public static function searchView()
119
+ {
120
+ if (! self::$searchView) {
121
+ self::$searchView = new Converdo_Analytics_Models_SearchView();
122
+ }
123
+
124
+ return self::$searchView;
125
+ }
126
+
127
+ /**
128
+ * Manages the Ecommerce Product.
129
+ *
130
+ * @return Converdo_Analytics_Models_EcommerceProduct
131
+ */
132
+ public static function ecommerceProduct()
133
+ {
134
+ return new Converdo_Analytics_Models_EcommerceProduct();
135
+ }
136
+
137
+ /**
138
+ * Manages the Ecommerce Cart.
139
+ *
140
+ * @return Converdo_Analytics_Models_EcommerceCartUpdate
141
+ */
142
+ public static function ecommerceCartUpdate()
143
+ {
144
+ if (! self::$ecommerceCartUpdate) {
145
+ self::$ecommerceCartUpdate = new Converdo_Analytics_Models_EcommerceCartUpdate();
146
+ }
147
+
148
+ return self::$ecommerceCartUpdate;
149
+ }
150
+
151
+ /**
152
+ * Manages the Ecommerce Order.
153
+ *
154
+ * @return Converdo_Analytics_Models_EcommerceOrder
155
+ */
156
+ public static function ecommerceOrder()
157
+ {
158
+ if (! self::$ecommerceOrder) {
159
+ self::$ecommerceOrder = new Converdo_Analytics_Models_EcommerceOrder();
160
+ }
161
+
162
+ return self::$ecommerceOrder;
163
+ }
164
+
165
+
166
+ /**
167
+ * @param array $collected
168
+ * @return Converdo_Analytics_Support_AbstractTracker[]
169
+ */
170
+ public static function query(array $collected = [])
171
+ {
172
+ if (count($collected)) {
173
+ self::$query = array_merge(self::$query, $collected);
174
+ return null;
175
+ }
176
+
177
+ return self::$query;
178
+ }
179
+
180
+ public static function attributes($attributes = null)
181
+ {
182
+ if (! $attributes) {
183
+ return self::$attributes;
184
+ }
185
+
186
+ self::$attributes = (array) $attributes + self::$attributes;
187
+
188
+ return self::$attributes;
189
+ }
190
+
191
+ public static function collect(array $data)
192
+ {
193
+ self::$collected = $data + self::$collected;
194
+ }
195
+
196
+ public static function parse()
197
+ {
198
+ return self::$collected;
199
+ }
200
+ }
lib/Converdo/Analytics/Trackers/Cart.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Trackers_Cart extends Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ protected $products = [];
9
+
10
+ /**
11
+ * Determines whether the Tracker is responsible during the Request.
12
+ *
13
+ * @return bool
14
+ */
15
+ public function responsible()
16
+ {
17
+ return Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
18
+ }
19
+
20
+ /**
21
+ * Track data for the Request.
22
+ *
23
+ * @return void
24
+ */
25
+ public function track()
26
+ {
27
+ $cart = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
28
+
29
+ foreach ($cart as $cartItem) {
30
+ $product = Mage::getModel('catalog/product')->load($cartItem->product_id);
31
+ $category = false;
32
+
33
+ if (count($product->getCategoryIds())) {
34
+ $category = Mage::getModel('catalog/category')->load($product->getCategoryIds()[0]);
35
+ $category = $category->getName();
36
+ }
37
+
38
+ $this->products[] = Converdo_Analytics_Tracker::ecommerceProduct()
39
+ ->setSku($product->getSku())
40
+ ->setName($product->getName())
41
+ ->setCategory($category)
42
+ ->setPrice($product->getFinalPrice())
43
+ ->setQuantity($cartItem->getQty());
44
+ }
45
+
46
+ Converdo_Analytics_Tracker::ecommerceCartUpdate()
47
+ ->setTotal(Mage::getModel('checkout/cart')->getQuote()->getGrandTotal());
48
+ }
49
+
50
+ /**
51
+ * Returns the data as an array.
52
+ *
53
+ * @return array
54
+ */
55
+ public function toArray()
56
+ {
57
+ $output = [];
58
+
59
+ foreach ($this->products as $product) {
60
+ $output = array_merge($product->toArray(), $output);
61
+ }
62
+
63
+ $output = array_merge($output, Converdo_Analytics_Tracker::ecommerceCartUpdate()->toArray());
64
+
65
+ return $output;
66
+ }
67
+ }
lib/Converdo/Analytics/Trackers/CategoryView.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Trackers_CategoryView extends Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * Determines whether the Tracker is responsible during the Request.
10
+ *
11
+ * @return bool
12
+ */
13
+ public function responsible()
14
+ {
15
+ return Mage::registry('current_category')
16
+ && Mage::registry('current_category') instanceof Mage_Catalog_Model_Category
17
+ && ! Mage::registry('current_product');
18
+ }
19
+
20
+ /**
21
+ * Track data for the Request.
22
+ *
23
+ * @return void
24
+ */
25
+ public function track()
26
+ {
27
+ Converdo_Analytics_Tracker::categoryView()
28
+ ->setCategory(Mage::registry('current_category')->getName());
29
+ }
30
+
31
+ /**
32
+ * Returns the data as an array.
33
+ *
34
+ * @return array
35
+ */
36
+ public function toArray()
37
+ {
38
+ return Converdo_Analytics_Tracker::categoryView()->toArray();
39
+ }
40
+ }
lib/Converdo/Analytics/Trackers/Configuration.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Trackers_Configuration extends Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * Determines whether the Tracker is responsible during the Request.
10
+ *
11
+ * @return bool
12
+ */
13
+ public function responsible()
14
+ {
15
+ return true;
16
+ }
17
+
18
+ /**
19
+ * Track data for the Request.
20
+ *
21
+ * @return void
22
+ */
23
+ public function track()
24
+ {
25
+ Converdo_Analytics_Tracker::configuration()
26
+ ->setToken(Mage::helper('analytics')->getSiteId());
27
+ }
28
+
29
+ /**
30
+ * Returns the data as an array.
31
+ *
32
+ * @return array
33
+ */
34
+ public function toArray()
35
+ {
36
+ return Converdo_Analytics_Tracker::configuration()->toConfigurationArray();
37
+ }
38
+ }
lib/Converdo/Analytics/Trackers/EcommerceView.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Trackers_EcommerceView extends Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * Determines whether the Tracker is responsible during the Request.
10
+ *
11
+ * @return bool
12
+ */
13
+ public function responsible()
14
+ {
15
+ return Mage::registry('current_product')
16
+ && Mage::registry('current_product') instanceof Mage_Catalog_Model_Product
17
+ && Mage::app()->getFrontController()->getRequest()->getRouteName() !== 'catalogsearch';
18
+ }
19
+
20
+ /**
21
+ * Track data for the Request.
22
+ *
23
+ * @return void
24
+ */
25
+ public function track()
26
+ {
27
+ Converdo_Analytics_Tracker::ecommerceView()
28
+ ->setSku(Mage::registry('current_product')->getSku())
29
+ ->setName(Mage::registry('current_product')->getName())
30
+ ->setCategories(Mage::registry('current_product')->getCategoryIds())
31
+ ->setPrice(Mage::registry('current_product')->getFinalPrice())
32
+ ->setImageUrl(Mage::registry('current_product')->getImageUrl())
33
+ ->setId(Mage::registry('current_product')->getId())
34
+ ->setType(Mage::registry('current_product')->getTypeID())
35
+ ->setIsInStock(Mage::registry('current_product')->getStockItem()->getIsInStock())
36
+ ->setStockQuantity(Mage::registry('current_product')->getStockItem()->getQty())
37
+ ;
38
+ }
39
+
40
+ /**
41
+ * Returns the data as an array.
42
+ *
43
+ * @return array
44
+ */
45
+ public function toArray()
46
+ {
47
+ return Converdo_Analytics_Tracker::ecommerceView()->toArray();
48
+ }
49
+
50
+ /**
51
+ * Adds attributes to the stack.
52
+ *
53
+ * @return array
54
+ */
55
+ public function attributes()
56
+ {
57
+ return Converdo_Analytics_Tracker::ecommerceView()->attributes();
58
+ }
59
+ }
lib/Converdo/Analytics/Trackers/Options.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Trackers_Options extends Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * Determines whether the Tracker is responsible during the Request.
10
+ *
11
+ * @return bool
12
+ */
13
+ public function responsible()
14
+ {
15
+ return true;
16
+ }
17
+
18
+ /**
19
+ * Track data for the Request.
20
+ *
21
+ * @return void
22
+ */
23
+ public function track()
24
+ {
25
+ Converdo_Analytics_Tracker::configuration()
26
+ ->enablePageTracking(true)
27
+ ->enableLinkTracking(true)
28
+ ->enableHeartBeat(true);
29
+ }
30
+
31
+ /**
32
+ * Returns the data as an array.
33
+ *
34
+ * @return array
35
+ */
36
+ public function toArray()
37
+ {
38
+ return array_merge(
39
+ Converdo_Analytics_Tracker::pageView()->toArray(),
40
+ Converdo_Analytics_Tracker::configuration()->toOptionsArray()
41
+ );
42
+ }
43
+ }
lib/Converdo/Analytics/Trackers/Order.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Trackers_Order extends Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ protected $products = [];
9
+
10
+ /**
11
+ * Determines whether the Tracker is responsible during the Request.
12
+ *
13
+ * @return bool
14
+ */
15
+ public function responsible()
16
+ {
17
+ return Mage::helper('analytics')->isSuccessPage();
18
+ }
19
+
20
+ /**
21
+ * Track data for the Request.
22
+ *
23
+ * @return void
24
+ */
25
+ public function track()
26
+ {
27
+ $quoteId = Mage::getSingleton('checkout/session')->getLastQuoteId();
28
+
29
+ if (! $quoteId) {
30
+ return;
31
+ }
32
+
33
+ $order = Mage::getModel('sales/order')->loadByAttribute('quote_id', $quoteId);
34
+
35
+ foreach ($order->getAllItems() as $orderProduct) {
36
+ $product = Mage::getModel('catalog/product')->load($orderProduct->product_id);
37
+ $category = false;
38
+
39
+ if (count($product->getCategoryIds())) {
40
+ $category = Mage::getModel('catalog/category')->load($product->getCategoryIds()[0]);
41
+ $category = $category->getName();
42
+ }
43
+
44
+ $this->products[] = Converdo_Analytics_Tracker::ecommerceProduct()
45
+ ->setSku($product->getSku())
46
+ ->setName($product->getName())
47
+ ->setCategory($category)
48
+ ->setPrice($product->getFinalPrice())
49
+ ->setQuantity($orderProduct->getQty());
50
+ }
51
+
52
+ Converdo_Analytics_Tracker::ecommerceOrder()
53
+ ->setOrderId($order->getIncrementId())
54
+ ->setTotal($order->getBaseGrandTotal())
55
+ ->setSubtotal($order->getGrandTotal() - $order->getShippingAmount() - $order->getShippingTaxAmount())
56
+ ->setTax($order->getBaseTaxAmount())
57
+ ->setShipping($order->getBaseShippingAmount());
58
+ }
59
+
60
+ /**
61
+ * Returns the data as an array.
62
+ *
63
+ * @return array
64
+ */
65
+ public function toArray()
66
+ {
67
+ $output = [];
68
+
69
+ foreach ($this->products as $product) {
70
+ $output = array_merge($product->toArray(), $output);
71
+ }
72
+
73
+ $output = array_merge($output, Converdo_Analytics_Tracker::ecommerceOrder()->toArray());
74
+
75
+ return $output;
76
+ }
77
+ }
lib/Converdo/{Tracker/Processor/PageViewProcessor.php → Analytics/Trackers/PageView.php} RENAMED
@@ -1,29 +1,41 @@
1
  <?php
2
 
3
- class Converdo_Tracker_Processor_PageViewProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  /**
6
- * Process everything.
7
  *
8
  * @return void
9
  */
10
- public function process()
11
  {
12
- $this->configuration();
13
  }
14
 
15
  /**
16
- * Return a JSON string with configuration.
17
  *
18
  * @return array
19
  */
20
- protected function configuration()
21
  {
22
  $pageType = Mage::app()->getFrontController()->getAction()->getFullActionName();
23
  $route = Mage::app()->getFrontController()->getRequest()->getRouteName();
24
 
25
  switch (true) {
26
-
27
  // Account
28
  case ($route == 'customer'):
29
  $configPageType = 'account';
@@ -120,6 +132,8 @@ class Converdo_Tracker_Processor_PageViewProcessor extends Converdo_Tracker_Proc
120
 
121
  // Success
122
  case ($pageType == 'checkout_onepage_success'):
 
 
123
  $configPageType = 'success';
124
  $configPageTypeSub = 'success_index';
125
  break;
@@ -130,9 +144,9 @@ class Converdo_Tracker_Processor_PageViewProcessor extends Converdo_Tracker_Proc
130
  break;
131
  }
132
 
133
- $this->setConfiguration([
134
- 'pt1' => $configPageType,
135
- 'pt2' => $configPageTypeSub
136
- ]);
137
  }
138
  }
1
  <?php
2
 
3
+ class Converdo_Analytics_Trackers_PageView extends Converdo_Analytics_Support_AbstractTracker
4
  {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * Determines whether the Tracker is responsible during the Request.
10
+ *
11
+ * @return bool
12
+ */
13
+ public function responsible()
14
+ {
15
+ return true;
16
+ }
17
+
18
  /**
19
+ * Track data for the Request.
20
  *
21
  * @return void
22
  */
23
+ public function track()
24
  {
25
+
26
  }
27
 
28
  /**
29
+ * Adds attributes to the stack.
30
  *
31
  * @return array
32
  */
33
+ public function attributes()
34
  {
35
  $pageType = Mage::app()->getFrontController()->getAction()->getFullActionName();
36
  $route = Mage::app()->getFrontController()->getRequest()->getRouteName();
37
 
38
  switch (true) {
 
39
  // Account
40
  case ($route == 'customer'):
41
  $configPageType = 'account';
132
 
133
  // Success
134
  case ($pageType == 'checkout_onepage_success'):
135
+ case ($pageType == 'checkout_multishipping_success'):
136
+ case ($pageType == 'firecheckout'):
137
  $configPageType = 'success';
138
  $configPageTypeSub = 'success_index';
139
  break;
144
  break;
145
  }
146
 
147
+ return [
148
+ 'pt1' => $configPageType,
149
+ 'pt2' => $configPageTypeSub,
150
+ ];
151
  }
152
  }
lib/Converdo/Analytics/Trackers/SearchView.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Converdo_Analytics_Trackers_SearchView extends Converdo_Analytics_Support_AbstractTracker
4
+ {
5
+ use Converdo_Analytics_Support_Arrayable,
6
+ Converdo_Analytics_Support_HoldsAttributes;
7
+
8
+ /**
9
+ * Determines whether the Tracker is responsible during the Request.
10
+ *
11
+ * @return bool
12
+ */
13
+ public function responsible()
14
+ {
15
+ return Mage::app()->getFrontController()->getRequest()->getRouteName() == 'catalogsearch';
16
+ }
17
+
18
+ /**
19
+ * Track data for the Request.
20
+ *
21
+ * @return void
22
+ */
23
+ public function track()
24
+ {
25
+ Converdo_Analytics_Tracker::searchView()
26
+ ->setKeyword(Mage::helper('catalogsearch')->getQueryText())
27
+ ->setCategory(false)
28
+ ->setResultCount(
29
+ Mage::helper('catalogsearch')
30
+ ->getEngine()
31
+ ->getResultCollection()
32
+ ->addSearchFilter(
33
+ Mage::helper('catalogsearch')
34
+ ->getQuery()
35
+ ->getQueryText())
36
+ ->getSize()
37
+ );
38
+ }
39
+
40
+ /**
41
+ * Returns the data as an array.
42
+ *
43
+ * @return array
44
+ */
45
+ public function toArray()
46
+ {
47
+ return Converdo_Analytics_Tracker::searchView()->toArray();
48
+ }
49
+ }
lib/Converdo/Entity/AbstractEntity.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
-
3
- abstract class Converdo_Entity_AbstractEntity implements Converdo_Entity_Interface_EntityInterface
4
- {
5
-
6
- }
 
 
 
 
 
 
lib/Converdo/Entity/Interface/EntityInterface.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
-
3
- interface Converdo_Entity_Interface_EntityInterface
4
- {
5
-
6
- }
 
 
 
 
 
 
lib/Converdo/Entity/Interface/ProductInterface.php DELETED
@@ -1,137 +0,0 @@
1
- <?php
2
-
3
- interface Converdo_Entity_Interface_ProductInterface
4
- {
5
- /**
6
- * Get the product id.
7
- *
8
- * @return int
9
- */
10
- public function getId();
11
-
12
- /**
13
- * Get the parent product id.
14
- *
15
- * @return int
16
- */
17
- public function getParentId();
18
-
19
- /**
20
- * Get the children product id.
21
- *
22
- * @return int
23
- */
24
- public function getChildrenId();
25
-
26
- /**
27
- * Get the product name.
28
- *
29
- * @return string
30
- */
31
- public function getName();
32
-
33
- /**
34
- * Get the product SKU.
35
- *
36
- * @return string
37
- */
38
- public function getSku();
39
-
40
- /**
41
- * Get the product price.
42
- *
43
- * @return float
44
- */
45
- public function getPrice();
46
-
47
- /**
48
- * Get the product status.
49
- *
50
- * @return bool
51
- */
52
- public function getStatus();
53
-
54
- /**
55
- * Get the product image url.
56
- *
57
- * @return string
58
- */
59
- public function getImageUrl();
60
-
61
- /**
62
- * Get whether the product is in stock.
63
- *
64
- * @return bool
65
- */
66
- public function isInStock();
67
-
68
- /**
69
- * Get the product's brand.
70
- *
71
- * @return bool
72
- */
73
- public function getBrand();
74
-
75
- /**
76
- * Get the product stock amount.
77
- *
78
- * @return int
79
- */
80
- public function getStockQuantity();
81
-
82
- /**
83
- * Get the ordered quantity amount.
84
- *
85
- * @return float
86
- */
87
- public function getQuantityOrdered();
88
-
89
- /**
90
- * Get the quantity amount.
91
- *
92
- * @return float
93
- */
94
- public function getQuantity();
95
-
96
- /**
97
- * Get the product type.
98
- *
99
- * @return int
100
- */
101
- public function getType();
102
-
103
- /**
104
- * Get the visibilities of the product.
105
- *
106
- * @return array
107
- */
108
- public function getVisibilities();
109
-
110
- /**
111
- * Get the current category of the product.
112
- *
113
- * @return Mage_Catalog_Model_Category
114
- */
115
- public function getCategory();
116
-
117
- /**
118
- * Get the current category tree of the product.
119
- *
120
- * @return Varien_Data_Collection
121
- */
122
- public function getCategories();
123
-
124
- /**
125
- * Get the ids of the category tree of the product.
126
- *
127
- * @return array
128
- */
129
- public function getCategoryIds();
130
-
131
- /**
132
- * Get the attributes of the product.
133
- *
134
- * @return array
135
- */
136
- public function getAttributes();
137
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Entity/Product.php DELETED
@@ -1,214 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Entity_Product
5
- */
6
- class Converdo_Entity_Product extends Converdo_Entity_AbstractEntity implements Converdo_Entity_Interface_ProductInterface
7
- {
8
- /**
9
- * @var Mage_Catalog_Model_Product
10
- */
11
- public $entity;
12
-
13
- /**
14
- * Converdo_Entity_Product constructor.
15
- * @param Mage_Core_Model_Abstract $product
16
- */
17
- public function __construct(Mage_Core_Model_Abstract $product)
18
- {
19
- $this->entity = $product;
20
- }
21
-
22
- /**
23
- * Get the product id.
24
- *
25
- * @return int
26
- */
27
- public function getId()
28
- {
29
- return (int) $this->entity->getId();
30
- }
31
-
32
- /**
33
- * Get the parent product id.
34
- *
35
- * @return int
36
- */
37
- public function getParentId()
38
- {
39
- return (int) $this->entity->getTypeInstance()->getParentIdsByChild($this->getId());
40
- }
41
-
42
- /**
43
- * Get the children product id.
44
- *
45
- * @return int
46
- */
47
- public function getChildrenId()
48
- {
49
- return (int) $this->entity->getTypeInstance()->getChildrenIds($this->getId());
50
- }
51
-
52
- /**
53
- * Get the product name.
54
- *
55
- * @return string
56
- */
57
- public function getName()
58
- {
59
- return (string) addslashes($this->entity->getName());
60
- }
61
-
62
- /**
63
- * Get the product SKU.
64
- *
65
- * @return string
66
- */
67
- public function getSku()
68
- {
69
- return (string) $this->entity->getSku();
70
- }
71
-
72
- /**
73
- * Get the product price.
74
- *
75
- * @return float
76
- */
77
- public function getPrice()
78
- {
79
- return number_format((float) $this->entity->getPrice(), 2);
80
- }
81
-
82
- /**
83
- * Get the product status.
84
- *
85
- * @return bool
86
- */
87
- public function getStatus()
88
- {
89
- return (bool) $this->entity->getStatus();
90
- }
91
-
92
- /**
93
- * Get the product image url.
94
- *
95
- * @return string
96
- */
97
- public function getImageUrl()
98
- {
99
- return (string) $this->entity->getImageUrl();
100
- }
101
-
102
- /**
103
- * Get whether the product is in stock.
104
- *
105
- * @return bool
106
- */
107
- public function isInStock()
108
- {
109
- return (bool) $this->entity->isInStock();
110
- }
111
-
112
- /**
113
- * Get the product stock amount.
114
- *
115
- * @return int
116
- */
117
- public function getStockQuantity()
118
- {
119
- return (float) Mage::getModel('cataloginventory/stock_item')->loadByProduct($this->getId())->getQty();
120
- }
121
-
122
- /**
123
- * Get the ordered quantity amount.
124
- *
125
- * @return float
126
- */
127
- public function getQuantityOrdered()
128
- {
129
- return number_format($this->entity->getQtyOrdered(), 0, '.', '') ?: 0;
130
- }
131
-
132
- /**
133
- * Get the quantity amount.
134
- *
135
- * @return float
136
- */
137
- public function getQuantity()
138
- {
139
- return (float) $this->entity->getQty();
140
- }
141
-
142
- /**
143
- * Get the product type.
144
- *
145
- * @return int
146
- */
147
- public function getType()
148
- {
149
- return (int) $this->entity->getTypeId();
150
- }
151
-
152
- /**
153
- * Get the visibilities of the product.
154
- *
155
- * @return array
156
- */
157
- public function getVisibilities()
158
- {
159
- return [
160
- 'search' => $this->entity->isVisibleInSiteVisibility(),
161
- 'catalog' => $this->entity->isVisibleInCatalog(),
162
- ];
163
- }
164
-
165
- /**
166
- * Get the current category of the product.
167
- *
168
- * @return Mage_Catalog_Model_Category
169
- */
170
- public function getCategory()
171
- {
172
- return $this->entity->getCategory();
173
- }
174
-
175
- /**
176
- * Get the current category tree of the product.
177
- *
178
- * @return Varien_Data_Collection
179
- */
180
- public function getCategories()
181
- {
182
- return $this->entity->getCategoryCollection();
183
- }
184
-
185
- /**
186
- * Get the ids of the category tree of the product.
187
- *
188
- * @return array
189
- */
190
- public function getCategoryIds()
191
- {
192
- return (array) $this->entity->getCategoryIds();
193
- }
194
-
195
- /**
196
- * Get the product's brand.
197
- *
198
- * @return bool
199
- */
200
- public function getBrand()
201
- {
202
- return $this->entity->getAttributeText('manufacturer');
203
- }
204
-
205
- /**
206
- * Get the attributes of the product.
207
- *
208
- * @return array
209
- */
210
- public function getAttributes()
211
- {
212
- return Mage::getModel('eav/entity_attribute_set')->load($this->entity->getAttributeSetId())->getAttributeSetName();
213
- }
214
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Support/QueryParser.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Support_QueryParser
4
- {
5
- /**
6
- * @var array
7
- */
8
- protected static $queries = [];
9
-
10
- /**
11
- * @var mixed
12
- */
13
- protected static $entity;
14
-
15
- /**
16
- * @param $entity
17
- */
18
- public static function entity($entity)
19
- {
20
- self::$entity = $entity;
21
- }
22
-
23
- /**
24
- * Adds a Tracker Query.
25
- *
26
- * @param Converdo_Tracker_Query_Interface_QueryInterface $query
27
- * @param array $options
28
- */
29
- public static function add(Converdo_Tracker_Query_Interface_QueryInterface $query, array $options = [])
30
- {
31
- $parameters = $query->with([self::$entity])->parameters();
32
-
33
- $parameters = $parameters + $options;
34
-
35
- ksort($parameters);
36
-
37
- $output = self::toString($query, $parameters);
38
-
39
- self::$queries[] = $output;
40
- }
41
-
42
- /**
43
- * @return string
44
- */
45
- public static function parse()
46
- {
47
- return implode("\n\t\t\t\t", self::$queries);
48
- }
49
-
50
- protected static function toString(Converdo_Tracker_Query_Interface_QueryInterface $query, array $parameters = [])
51
- {
52
- $output = new Converdo_Support_StringBuilder();
53
-
54
- $output->append("_paq.push(['{$query->view()}'");
55
-
56
- foreach ($parameters as $key => $value) {
57
- $value = self::resolve($value);
58
- $output->append(", {$value}");
59
- }
60
-
61
- $output->append("]);");
62
-
63
- return $output->toString();
64
- }
65
-
66
- protected static function resolve($value)
67
- {
68
- if (count($value) === 1 && $value[0] === Converdo_Support_QueryType::null()) {
69
- return (string) "false";
70
- }
71
-
72
- if (count($value) === 1) {
73
- return (string) "'" . $value[0] . "'";
74
- }
75
-
76
- switch ($value[0]) {
77
- case Converdo_Support_QueryType::float():
78
- return (float) $value[1];
79
-
80
- case Converdo_Support_QueryType::integer():
81
- return (int) $value[1];
82
-
83
- case Converdo_Support_QueryType::null():
84
- return (string) "false";
85
-
86
- case Converdo_Support_QueryType::string():
87
- return (string) "'" . $value[1] . "'";
88
- }
89
-
90
- return (string) "'" . $value[1] . "'";
91
- }
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Support/QueryType.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Support_QueryType
4
- {
5
- protected static $integer = 2;
6
- protected static $string = 1;
7
- protected static $float = 3;
8
- protected static $null = 4;
9
-
10
- /**
11
- * Forces the query parameter to parse as a string.
12
- *
13
- * @return int
14
- */
15
- public static function string()
16
- {
17
- return self::$string;
18
- }
19
-
20
- /**
21
- * Forces the query parameter to parse as an integer.
22
- *
23
- * @return int
24
- */
25
- public static function integer()
26
- {
27
- return self::$integer;
28
- }
29
-
30
- /**
31
- * Forces the query parameter to parse as a float.
32
- *
33
- * @return int
34
- */
35
- public static function float()
36
- {
37
- return self::$float;
38
- }
39
-
40
- /**
41
- * Forces the query parameter to parse as null.
42
- *
43
- * @return int
44
- */
45
- public static function null()
46
- {
47
- return self::$null;
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Support/StringBuilder.php DELETED
@@ -1,170 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Support_StringBuilder
4
- {
5
- /**
6
- * @var array
7
- */
8
- protected $sequence = [];
9
-
10
- /**
11
- * @var string
12
- */
13
- protected $separator;
14
-
15
- public function __construct($segment = null)
16
- {
17
- if ($segment) {
18
- $this->sequence[] = $segment;
19
- }
20
- }
21
-
22
- /**
23
- * @param mixed $value
24
- *
25
- * Appends the specified value to the sequence as a string.
26
- *
27
- * @return $this
28
- */
29
- public function append($value)
30
- {
31
- $this->sequence[] = $value;
32
-
33
- return $this;
34
- }
35
-
36
- /**
37
- * @param Converdo_Support_StringBuilder $stringBuilder
38
- *
39
- * Appends the specified value to the sequence as a string.
40
- *
41
- * @return $this
42
- */
43
- public function merge(Converdo_Support_StringBuilder $stringBuilder)
44
- {
45
- $this->append($stringBuilder->toString());
46
- return $this;
47
- }
48
-
49
- /**
50
- * @param mixed $separator
51
- *
52
- * Sets the separator which is inserted between each appended section.
53
- *
54
- * @return $this
55
- */
56
- public function setSeparator($separator)
57
- {
58
- $this->separator = $separator;
59
- return $this;
60
- }
61
-
62
- /**
63
- * @param Integer $index
64
- *
65
- * Returns the current capacity.
66
- *
67
- * @return String
68
- */
69
- public function charAt($index)
70
- {
71
- return $this->sequence[(int)$index];
72
- }
73
-
74
- /**
75
- * @param Integer $start The beginning index, inclusive.
76
- * @param Integer $end The ending index, exclusive.
77
- *
78
- * Removes the characters in a substring of this sequence.
79
- *
80
- * @return $this
81
- */
82
- public function delete($start, $end)
83
- {
84
- array_splice($this->sequence, $start, $end);
85
- return $this;
86
- }
87
-
88
- /**
89
- * Removes all items from the sequence..
90
- *
91
- * @return $this
92
- */
93
- public function clear()
94
- {
95
- $this->sequence = [];
96
- return $this;
97
- }
98
-
99
- /**
100
- * @param Integer $index Index of char to remove
101
- *
102
- * Removes the char at the specified position in this sequence.
103
- *
104
- * @return $this
105
- */
106
- public function deleteCharAt($index)
107
- {
108
- array_splice($this->sequence, $index, 1);
109
- return $this;
110
- }
111
-
112
- /**
113
- * @param Integer $start The beginning index, inclusive.
114
- * @param Integer $end The ending index, exclusive.
115
- * @param mixed $value Value that will replace previous contents.
116
- *
117
- * Removes the char at the specified position in this sequence.
118
- *
119
- * @return $this
120
- */
121
- public function replace($start, $end, $value)
122
- {
123
- for ($i = $start; $i <= $end - $start; $i++) {
124
- $this->sequence[(int) $i] = $value;
125
- }
126
-
127
- return $this;
128
- }
129
-
130
- /**
131
- * Causes this character sequence to be replaced by the reverse of the sequence.
132
- *
133
- * @return $this
134
- */
135
- public function reverse()
136
- {
137
- $this->sequence = array_reverse($this->sequence);
138
- return $this;
139
- }
140
-
141
- /**
142
- * Returns the length.
143
- *
144
- * @return Integer
145
- */
146
- public function length()
147
- {
148
- return strlen($this->toString());
149
- }
150
-
151
- /**
152
- * Returns a string representing the data in this sequence.
153
- *
154
- * @return String
155
- */
156
- public function toString()
157
- {
158
- return implode($this->separator, $this->sequence);
159
- }
160
-
161
- /**
162
- * Returns a string representing the data in this sequence, in lower case.
163
- *
164
- * @return String
165
- */
166
- public function toLowerCaseString()
167
- {
168
- return strtolower($this->toString());
169
- }
170
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/AbstractPage.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_AbstractPage
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- abstract class Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * Returns the key representing the Page Type.
14
- *
15
- * @return int
16
- */
17
- public function type()
18
- {
19
- return 0;
20
- }
21
-
22
- /**
23
- * Returns an array with mapped Page Subtypes.
24
- *
25
- * @return array
26
- */
27
- public function types()
28
- {
29
- return [];
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Cart.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_Cart
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Cart extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 2;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'checkout_cart_index' => 200,
29
- ];
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Category.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_Category
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Category extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 3;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'catalog_category_view' => 300,
29
- ];
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Checkout.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_Checkout
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Checkout extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 4;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'checkout_onepage_index' => 400,
29
- 'checkout_onepage_success' => 401,
30
- ];
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Contact.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_Contact
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Contact extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 5;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'contacts' => 500,
29
- ];
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Customer.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_AbstractPage
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Customer extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 1;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'customer_account_login' => 100,
29
- 'customer_account_create' => 101,
30
- 'customer_account_index' => 102,
31
- 'customer_account_forgotpassword' => 103,
32
- 'customer_account_edit' => 104,
33
- 'customer_address_form' => 105,
34
- 'sales_order_history' => 106,
35
- 'sales_billing_agreement_index' => 107,
36
- 'sales_recurring_profile_index' => 108,
37
- 'review_customer_index' => 109,
38
- 'wishlist_index_index' => 110,
39
- 'oauth_customer_token_index' => 111,
40
- 'newsletter_manage_index' => 112,
41
- 'downloadable_customer_products' => 113,
42
- 'customer_account_logoutSuccess' => 114,
43
- ];
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Homepage.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_Homepage
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Homepage extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 6;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'cms_index_index' => 600,
29
- ];
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Product.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_Product
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Product extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 7;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'catalog_product_view' => 700,
29
- ];
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Page/Search.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Page_Search
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- class Converdo_Tracker_Page_Search extends Converdo_Tracker_Page_AbstractPage
11
- {
12
- /**
13
- * @inheritdoc
14
- * @return int
15
- */
16
- public function type()
17
- {
18
- return 8;
19
- }
20
-
21
- /**
22
- * @inheritdoc
23
- * @return array
24
- */
25
- public function types()
26
- {
27
- return [
28
- 'catalogsearch_result_index' => 800,
29
- 'catalogsearch_advanced_index' => 801,
30
- 'catalogsearch_advanced_result' => 802,
31
- 'catalogsearch_term_popular' => 803,
32
- ];
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/AbstractProcessor.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Processor_AbstractProcessor
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- */
10
- abstract class Converdo_Tracker_Processor_AbstractProcessor
11
- {
12
- /**
13
- * @var array
14
- */
15
- protected $configuration = [];
16
-
17
- /**
18
- * Returns an encrypted JSON string with configuration.
19
- *
20
- * @return array
21
- */
22
- protected function configuration()
23
- {
24
- return [];
25
- }
26
-
27
- /**
28
- * Sets the configuration.
29
- *
30
- * @param array|string $configuration
31
- */
32
- public function setConfiguration($configuration)
33
- {
34
- $this->configuration = (array) $configuration;
35
- }
36
-
37
- /**
38
- * Gets the configuration.
39
- *
40
- * @return null|string
41
- */
42
- public function getConfiguration()
43
- {
44
- if (! $this->hasConfiguration()) {
45
- return null;
46
- }
47
-
48
- return (array) $this->configuration;
49
- }
50
-
51
- /**
52
- * Gets whether the configuration is set and has data.
53
- *
54
- * @return bool
55
- */
56
- public function hasConfiguration()
57
- {
58
- return (bool) $this->configuration && count($this->configuration);
59
- }
60
-
61
- /**
62
- * @inheritdoc
63
- * @param Converdo_Analytics_Block_Tracker $block
64
- * @return bool
65
- */
66
- public function responsible(Converdo_Analytics_Block_Tracker $block)
67
- {
68
- return true;
69
- }
70
-
71
- /**
72
- * @inheritdoc
73
- * @return void
74
- */
75
- abstract public function process();
76
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/CartProcessor.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_CartProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @var Mage_Checkout_Model_Cart
7
- */
8
- protected $cart;
9
-
10
- /**
11
- * @inheritdoc
12
- * @param Converdo_Analytics_Block_Tracker $block
13
- * @return bool
14
- */
15
- public function responsible(Converdo_Analytics_Block_Tracker $block)
16
- {
17
- $this->cart = Mage::getModel('checkout/cart');
18
-
19
- return (bool) $this->cart->getQuote()->getAllVisibleItems();
20
- }
21
-
22
- /**
23
- * Process everything.
24
- *
25
- * @return void
26
- */
27
- public function process()
28
- {
29
- foreach ($this->cart->getQuote()->getAllVisibleItems() as $key => $item) {
30
- $product = Mage::getModel('catalog/product')->load($item->product_id);
31
- $product = new Converdo_Entity_Product($product);
32
- $category = null;
33
-
34
- if (($categoryIds = $product->getCategoryIds()) && count($categoryIds)) {
35
- $category = Mage::getModel('catalog/category')->load($categoryIds[0]);
36
- $category = $category->getName();
37
- }
38
-
39
- Converdo_Support_QueryParser::entity($product);
40
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_EcommerceItem, [
41
- 2 => [Converdo_Support_QueryType::string(), $category],
42
- 4 => [Converdo_Support_QueryType::float(), $item->getQty()],
43
- ]);
44
- }
45
-
46
- Converdo_Support_QueryParser::entity($this->cart);
47
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_EcommerceCartUpdate);
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/CategoryViewProcessor.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_CategoryViewProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @inheritdoc
7
- * @param Mage_Core_Block_Template $block
8
- * @return bool
9
- */
10
- public function responsible(Mage_Core_Block_Template $block)
11
- {
12
- return Mage::registry('current_category');
13
- }
14
-
15
- /**
16
- * @inheritdoc
17
- * @return void
18
- */
19
- public function process()
20
- {
21
- $category = Mage::registry('current_category');
22
-
23
- Converdo_Support_QueryParser::entity($category);
24
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_CategoryView);
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/CheckoutProcessor.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_CheckoutProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @var Mage_Checkout_Model_Cart
7
- */
8
- protected $cart;
9
-
10
- /**
11
- * @var Converdo_Analytics_Block_Tracker
12
- */
13
- protected $trackers;
14
-
15
- /**
16
- * @inheritdoc
17
- * @param Converdo_Analytics_Block_Tracker $block
18
- * @return bool
19
- */
20
- public function responsible(Converdo_Analytics_Block_Tracker $block)
21
- {
22
- $this->trackers = $block;
23
-
24
- return $block->hasOrderedIds();
25
- }
26
-
27
- /**
28
- * @inheritdoc
29
- * @return void
30
- */
31
- public function process()
32
- {
33
- $collection = Mage::getResourceModel('sales/order_collection')
34
- ->addFieldToFilter('entity_id', array('in' => $this->trackers->getOrderedIds()));
35
-
36
- foreach ($collection as $order) {
37
- foreach ($order->getAllVisibleItems() as $key => $product) {
38
- $product = Mage::getModel('catalog/product')->load($product->product_id);
39
- $product = new Converdo_Entity_Product($product);
40
- $category = "";
41
-
42
- if (($categoryIds = $product->getCategoryIds()) && count($categoryIds)) {
43
- $category = Mage::getModel('catalog/category')->load($categoryIds[0]);
44
- $category = $category->getName();
45
- }
46
-
47
- Converdo_Support_QueryParser::entity($product);
48
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_EcommerceItem, [
49
- 2 => [Converdo_Support_QueryType::string(), $category],
50
- ]);
51
- }
52
-
53
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_EcommerceTracking, [
54
- 0 => [Converdo_Support_QueryType::integer(), $order->getIncrementId()],
55
- 1 => [Converdo_Support_QueryType::float(), $order->getBaseGrandTotal()],
56
- 2 => [Converdo_Support_QueryType::float(), number_format($order->getGrandTotal() - $order->getShippingAmount() - $order->getShippingTaxAmount(), 2)],
57
- 3 => [Converdo_Support_QueryType::float(), $order->getBaseTaxAmount()],
58
- 4 => [Converdo_Support_QueryType::float(), $order->getBaseShippingAmount()],
59
- ]);
60
- }
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/CustomUrlProcessor.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_CustomUrlProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @var Mage_Checkout_Model_Cart
7
- */
8
- protected $cart;
9
-
10
- /**
11
- * @var Converdo_Analytics_Block_Tracker
12
- */
13
- protected $trackers;
14
-
15
- /**
16
- * @inheritdoc
17
- * @param Converdo_Analytics_Block_Tracker $block
18
- * @return bool
19
- */
20
- public function responsible(Converdo_Analytics_Block_Tracker $block)
21
- {
22
- return $block->getRequest()->getControllerName() === 'result';
23
- }
24
-
25
- /**
26
- * @inheritdoc
27
- * @return void
28
- */
29
- public function process()
30
- {
31
- $results = Mage::helper('catalogsearch')->getEngine()
32
- ->getResultCollection()
33
- ->addSearchFilter(Mage::helper('catalogsearch')
34
- ->getQuery()
35
- ->getQueryText())
36
- ->getSize();
37
-
38
- $current = self::getCurrentUrl();
39
- $query = self::getQueryString();
40
- $count = "&search_count={$results}";
41
-
42
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_CustomUrl, [
43
- 0 => [Converdo_Support_QueryType::string(), "{$current}?{$query}{$count}"],
44
- ]);
45
- }
46
-
47
- /**
48
- * Returns the current URL without the query string.
49
- *
50
- * @return string
51
- */
52
- protected static function getCurrentUrl()
53
- {
54
- $url = self::parseUrl();
55
-
56
- $url = $url['scheme'] . '://' . $url['host'] . (isset($url['path']) ? $url['path'] : '');
57
-
58
- return $url;
59
- }
60
-
61
- /**
62
- * Returns the current query string.
63
- *
64
- * @return string
65
- */
66
- protected static function getQueryString()
67
- {
68
- $url = self::parseUrl();
69
-
70
- return $url['query'];
71
- }
72
-
73
- protected static function parseUrl()
74
- {
75
- $url = Mage::helper('core/url')->getCurrentUrl();
76
-
77
- $url = parse_url($url);
78
-
79
- return $url;
80
- }
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/CustomVariableProcessor.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_CustomVariableProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @var Mage_Catalog_Model_Product|Converdo_Entity_Product
7
- */
8
- protected $product;
9
-
10
- /**
11
- * Get whether the processor is responsible for the job.
12
- *
13
- * @param Converdo_Analytics_Block_Tracker $block
14
- * @return bool
15
- */
16
- public function responsible(Converdo_Analytics_Block_Tracker $block)
17
- {
18
- $this->configuration = $block->configuration;
19
-
20
- return true;
21
- }
22
-
23
- /**
24
- * Process everything.
25
- *
26
- * @return void
27
- */
28
- public function process()
29
- {
30
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_CustomVariable, [
31
- 2 => [Converdo_Support_QueryType::string(), Converdo_Support_Crypt::encrypt(json_encode($this->configuration, true))],
32
- 3 => [Converdo_Support_QueryType::string(), 'page'],
33
- ]);
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/FootProcessor.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_FootProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @inheritdoc
7
- * @return void
8
- */
9
- public function process()
10
- {
11
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_PageTracking);
12
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_LinkTracking);
13
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_HeartBeat);
14
- }
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/HeadProcessor.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_HeadProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @inheritdoc
7
- * @return void
8
- */
9
- public function process()
10
- {
11
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_SiteId);
12
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_TrackerUrl);
13
- }
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/Interface/ProcessorInterface.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- interface Converdo_Tracker_Processor_Interface_ProcessorInterface
4
- {
5
- /**
6
- * Gets whether the processor is responsible for the job.
7
- *
8
- * @param Converdo_Analytics_Block_Tracker $block
9
- * @return bool
10
- */
11
- public function responsible(Converdo_Analytics_Block_Tracker $block);
12
-
13
- /**
14
- * Processes everything.
15
- *
16
- * @return void
17
- */
18
- public function process();
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Processor/ProductViewProcessor.php DELETED
@@ -1,124 +0,0 @@
1
- <?php
2
-
3
- class Converdo_Tracker_Processor_ProductViewProcessor extends Converdo_Tracker_Processor_AbstractProcessor
4
- {
5
- /**
6
- * @var Converdo_Entity_Product
7
- */
8
- protected $product;
9
-
10
- /**
11
- * @var array
12
- */
13
- protected $categories = [];
14
-
15
- /**
16
- * Get whether the processor is responsible for the job.
17
- *
18
- * @param Converdo_Analytics_Block_Tracker $block
19
- * @return bool
20
- */
21
- public function responsible(Converdo_Analytics_Block_Tracker $block)
22
- {
23
- return Mage::registry('current_product');
24
- }
25
-
26
- /**
27
- * Process everything.
28
- *
29
- * @return void
30
- */
31
- public function process()
32
- {
33
- $this->product = new Converdo_Entity_Product(Mage::registry('current_product'));
34
-
35
- Converdo_Support_QueryParser::entity($this->product);
36
- Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_ProductView, [
37
- 2 => [Converdo_Support_QueryType::string(), implode(', ', $this->categories())],
38
- ]);
39
-
40
- $this->configuration();
41
- }
42
-
43
- /**
44
- * Get an array of categories assigned to the product.
45
- *
46
- * @return array
47
- */
48
- protected function categories()
49
- {
50
- if ($this->categories) {
51
- return $this->categories;
52
- }
53
-
54
- $categories = [];
55
-
56
- foreach ((array) $this->product->getCategoryIds() as $category)
57
- {
58
- $category = Mage::getModel('catalog/category')->load($category);
59
- $categories[] = addslashes($category->getName());
60
- }
61
-
62
- return $categories;
63
- }
64
-
65
- /**
66
- * Return an encrypted JSON string with configuration.
67
- *
68
- * @return array
69
- */
70
- protected function configuration()
71
- {
72
- $this->setConfiguration([
73
- // Product Name
74
- 'pti' => $this->product->getName(),
75
-
76
- // Product Sku
77
- 'sku' => $this->product->getSku(),
78
-
79
- // Product Price
80
- 'pri' => $this->product->getPrice(),
81
-
82
- // Product Image
83
- 'ima' => $this->product->getImageUrl(),
84
-
85
- // Product categories
86
- 'cat' => implode(', ', $this->categories()),
87
-
88
- // Product Id
89
- 'rid' => $this->product->getId(),
90
-
91
- // Product Children Id
92
- 'tid' => $this->children(),
93
-
94
- // Product Type
95
- 'typ' => $this->product->getType(),
96
-
97
- // Product Attributes
98
- 'att' => $this->product->getAttributes(),
99
-
100
- // Product Is In Stock
101
- 'stb' => $this->product->isInStock(),
102
-
103
- // Product Is In Stock
104
- 'bra' => $this->product->getBrand(),
105
-
106
- // Product Stock Quantity
107
- 'sqn' => $this->product->getStockQuantity(),
108
- 'cva' => null,
109
- 'ova' => null,
110
- 'pco' => null,
111
- ]);
112
- }
113
-
114
- protected function children()
115
- {
116
- $children = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($this->product->getId());
117
-
118
- if (! count($children) || ! isset($children[0])) {
119
- return null;
120
- }
121
-
122
- return array_keys($children[0]);
123
- }
124
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/AbstractQuery.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_AbstractQuery
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- * @link https://piwik.org/docs/ecommerce-analytics/
11
- */
12
- abstract class Converdo_Tracker_Query_AbstractQuery implements Converdo_Tracker_Query_Interface_QueryInterface
13
- {
14
- /**
15
- * @var Varien_Object[]
16
- */
17
- protected $entities = [];
18
-
19
- /**
20
- * @inheritdoc
21
- * @return $this
22
- */
23
- public function with(array $entities = [])
24
- {
25
- $this->entities = array_merge($this->entities, $entities);
26
-
27
- return $this;
28
- }
29
-
30
- /**
31
- * @inheritdoc
32
- * @return array
33
- */
34
- public function parameters()
35
- {
36
- return [];
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/CategoryView.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_CategoryView
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- * @link https://piwik.org/docs/ecommerce-analytics/
11
- */
12
- class Converdo_Tracker_Query_CategoryView extends Converdo_Tracker_Query_AbstractQuery
13
- {
14
- /**
15
- * @inheritdoc
16
- * @return string
17
- */
18
- public function view()
19
- {
20
- return 'setEcommerceView';
21
- }
22
-
23
- /**
24
- * @inheritdoc
25
- * @return array
26
- */
27
- public function parameters()
28
- {
29
- return [
30
- 0 => [Converdo_Support_QueryType::null()],
31
- 1 => [Converdo_Support_QueryType::null()],
32
- 2 => [Converdo_Support_QueryType::string(), $this->entities[0]->getName()],
33
- ];
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/CustomUrl.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_CustomUrl
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_CustomUrl extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'setCustomUrl';
20
- }
21
-
22
- /**
23
- * @inheritdoc
24
- * @return array
25
- */
26
- public function parameters()
27
- {
28
- return [
29
-
30
- ];
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/CustomVariable.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_CustomVariable
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_CustomVariable extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'setCustomVariable';
20
- }
21
-
22
- /**
23
- * @inheritdoc
24
- * @return array
25
- */
26
- public function parameters()
27
- {
28
- return [
29
- 0 => [Converdo_Support_QueryType::integer(), 1],
30
- 1 => [Converdo_Support_QueryType::string(), 'configuration'],
31
- ];
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/EcommerceCartUpdate.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_EcommerceCartUpdate
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- * @link https://piwik.org/docs/ecommerce-analytics/
11
- */
12
- class Converdo_Tracker_Query_EcommerceCartUpdate extends Converdo_Tracker_Query_AbstractQuery
13
- {
14
- /**
15
- * @inheritdoc
16
- * @return string
17
- */
18
- public function view()
19
- {
20
- return 'trackEcommerceCartUpdate';
21
- }
22
-
23
- /**
24
- * @inheritdoc
25
- * @return array
26
- */
27
- public function parameters()
28
- {
29
- return [
30
- 0 => [Converdo_Support_QueryType::float(), number_format($this->entities[0]->getQuote()->getGrandTotal(), 2, ',', '.')],
31
- ];
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/EcommerceItem.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_EcommerceItem
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- * @link https://piwik.org/docs/ecommerce-analytics/
11
- */
12
- class Converdo_Tracker_Query_EcommerceItem extends Converdo_Tracker_Query_AbstractQuery
13
- {
14
- /**
15
- * @var Converdo_Entity_Product
16
- */
17
- protected $entity;
18
-
19
- /**
20
- * @inheritdoc
21
- * @return string
22
- */
23
- public function view()
24
- {
25
- return 'addEcommerceItem';
26
- }
27
-
28
- /**
29
- * @inheritdoc
30
- * @return array
31
- */
32
- public function parameters()
33
- {
34
- return [
35
- 0 => [Converdo_Support_QueryType::string(), $this->entities[0]->getSku()],
36
- 1 => [Converdo_Support_QueryType::string(), $this->entities[0]->getName()],
37
- 3 => [Converdo_Support_QueryType::float(), $this->entities[0]->getPrice()],
38
- ];
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/EcommerceTracking.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_EcommerceTracking
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- * @link https://piwik.org/docs/ecommerce-analytics/
11
- */
12
- class Converdo_Tracker_Query_EcommerceTracking extends Converdo_Tracker_Query_AbstractQuery
13
- {
14
- /**
15
- * @inheritdoc
16
- * @return string
17
- */
18
- public function view()
19
- {
20
- return 'trackEcommerceOrder';
21
- }
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/HeartBeat.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_HeartBeat
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_HeartBeat extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'enableHeartBeatTimer';
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/Interface/QueryInterface.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- interface Converdo_Tracker_Query_Interface_QueryInterface
4
- {
5
- /**
6
- * Returns the query key.
7
- *
8
- * @return mixed
9
- */
10
- public function view();
11
-
12
- /**
13
- * Returns the query parameters.
14
- *
15
- * @return array
16
- */
17
- public function parameters();
18
-
19
- /**
20
- * Pass additional data to the query.
21
- *
22
- * @param array $entities
23
- * @return $this
24
- */
25
- public function with(array $entities = []);
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/LinkTracking.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_LinkTracking
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_LinkTracking extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'enableLinkTracking';
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/PageTracking.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_PageTracking
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_PageTracking extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'trackPageView';
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/PageView.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_PageView
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_PageView extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'setCustomVariable';
20
- }
21
-
22
- /**
23
- * @inheritdoc
24
- * @return array
25
- */
26
- public function parameters()
27
- {
28
- return [
29
- 0 => [Converdo_Support_QueryType::integer(), 1],
30
- 1 => [Converdo_Support_QueryType::string(), 'configuration'],
31
- ];
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/ProductView.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_ProductView
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- * @link https://piwik.org/docs/ecommerce-analytics/
11
- */
12
- class Converdo_Tracker_Query_ProductView extends Converdo_Tracker_Query_AbstractQuery
13
- {
14
- /**
15
- * @inheritdoc
16
- * @return string
17
- */
18
- public function view()
19
- {
20
- return 'setEcommerceView';
21
- }
22
-
23
- /**
24
- * @inheritdoc
25
- * @return array
26
- */
27
- public function parameters()
28
- {
29
- return [
30
- 0 => [Converdo_Support_QueryType::string(), $this->entities[0]->getSku()],
31
- 1 => [Converdo_Support_QueryType::string(), addslashes($this->entities[0]->getName())],
32
- 3 => [Converdo_Support_QueryType::float(), number_format($this->entities[0]->getPrice(), 2)],
33
- ];
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/SiteId.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_SiteId
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_SiteId extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'setSiteId';
20
- }
21
-
22
- /**
23
- * @inheritdoc
24
- * @return array
25
- */
26
- public function parameters()
27
- {
28
- return [
29
- 0 => [Converdo_Support_QueryType::string(), Converdo_Analytics_Helper_Data::getSiteId()],
30
- ];
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Converdo/Tracker/Query/TrackerUrl.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Converdo_Tracker_Query_TrackerUrl
5
- *
6
- * @package Converdo
7
- * @author Marc Roosendaal <marc@converdo.nl>
8
- * @copyright 2016 Converdo B.V.
9
- * @link https://developer.piwik.org/api-reference/tracking-javascript
10
- */
11
- class Converdo_Tracker_Query_TrackerUrl extends Converdo_Tracker_Query_AbstractQuery
12
- {
13
- /**
14
- * @inheritdoc
15
- * @return string
16
- */
17
- public function view()
18
- {
19
- return 'setTrackerUrl';
20
- }
21
-
22
- /**
23
- * @inheritdoc
24
- * @return array
25
- */
26
- public function parameters()
27
- {
28
- return [
29
- 0 => [Converdo_Support_QueryType::string(), Converdo_Analytics_Helper_Data::getPhpTracker(true)],
30
- ];
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Converdo_Analytics</name>
4
- <version>1.2.5.0</version>
5
  <stability>stable</stability>
6
  <license>MITL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily.</summary>
10
  <description>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily. This plugin, installed in a minute, is all you need to have a complete and powerfull Analytics Suite. View your KPI's and sales funnels, segmented on dozens of dimensions like page type, device, landing page, campaign, etc. This plugin collects your users behaviour so you can view the insights on your dashboard on converdo.com. You can use Converdo Analytics side by side with Google Analytics without a problem. It works asynchronous so it will never impact your user experience. This extension is made especially for Magento ecommerce stores, which provides you powerfull insights out of the box.</description>
11
- <notes>January Update</notes>
12
  <authors><author><name>Roeland van Oostenbrugge</name><user>converdo</user><email>roeland@converdo.nl</email></author></authors>
13
- <date>2017-02-02</date>
14
- <time>10:43:10</time>
15
- <contents><target name="magecommunity"><dir name="Converdo"><dir name="Analytics"><dir name="Block"><file name="Tracker.php" hash="764336768ca80603761bb53fe701d7f1"/></dir><dir name="Helper"><file name="Data.php" hash="c4d21c9630645736d2ea741d4536dd91"/></dir><dir name="Model"><file name="Observer.php" hash="0b1e93efcb995705bda3c99a136f66ae"/></dir><dir name="controllers"><file name="PingController.php" hash="98437b8791e27b3ad1db915c805b5063"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9923bfe8c0f4aa318166e15cd373cf09"/><file name="config.xml" hash="a2f6ab7c211d3cce4e73abffa41c7548"/><file name="system.xml" hash="7f90adaa9874a50b30e7d65cb8eb173b"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="analytics.xml" hash="d3f9d35df1981968a55a331c2b92d473"/></dir><dir name="template"><dir name="analytics"><file name="analytics.phtml" hash="a6455a39c95ec8f8df7c9b4fe6142627"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><file name="converdoanalytics.xml" hash=""/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Converdo_Analytics.xml" hash="119a038ca81bdf03767b1b12d81414ad"/></dir></target><target name="magelib"><dir name="Converdo"><dir name="Entity"><file name="AbstractEntity.php" hash="4130576c917771fdafcb4055363b2861"/><dir name="Interface"><file name="EntityInterface.php" hash="cb6a4e6da90518a9ffa8445314de56c1"/><file name="ProductInterface.php" hash="56d58a99fed4f9ab9ac699dcc59dee81"/></dir><file name="Product.php" hash="07a30cc24308adeb15793ffd0a3e3448"/></dir><dir name="Support"><file name="Crypt.php" hash="265f44cafba70116f72c255dd737a805"/><file name="QueryParser.php" hash="fad8540e335dd0a5e117489207453233"/><file name="QueryType.php" hash="ba9a87192c533cb0faf693f5921775c0"/><file name="StringBuilder.php" hash="282b1a3111f7cdf4c3b88f6320a8c57e"/></dir><dir name="Tracker"><dir name="Page"><file name="AbstractPage.php" hash="e22d9ccfcc4c15ec7712549eb28dcb93"/><file name="Cart.php" hash="344165e416a144925d9c004dd4fe64dc"/><file name="Category.php" hash="ad360cf14714f5f83200f43fc7da6318"/><file name="Checkout.php" hash="0e4943a85a61a9557ccb8df3d5c828ec"/><file name="Contact.php" hash="09d7bf93433926d8b02ec26802933777"/><file name="Customer.php" hash="dc56b1d038618e9cb035bbf7045000db"/><file name="Homepage.php" hash="f7be65045ac07de2bf3e3bae3f70ec5a"/><file name="Product.php" hash="c14b8e3c8f7c0c6af6c2153e6d1b8519"/><file name="Search.php" hash="0c6c32a5ceec293a87b4b339ac669891"/></dir><dir name="Processor"><file name="AbstractProcessor.php" hash="becc5295bdaaf413995b9fe95c9b0d1e"/><file name="CartProcessor.php" hash="d2709554c310b9cbcff93d99d0a9ac4e"/><file name="CategoryViewProcessor.php" hash="7eb98e452fa38adb49d1405e3204944a"/><file name="CheckoutProcessor.php" hash="71187080acb35b69ee07a9793f8e3293"/><file name="CustomUrlProcessor.php" hash="87c6e909697fb6216014187d7fc1eb07"/><file name="CustomVariableProcessor.php" hash="d5a115455dd048ebd49226074d9b9a86"/><file name="FootProcessor.php" hash="b1dbccbc34a6fa541ba9e2ff0ef6adfc"/><file name="HeadProcessor.php" hash="bdf476a4bfcd18d22de9d566ca2c9911"/><dir name="Interface"><file name="ProcessorInterface.php" hash="b4d97a90b6110c09a2bac67ffa4f6634"/></dir><file name="PageViewProcessor.php" hash="cc2c4bc1e163e13a1168196dd70f526a"/><file name="ProductViewProcessor.php" hash="4c63a4417de9a755d0d05213d75d3953"/></dir><dir name="Query"><file name="AbstractQuery.php" hash="8133d2b672874d40f859bd042771a53a"/><file name="CategoryView.php" hash="3607b3096dca90247cc1d5e777f4ec8c"/><file name="CustomUrl.php" hash="75bac9b592363617b4156423d636ad3e"/><file name="CustomVariable.php" hash="c5a1abd4badcefa3ce9fac42d73b5789"/><file name="EcommerceCartUpdate.php" hash="01a0b1233754c7d133f76f3843eda9ea"/><file name="EcommerceItem.php" hash="d1269f322fc5c4a1dbdbf9e869a0a541"/><file name="EcommerceTracking.php" hash="e065017782b22675273327dfba4fde6d"/><file name="HeartBeat.php" hash="4329afd34f622d5a5f0444a88ee1a3f7"/><dir name="Interface"><file name="QueryInterface.php" hash="5c80f20d543987cd3af1a74639fdd2ed"/></dir><file name="LinkTracking.php" hash="656ff44dd821b4167c9e5bbb10dea087"/><file name="PageTracking.php" hash="6d1c5d56750221a945b6268b6dccce05"/><file name="PageView.php" hash="f1ef5fd152710d341d476d0056e89ce4"/><file name="ProductView.php" hash="567375f931e8d93b662ca41189077a5c"/><file name="SiteId.php" hash="68e69921ca9e3a677436705d64c75b46"/><file name="TrackerUrl.php" hash="94d890dea4033fc8c1717ce3bf1861aa"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Converdo_Magento.csv" hash=""/></dir><dir name="nl_NL"><file name="Converdo_Magento.csv" hash=""/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="converdoanalytics"><dir name="css"><file name="system_config_edit.css" hash="fd6f5337fd9a9b69b85079e17aa0e40b"/></dir><dir name="images"><file name="favicon.png" hash="674c9388eba1ea89e200fe6b1a62fc24"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.5.37</min><max>7.0.5</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Converdo_Analytics</name>
4
+ <version>2.0.0.0</version>
5
  <stability>stable</stability>
6
  <license>MITL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily.</summary>
10
  <description>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily. This plugin, installed in a minute, is all you need to have a complete and powerfull Analytics Suite. View your KPI's and sales funnels, segmented on dozens of dimensions like page type, device, landing page, campaign, etc. This plugin collects your users behaviour so you can view the insights on your dashboard on converdo.com. You can use Converdo Analytics side by side with Google Analytics without a problem. It works asynchronous so it will never impact your user experience. This extension is made especially for Magento ecommerce stores, which provides you powerfull insights out of the box.</description>
11
+ <notes>Rewrite</notes>
12
  <authors><author><name>Roeland van Oostenbrugge</name><user>converdo</user><email>roeland@converdo.nl</email></author></authors>
13
+ <date>2017-02-13</date>
14
+ <time>14:35:37</time>
15
+ <contents><target name="magecommunity"><dir name="Converdo"><dir name="Analytics"><dir name="Block"><file name="Tracker.php" hash="d161b6c297bd69574efb0452a388be27"/></dir><dir name="Helper"><file name="Data.php" hash="c7437902716c6695e9794baea72c2c1b"/></dir><dir name="Model"><file name="Observer.php" hash="0b1e93efcb995705bda3c99a136f66ae"/></dir><dir name="controllers"><file name="PingController.php" hash="98437b8791e27b3ad1db915c805b5063"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9923bfe8c0f4aa318166e15cd373cf09"/><file name="config.xml" hash="cf9268f1181da64533af3fc72e51b575"/><file name="system.xml" hash="7f90adaa9874a50b30e7d65cb8eb173b"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="analytics.xml" hash="d3f9d35df1981968a55a331c2b92d473"/></dir><dir name="template"><dir name="analytics"><file name="analytics.phtml" hash="59d017e5f7e71cc59a638a9dd2056a42"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Converdo_Analytics.xml" hash="119a038ca81bdf03767b1b12d81414ad"/></dir></target><target name="magelib"><dir name="Converdo"><dir name="Analytics"><dir name="Models"><file name="CategoryView.php" hash="4807abcd95dc03913f50d7a659af2ceb"/><file name="Configuration.php" hash="27c2b1af7cab96602b1ce16d78d3d26f"/><file name="EcommerceCartUpdate.php" hash="1b3bf769de5f89745850232737157e3a"/><file name="EcommerceOrder.php" hash="0fba70eb9260c602de6ac4ce6bab68b4"/><file name="EcommerceProduct.php" hash="f51778a075e4b37c169675db94f3692c"/><file name="EcommerceView.php" hash="1bfe9e0e2af54b89cd8c5bac7d152dd1"/><file name="PageView.php" hash="3ddba9f413ddd669f704c7a8bb9bdca2"/><file name="SearchView.php" hash="1af494ba379a47d9354de5a9cc1a8a1f"/></dir><dir name="Support"><file name="AbstractTracker.php" hash="a109cd7691e62ed66e268de9a4d2f4d5"/><file name="Arrayable.php" hash="6f4f522e26ff9c327f4ae764fb4bb4bf"/><file name="Crypt.php" hash="4eb80851c9d38113adbad86a6809bbcc"/><file name="HoldsAttributes.php" hash="0600d8c3d15c327e07de31679a79aa6c"/></dir><file name="Tracker.php" hash="0bb1a1e9a7590ca67ccc9ff8f62dbeda"/><dir name="Trackers"><file name="Cart.php" hash="f228c95dbe51ce569948fa594d196ab8"/><file name="CategoryView.php" hash="de918f7324f96b8ba67a2fe247b8168f"/><file name="Configuration.php" hash="c9fa8d249ebd86035e4b442bb4b9c5d9"/><file name="EcommerceView.php" hash="3906d42f13449afabb8ded4ca96b8f72"/><file name="Options.php" hash="7fb970c74dd4f1ee9373cd63136b67d4"/><file name="Order.php" hash="1b75a5fca9a6b60cd6cd68e46812c53c"/><file name="PageView.php" hash="18fa62007a9d19df3e176c0291fddedc"/><file name="SearchView.php" hash="de9b3f6caa9a5ab695e30a2fc9d6aa42"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Converdo_Magento.csv" hash=""/></dir><dir name="nl_NL"><file name="Converdo_Magento.csv" hash=""/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="converdoanalytics"><dir name="css"><file name="system_config_edit.css" hash="fd6f5337fd9a9b69b85079e17aa0e40b"/></dir><dir name="images"><file name="favicon.png" hash="674c9388eba1ea89e200fe6b1a62fc24"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="converdoanalytics.xml" hash="b949a1ad4594eeb82ae7138c60afc19e"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.5.37</min><max>7.0.5</max></php></required></dependencies>
18
  </package>