VeInteractive_VePlatform - Version 16.3.5.0

Version Notes

Bug fixes and new features.

Download this release

Release Info

Developer VeInteractive
Extension VeInteractive_VePlatform
Version 16.3.5.0
Comparing to
See all releases


Code changes from version 15.1.2.0 to 16.3.5.0

Files changed (68) hide show
  1. app/code/community/VeInteractive/VePlatform/Block/ConfigFieldset.php +122 -222
  2. app/code/community/VeInteractive/VePlatform/Block/Template.php +19 -17
  3. app/code/community/VeInteractive/VePlatform/Block/Vemaster.php +33 -0
  4. app/code/community/VeInteractive/VePlatform/Block/Vepixel.php +22 -25
  5. app/code/community/VeInteractive/VePlatform/Block/Vetag.php +13 -15
  6. app/code/community/VeInteractive/VePlatform/Helper/Data.php +48 -56
  7. app/code/community/VeInteractive/VePlatform/Model/Data.php +407 -0
  8. app/code/community/VeInteractive/VePlatform/Model/Products.php +0 -45
  9. app/code/community/VeInteractive/VePlatform/Observer/AdminUserLoadAfter.php +17 -152
  10. app/code/community/VeInteractive/VePlatform/Observer/Layout.php +47 -36
  11. app/code/community/VeInteractive/VePlatform/Observer/SaveSettings.php +0 -66
  12. app/code/community/VeInteractive/VePlatform/Observer/ThanksPage.php +7 -8
  13. app/code/community/VeInteractive/VePlatform/controllers/Adminhtml/CustomController.php +72 -0
  14. app/code/community/VeInteractive/VePlatform/controllers/IndexController.php +12 -0
  15. app/code/community/VeInteractive/VePlatform/etc/adminhtml.xml +2 -2
  16. app/code/community/VeInteractive/VePlatform/etc/config.xml +104 -84
  17. app/code/community/VeInteractive/VePlatform/etc/system.xml +2 -11
  18. app/code/community/VeInteractive/VePlatform/templates/vemaster.phtml +3 -0
  19. app/code/community/VeInteractive/VePlatform/templates/vepixel.phtml +1 -1
  20. app/code/community/VeInteractive/VePlatform/templates/vetag.phtml +13 -10
  21. app/design/adminhtml/veplatform/default/template/systemconfig/veplatform_options_settings/formfieldset/footer.phtml +0 -2
  22. app/design/adminhtml/veplatform/default/template/systemconfig/veplatform_options_settings/formfieldset/header.phtml +34 -1017
  23. app/design/frontend/base/default/layout/veplatform.xml +9 -0
  24. app/etc/modules/VeInteractive_VePlatform.xml +8 -8
  25. package.xml +55 -19
  26. skin/adminhtml/veplatform/default/css/veplatform.php +24 -0
  27. skin/adminhtml/veplatform/default/fonts/DINComp-Bold.ttf +0 -0
  28. skin/adminhtml/veplatform/default/fonts/DINComp-Light.ttf +0 -0
  29. skin/adminhtml/veplatform/default/fonts/DINComp-Medium.ttf +0 -0
  30. skin/adminhtml/veplatform/default/fonts/DINComp.ttf +0 -0
  31. skin/adminhtml/veplatform/default/fonts/DINWeb-Bold.eot +0 -0
  32. skin/adminhtml/veplatform/default/fonts/DINWeb-Bold.woff +0 -0
  33. skin/adminhtml/veplatform/default/fonts/DINWeb-Light.eot +0 -0
  34. skin/adminhtml/veplatform/default/fonts/DINWeb-Light.woff +0 -0
  35. skin/adminhtml/veplatform/default/fonts/DINWeb-Medium.eot +0 -0
  36. skin/adminhtml/veplatform/default/fonts/DINWeb-Medium.woff +0 -0
  37. skin/adminhtml/veplatform/default/fonts/DINWeb.eot +0 -0
  38. skin/adminhtml/veplatform/default/fonts/DINWeb.woff +0 -0
  39. skin/adminhtml/veplatform/default/images/MagentoConnect.png +0 -0
  40. skin/adminhtml/veplatform/default/images/account-manager-logo.png +0 -0
  41. skin/adminhtml/veplatform/default/images/apps-logo.png +0 -0
  42. skin/adminhtml/veplatform/default/images/creatives-logo.png +0 -0
  43. skin/adminhtml/veplatform/default/images/header_banner.jpg +0 -0
  44. skin/adminhtml/veplatform/default/images/icons-sdb320c34e8.png +0 -0
  45. skin/adminhtml/veplatform/default/images/icons.png +0 -0
  46. skin/adminhtml/veplatform/default/images/icons/envelope.png +0 -0
  47. skin/adminhtml/veplatform/default/images/icons/phone.png +0 -0
  48. skin/adminhtml/veplatform/default/images/icons/pike.png +0 -0
  49. skin/adminhtml/veplatform/default/images/loading.gif +0 -0
  50. skin/adminhtml/veplatform/default/images/main-logo.png +0 -0
  51. skin/adminhtml/veplatform/default/images/product_selected.png +0 -0
  52. skin/adminhtml/veplatform/default/images/radio_selected.png +0 -0
  53. skin/adminhtml/veplatform/default/images/radio_unselected.png +0 -0
  54. skin/adminhtml/veplatform/default/images/ve-check.png +0 -0
  55. skin/adminhtml/veplatform/default/images/ve-logo.png +0 -0
  56. skin/adminhtml/veplatform/default/images/veads-logo-big.png +0 -0
  57. skin/adminhtml/veplatform/default/images/veads-logo-min.png +0 -0
  58. skin/adminhtml/veplatform/default/images/veads-logo.png +0 -0
  59. skin/adminhtml/veplatform/default/images/veassist-logo-big.png +0 -0
  60. skin/adminhtml/veplatform/default/images/veassist-logo-min.png +0 -0
  61. skin/adminhtml/veplatform/default/images/veassist-logo.png +0 -0
  62. skin/adminhtml/veplatform/default/images/vechat-logo-big.png +0 -0
  63. skin/adminhtml/veplatform/default/images/vechat-logo-min.png +0 -0
  64. skin/adminhtml/veplatform/default/images/vechat-logo.png +0 -0
  65. skin/adminhtml/veplatform/default/images/vecontact-logo-big.png +0 -0
  66. skin/adminhtml/veplatform/default/images/vecontact-logo-min.png +0 -0
  67. skin/adminhtml/veplatform/default/images/vecontact-logo.png +0 -0
  68. skin/frontend/base/default/js/veinteractive/veplatform/veplatform.js +177 -0
app/code/community/VeInteractive/VePlatform/Block/ConfigFieldset.php CHANGED
@@ -1,223 +1,123 @@
1
- <?php
2
-
3
- class VeInteractive_VePlatform_Block_ConfigFieldset
4
- extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
5
-
6
- const MY_SECTION = "veplatform_options";
7
- const MY_PACKAGE = "veplatform";
8
- const MY_THEME = "default";
9
- const PUBLIC_DESIGN_AREA = "skin";
10
- const IMAGES_DIR = "images";
11
- const FONTS_DIR = "fonts";
12
- const PRODUCTS_MODEL_KEY = "VeInteractive_VePlatform/Products";
13
- const PRODUCTS_SETTINGS_KEY = 'veplatform_options/settings/products';
14
- const THANKS_DISPLAYED_KEY_PATTERN = "veplatform/adminhtml/%s/thanks_displayed";
15
- const HEADER_TEMPLATE_PATH = "systemconfig/%s/formfieldset/header.phtml";
16
- const FOOTER_TEMPLATE_PATH = "systemconfig/%s/formfieldset/footer.phtml";
17
-
18
- private $on_my_section;
19
- private $found_table;
20
- private $model;
21
-
22
- public function getMyImagesUrl( $image )
23
- {
24
- return $this->getSkinUrl(). self::IMAGES_DIR. DS. $image;
25
- }
26
-
27
- public function getMyFontsUrl( $font )
28
- {
29
- return $this->getSkinUrl(). self::FONTS_DIR. DS. $font;
30
- }
31
-
32
- public function isVeAssistCtrlEnabled()
33
- {
34
- return $this->isProductCtrlEnabled( $this->getModel()->getVeAssistID() );
35
- }
36
-
37
- public function isVeAdsCtrlEnabled()
38
- {
39
- return $this->isProductCtrlEnabled( $this->getModel()->getVeAdsID() );
40
- }
41
-
42
- public function isVeChatCtrlEnabled()
43
- {
44
- return $this->isProductCtrlEnabled( $this->getModel()->getVeChatID() );
45
- }
46
-
47
- public function isVeContactCtrlEnabled()
48
- {
49
- return $this->isProductCtrlEnabled( $this->getModel()->getVeContactID() );
50
- }
51
-
52
- public function isAnyProductCtrlEnabled()
53
- {
54
- if( $this->isVeChatCtrlEnabled() ) return true;
55
- if( $this->isVeContactCtrlEnabled() ) return true;
56
- if( $this->isVeAssistCtrlEnabled() ) return true;
57
- if( $this->isVeAdsCtrlEnabled() ) return true;
58
- // Add products.
59
- return false;
60
- }
61
-
62
- public function triggerThanksTime() {
63
- $isThanksDisplayed = true;
64
- $products = $this->getModel()->getAlls();
65
- if( $products ) {
66
- for( $idx = 0; $idx < count( $products ); $idx++ ) {
67
- if( $this->isProductCtrlEnabled( $products[ $idx ] ) ) {
68
- $isProductThanksDisplayed = $this->triggerThanksDisplayed( $products[ $idx ] );
69
- if( !$isProductThanksDisplayed ) $isThanksDisplayed = false;
70
- }
71
- }
72
- }
73
- return !$isThanksDisplayed;
74
- }
75
-
76
- private function triggerThanksDisplayed( $product ) {
77
- $config_path = sprintf( self::THANKS_DISPLAYED_KEY_PATTERN, $product );
78
- $thanks_displayed = Mage::getStoreConfig( $config_path );
79
- if( !$thanks_displayed ) {
80
- Mage::getConfig()->saveConfig( $config_path, true );
81
- Mage::app()->getCacheInstance()->cleanType( "config" );
82
- }
83
- return $thanks_displayed;
84
- }
85
-
86
- private function isProductCtrlEnabled( $product ) {
87
- $products = self::getProductsEnabled();
88
- return ( $products && in_array( $product, $products ) );
89
- }
90
-
91
- public static function setProductsEnabled( $products ) {
92
- if( empty( $products ) ) $products = array();
93
- $products_list = implode( ',', $products );
94
- $products_list = ','. $products_list;
95
- // Example: $products_list = ',vecontact,vechat'.
96
- // VeInteractive_VePlatform_Model_Products - save it as list.
97
- Mage::getConfig()->saveConfig( self::PRODUCTS_SETTINGS_KEY, $products_list );
98
- Mage::app()->getCacheInstance()->cleanType( "config" );
99
- }
100
-
101
- public static function getProductsEnabled() {
102
- // Example: $products_list = ',vecontact,vechat'.
103
- // VeInteractive_VePlatform_Model_Products - save it as list.
104
- $products = null;
105
- $products_list = Mage::getStoreConfig( self::PRODUCTS_SETTINGS_KEY );
106
- if( $products_list ) $products = explode( ',', trim( $products_list, ',' ) );
107
- return $products;
108
- }
109
-
110
- private function getModel() {
111
- if( !$this->model ) $this->model = Mage::getModel( self::PRODUCTS_MODEL_KEY );
112
- return $this->model;
113
- }
114
-
115
- protected function _construct(){
116
- parent::_construct();
117
- $section = $this->getAction()->getRequest()->getParam( 'section', false );
118
- $this->on_my_section = ( $section === self::MY_SECTION );
119
- }
120
-
121
- /* To use this function remove fieldset from template.
122
- protected function _getHeaderHtml( $element ) {
123
-
124
- $header = parent::_getHeaderHtml( $element );
125
-
126
- if( $this->on_my_section ) {
127
-
128
- $header_without_table = $this->removeTable( $header, true );
129
- if( $header_without_table !== false ) {
130
- $this->found_table = true;
131
- $this->setData( "parent_html_id", $element->getHtmlId() );
132
- $template_path = sprintf( self::HEADER_TEMPLATE_PATH, $element->getHtmlId() );
133
- $header = $header_without_table. $this->generateHtml( $template_path );
134
- }
135
-
136
- }
137
-
138
- return $header;
139
-
140
- }
141
- */
142
-
143
- protected function _getHeaderHtml( $element ) {
144
- if( !$this->on_my_section ) {
145
- $header = parent::_getHeaderHtml( $element );
146
- }
147
- else {
148
- $this->setData( "parent_html_id", $element->getHtmlId() );
149
- $template_path = sprintf( self::HEADER_TEMPLATE_PATH, $element->getHtmlId() );
150
- $header = $this->generateHtml( $template_path );
151
- }
152
- return $header;
153
- }
154
-
155
- /* To use this function remove fieldset from template.
156
- protected function _getFooterHtml( $element ) {
157
-
158
- $footer = parent::_getFooterHtml( $element );
159
-
160
- if( $this->on_my_section && $this->found_table ) {
161
-
162
- $footer_without_table = $this->removeTable( $footer, false );
163
- if( $footer_without_table !== false ) {
164
- $template_path = sprintf( self::FOOTER_TEMPLATE_PATH, $element->getHtmlId() );
165
- $footer = $footer_without_table. $this->generateHtml( $template_path );
166
- }
167
-
168
- }
169
-
170
- return $footer;
171
- }
172
- */
173
-
174
- protected function _getFooterHtml($element) {
175
- if( !$this->on_my_section ) {
176
- $footer = parent::_getFooterHtml( $element );
177
- }
178
- else {
179
- $template_path = sprintf( self::FOOTER_TEMPLATE_PATH, $element->getHtmlId() );
180
- $footer = $this->generateHtml( $template_path );
181
- }
182
- return $footer;
183
- }
184
-
185
- private function generateHtml( $template_path ) {
186
-
187
- $this->setTemplate( $template_path );
188
-
189
- // Change Theme only for this Block.
190
- $design = Mage::getDesign();
191
- $package_name = $design->getPackageName();
192
- $theme_name = $design->getTheme( self::PUBLIC_DESIGN_AREA );
193
- $design->setPackageName( self::MY_PACKAGE )->setTheme( self::MY_THEME );
194
-
195
- $html = $this->toHtml();
196
-
197
- // Restore Theme.
198
- $design->setPackageName( $package_name )->setTheme( $theme_name );
199
-
200
- return $html;
201
-
202
- }
203
-
204
- /*
205
- private function removeTable( $html, $toend ) {
206
-
207
- if( $toend ) {
208
- // Remove from <table> to end.
209
- $ipos = stripos( $html, "<table " );
210
- if( $ipos !== false )
211
- $html_without_table = substr( $html, 0, $ipos );
212
- } else {
213
- // Remove until </table> included.
214
- $ipos = stripos( $html, "</table>" );
215
- if( $ipos !== false )
216
- $html_without_table = substr( $html, $ipos + strlen( "</table>" ), strlen( $html ) - strlen( "</table>" ) - $ipos );
217
- }
218
-
219
- return $html_without_table;
220
-
221
- }
222
- */
223
  }
1
+ <?php
2
+
3
+ class VeInteractive_VePlatform_Block_ConfigFieldset
4
+ extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
5
+
6
+ const MY_SECTION = "veplatform_options";
7
+ const MY_PACKAGE = "veplatform";
8
+ const MY_THEME = "default";
9
+ const PUBLIC_DESIGN_AREA = "skin";
10
+ const IMAGES_DIR = "images";
11
+ const FONTS_DIR = "fonts";
12
+ const CSS_DIR = "css";
13
+ const SCRIPTS_DIR = "scripts";
14
+ const HEADER_TEMPLATE_PATH = "systemconfig/%s/formfieldset/header.phtml";
15
+ const FOOTER_TEMPLATE_PATH = "systemconfig/%s/formfieldset/footer.phtml";
16
+
17
+ private $on_my_section;
18
+
19
+ public function getMyImagesUrl($image) {
20
+ return $this->getSkinUrl() . self::IMAGES_DIR . DS . $image;
21
+ }
22
+
23
+ public function getMyFontsUrl($font) {
24
+ return $this->getSkinUrl() . self::FONTS_DIR . DS . $font;
25
+ }
26
+
27
+ public function getMyCssUrl($css) {
28
+ return $this->getSkinUrl() . self::CSS_DIR . DS . $css;
29
+ }
30
+
31
+ public function getMyScriptsUrl($script) {
32
+ return $this->getSkinUrl() . self::SCRIPTS_DIR . DS . $script;
33
+ }
34
+
35
+ protected function _construct() {
36
+ parent::_construct();
37
+ $section = $this->getAction()->getRequest()->getParam('section', false);
38
+ $this->on_my_section = ($section === self::MY_SECTION);
39
+ }
40
+
41
+ /* To use this function remove fieldset from template.
42
+ protected function _getHeaderHtml( $element ) {
43
+
44
+ $header = parent::_getHeaderHtml( $element );
45
+
46
+ if( $this->on_my_section ) {
47
+
48
+ $header_without_table = $this->removeTable( $header, true );
49
+ if( $header_without_table !== false ) {
50
+ $this->found_table = true;
51
+ $this->setData( "parent_html_id", $element->getHtmlId() );
52
+ $template_path = sprintf( self::HEADER_TEMPLATE_PATH, $element->getHtmlId() );
53
+ $header = $header_without_table. $this->generateHtml( $template_path );
54
+ }
55
+
56
+ }
57
+
58
+ return $header;
59
+
60
+ }
61
+ */
62
+
63
+ protected function _getHeaderHtml($element) {
64
+
65
+
66
+ if(!$this->on_my_section) {
67
+ $header = parent::_getHeaderHtml($element);
68
+ } else {
69
+ $this->setData("parent_html_id", $element->getHtmlId());
70
+ $template_path = sprintf(self::HEADER_TEMPLATE_PATH, $element->getHtmlId());
71
+ $header = $this->generateHtml($template_path);
72
+ }
73
+ return $header;
74
+ }
75
+
76
+ /* To use this function remove fieldset from template.
77
+ protected function _getFooterHtml( $element ) {
78
+
79
+ $footer = parent::_getFooterHtml( $element );
80
+
81
+ if( $this->on_my_section && $this->found_table ) {
82
+
83
+ $footer_without_table = $this->removeTable( $footer, false );
84
+ if( $footer_without_table !== false ) {
85
+ $template_path = sprintf( self::FOOTER_TEMPLATE_PATH, $element->getHtmlId() );
86
+ $footer = $footer_without_table. $this->generateHtml( $template_path );
87
+ }
88
+
89
+ }
90
+
91
+ return $footer;
92
+ }
93
+ */
94
+
95
+ protected function _getFooterHtml($element) {
96
+ if(!$this->on_my_section) {
97
+ $footer = parent::_getFooterHtml($element);
98
+ } else {
99
+ $template_path = sprintf(self::FOOTER_TEMPLATE_PATH, $element->getHtmlId());
100
+ $footer = $this->generateHtml($template_path);
101
+ }
102
+ return $footer;
103
+ }
104
+
105
+ private function generateHtml($template_path) {
106
+
107
+ $this->setTemplate($template_path);
108
+
109
+ // Change Theme only for this Block.
110
+ $design = Mage::getDesign();
111
+ $package_name = $design->getPackageName();
112
+ $theme_name = $design->getTheme(self::PUBLIC_DESIGN_AREA);
113
+ $design->setPackageName(self::MY_PACKAGE)->setTheme(self::MY_THEME);
114
+
115
+ $html = $this->toHtml();
116
+
117
+ // Restore Theme.
118
+ $design->setPackageName($package_name)->setTheme($theme_name);
119
+
120
+ return $html;
121
+
122
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  }
app/code/community/VeInteractive/VePlatform/Block/Template.php CHANGED
@@ -1,17 +1,19 @@
1
- <?php
2
-
3
- class VeInteractive_VePlatform_Block_Template extends Mage_Core_Block_Template {
4
-
5
- public function renderLocalTemplate( $template_name, $params = array() )
6
- {
7
- $template_path = Mage::getModuleDir( '', $this->getModuleName() ). DS. 'templates'. DS. $template_name. '.phtml';
8
- $inums = extract( $params );
9
-
10
- ob_start();
11
- require $template_path;
12
- $html = ob_get_contents();
13
- ob_end_clean();
14
-
15
- return $html;
16
- }
17
- }
 
 
1
+ <?php
2
+
3
+ class VeInteractive_VePlatform_Block_Template extends Mage_Core_Block_Template {
4
+
5
+ public function __construct() {
6
+ parent::__construct();
7
+ }
8
+
9
+ public function renderLocalTemplate($template_name, $params = array()) {
10
+ $template_path = Mage::getModuleDir('', $this->getModuleName()) . DS . 'templates' . DS . $template_name . '.phtml';
11
+
12
+ ob_start();
13
+ require $template_path;
14
+ $html = ob_get_contents();
15
+ ob_end_clean();
16
+
17
+ return $html;
18
+ }
19
+ }
app/code/community/VeInteractive/VePlatform/Block/Vemaster.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VeInteractive_VePlatform_Block_Vemaster extends VeInteractive_VePlatform_Block_Template
4
+ {
5
+
6
+ protected $data;
7
+
8
+ public function __construct()
9
+ {
10
+ parent::__construct();
11
+ $this->data = Mage::getModel('VeInteractive_VePlatform/data');
12
+ }
13
+
14
+ public function getMasterData(){
15
+ $masterData = array(
16
+ 'currency' => $this->data->getCurrency(),
17
+ 'language' => $this->data->getLanguage(),
18
+ 'culture' => $this->data->getCultureInformation(),
19
+ 'user' => $this->data->getCustomer(),
20
+ 'currentPage' => $this->data->getCurrentPage(),
21
+ 'history' => $this->data->getUserHistory(),
22
+ 'cart' => $this->data->getCurrentOrder()
23
+ );
24
+
25
+
26
+ return $masterData;
27
+ }
28
+
29
+ public function _toHtml()
30
+ {
31
+ return $this->renderLocalTemplate( 'vemaster' );
32
+ }
33
+ }
app/code/community/VeInteractive/VePlatform/Block/Vepixel.php CHANGED
@@ -1,26 +1,23 @@
1
- <?php
2
-
3
- class VeInteractive_VePlatform_Block_Vepixel extends VeInteractive_VePlatform_Block_Template
4
- {
5
- public function showPixel()
6
- {
7
- $show = Mage::getSingleton('core/session')->getShowPixel();
8
- if($show) {
9
- Mage::getSingleton('core/session')->unsShowPixel();
10
- }
11
-
12
- return $show;
13
- }
14
-
15
- public function journeyPixel()
16
- {
17
- $journeyPixel = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::PIXEL_URL);
18
-
19
- return $journeyPixel;
20
- }
21
-
22
- public function _toHtml()
23
- {
24
- return $this->renderLocalTemplate( 'vepixel' );
25
- }
26
  }
1
+ <?php
2
+
3
+ class VeInteractive_VePlatform_Block_Vepixel extends VeInteractive_VePlatform_Block_Template {
4
+
5
+ public function showPixel() {
6
+ $show = Mage::getSingleton('core/session')->getShowPixel();
7
+ if($show) {
8
+ Mage::getSingleton('core/session')->unsShowPixel();
9
+ }
10
+
11
+ return $show;
12
+ }
13
+
14
+ public function journeyPixel() {
15
+ $journeyPixel = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::PIXEL_URL);
16
+
17
+ return $journeyPixel;
18
+ }
19
+
20
+ public function _toHtml() {
21
+ return $this->renderLocalTemplate('vepixel');
22
+ }
 
 
 
23
  }
app/code/community/VeInteractive/VePlatform/Block/Vetag.php CHANGED
@@ -1,16 +1,14 @@
1
- <?php
2
-
3
- class VeInteractive_VePlatform_Block_Vetag extends VeInteractive_VePlatform_Block_Template
4
- {
5
- public function journeyTag()
6
- {
7
- $journeyTag = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::TAG_URL);
8
-
9
- return $journeyTag;
10
- }
11
-
12
- public function _toHtml()
13
- {
14
- return $this->renderLocalTemplate( 'vetag' );
15
- }
16
  }
1
+ <?php
2
+
3
+ class VeInteractive_VePlatform_Block_Vetag extends VeInteractive_VePlatform_Block_Template {
4
+
5
+ public function journeyTag() {
6
+ $journeyTag = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::TAG_URL);
7
+
8
+ return $journeyTag;
9
+ }
10
+
11
+ public function _toHtml() {
12
+ return $this->renderLocalTemplate('vetag');
13
+ }
 
 
14
  }
app/code/community/VeInteractive/VePlatform/Helper/Data.php CHANGED
@@ -1,73 +1,65 @@
1
  <?php
2
 
3
- class VeInteractive_VePlatform_Helper_Data extends Mage_Core_Helper_Abstract
4
- {
5
- const TAG_URL = 'veplatform/journey/tag';
6
- const PIXEL_URL = 'veplatform/journey/pixel';
7
- const TOKEN = 'veplatform/journey/token';
8
- const CONFIG_LAST_REQUEST = 'veplatform/journey/lastrequest';
9
- const MODULE_INSTALLED = 'veplatform/adminhtml/module_installed';
10
 
11
- private $baseUrl;
 
 
 
 
 
 
12
 
13
- public function __construct()
14
- {
15
- $this->baseUrl = Mage::getConfig()->getNode('default/veplatform/service/url');
16
- }
17
 
 
 
 
18
 
19
- private function httpPost($url, $parameters)
20
- {
21
- Mage::log( "BEGIN[httpPost] - Send(". $url. ") = ". var_export( $parameters, true ) );
22
-
23
- $journey = false;
24
 
25
-
26
- $client = new Varien_Http_Client($url);
27
- $client->setMethod(Varien_Http_Client::POST);
28
- $client->setConfig(array(
29
- 'timeout'=>25,
30
- ));
31
 
32
- $client->setRawData(json_encode($parameters), "application/json;charset=UTF-8");
 
 
 
 
33
 
34
- //more parameters
35
- try{
36
- $response = $client->request();
37
 
38
- if ($response->isSuccessful()) {
39
- $journey = $response->getBody();
40
- }
41
- } catch (Exception $e) {
42
- }
43
 
44
- Mage::log( "END[httpPost] - Receive = ". var_export( $journey, true ) );
45
- return $journey;
46
  }
47
 
48
- public function install($data)
49
- {
50
-
51
- return $this->httpPost( $this->baseUrl . '/API/Magento/Install', $data);
52
- }
53
 
54
- public function sendProducts($data)
55
- {
56
- return $this->httpPost( $this->baseUrl . '/API/Magento/ActivateProducts', $data);
57
- }
58
 
59
- public function getLang()
60
- {
61
- $lang = Mage::getStoreConfig('general/locale/code');
62
- $subDashPositionInLang = strpos($lang, '_');
63
- if($subDashPositionInLang > 0) {
64
- $lang = substr($lang, 0, $subDashPositionInLang);
65
- }
66
- return $lang;
67
- }
68
-
69
- public function getBaseUrl()
70
- {
71
- return preg_replace("(^https?://)", "", Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_WEB, false ) );
72
  }
 
 
 
 
 
 
 
 
 
 
73
  }
1
  <?php
2
 
3
+ class VeInteractive_VePlatform_Helper_Data extends Mage_Core_Helper_Abstract {
 
 
 
 
 
 
4
 
5
+ const TAG_URL = 'veplatform/journey/tag';
6
+ const PIXEL_URL = 'veplatform/journey/pixel';
7
+ const TOKEN = 'veplatform/journey/token';
8
+ const MODULE_INSTALLED = 'veplatform/adminhtml/module_installed';
9
+ const FLOW_TYPE = 'veplatform/adminhtml/flow_type';
10
+ const FIRST_INSTALL = 'veplatform/adminhtml/first_install';
11
+ const ECOMMERCE_NAME = 'Magento';
12
 
13
+ private $baseUrl;
 
 
 
14
 
15
+ public function __construct() {
16
+ $this->baseUrl = Mage::getConfig()->getNode('default/veplatform/service/url');
17
+ }
18
 
19
+ private function httpPost($url, $parameters) {
 
 
 
 
20
 
21
+ Mage::log("BEGIN[httpPost] - Send(" . $url . ") = " . var_export($parameters, true), null, 'veplatform.log', true);
22
+ $result = false;
23
+ $response = false;
 
 
 
24
 
25
+ $client = new Varien_Http_Client($url);
26
+ $client->setMethod(Varien_Http_Client::POST);
27
+ $client->setConfig(array(
28
+ 'timeout' => 25,
29
+ ));
30
 
31
+ $client->setRawData(json_encode($parameters), "application/json;charset=UTF-8");
 
 
32
 
33
+ try {
34
+ $response = $client->request();
35
+ $result = $response->getBody();
36
+ Mage::log("END[httpPost] - Receive = Code" . var_export($result, true), null, 'veplatform.log', true);
 
37
 
38
+ } catch (Exception $e) {
39
+ Mage::log("END[httpPost] - Receive = " . $e->getMessage(), null, 'veplatform.log', true);
40
  }
41
 
42
+ return $result;
43
+ }
 
 
 
44
 
45
+ public function install($data) {
46
+ return $this->httpPost($this->baseUrl . '/api/veconnect/install', $data);
47
+ }
 
48
 
49
+ public function getLang() {
50
+ $lang = Mage::getStoreConfig('general/locale/code');
51
+ $subDashPositionInLang = strpos($lang, '_');
52
+ if($subDashPositionInLang > 0) {
53
+ $lang = substr($lang, 0, $subDashPositionInLang);
 
 
 
 
 
 
 
 
54
  }
55
+ return $lang;
56
+ }
57
+
58
+ public function getBaseUrl() {
59
+ return preg_replace("(^https?://)", "", Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, false));
60
+ }
61
+
62
+ public function getPlatformName() {
63
+ return self::ECOMMERCE_NAME;
64
+ }
65
  }
app/code/community/VeInteractive/VePlatform/Model/Data.php ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VeInteractive_VePlatform_Model_Data extends Mage_Core_Model_Abstract
4
+ {
5
+
6
+ private $locale;
7
+
8
+ /**
9
+ * Get information related to date format for masterdata
10
+ */
11
+ public function getCultureInformation()
12
+ {
13
+ $dateFormat = $this->locale->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_LONG);
14
+ return array('dateFormatFull' => $dateFormat);
15
+ }
16
+
17
+ /**
18
+ * Get language related information for masterdata
19
+ */
20
+ public function getLanguage()
21
+ {
22
+ if (empty($this->locale)) {
23
+ $this->locale = Mage::app()->getLocale();
24
+ }
25
+
26
+ $languageCode = $this->locale->getLocaleCode();
27
+
28
+ $language = array(
29
+ 'isoCode' => null,
30
+ 'languageCode' => $languageCode,
31
+ 'name' => $this->getLanguageName($languageCode)
32
+ );
33
+
34
+ return $language;
35
+ }
36
+
37
+ /**
38
+ * Find language name, based on locale's code
39
+ */
40
+ private function getLanguageName($code)
41
+ {
42
+ if (empty($code)) {
43
+ return null;
44
+ }
45
+
46
+ $optionLocales = $this->locale->getOptionLocales();
47
+ foreach ($optionLocales as $oL) {
48
+ if (strtolower($oL['value']) == strtolower($code)) {
49
+ return $oL['label'];
50
+ }
51
+ }
52
+
53
+ return null;
54
+ }
55
+
56
+ /**
57
+ * Get currency related information for masterdata
58
+ */
59
+ public function getCurrency()
60
+ {
61
+ $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
62
+ $currencyObj = Mage::app()->getLocale()->currency($currency_code);
63
+
64
+ $currency = array(
65
+ 'isoCode' => $currency_code,
66
+ 'isoCodeNum' => null,
67
+ 'name' => $currencyObj->getName(),
68
+ 'sign' => $currencyObj->getSymbol()
69
+ );
70
+ return $currency;
71
+
72
+ }
73
+
74
+ /**
75
+ * Get currentPage URL, orderId and product information (if available)
76
+ * Store in session last visited category and product history
77
+ */
78
+ public function getCurrentPage()
79
+ {
80
+ $orderId = Mage::app()->getFrontController()->getRequest()->getActionName() === 'success' ? Mage::getModel('checkout/session')->getData('last_real_order_id') : 0;
81
+ $module = Mage::app()->getFrontController()->getRequest()->getModuleName();
82
+ $productId = 0;
83
+
84
+ //Product page
85
+ if ($module === 'catalog' && Mage::registry('current_product')) {
86
+ $productId = Mage::registry('current_product')->getId();
87
+ $latestViewedProducts = Mage::getSingleton('core/session')->getUserViewedProducts();
88
+ if (!empty($latestViewedProducts)) {
89
+ $latestViewedProducts .= ',' . $productId;
90
+ Mage::getSingleton('core/session')->setUserViewedProducts($latestViewedProducts);
91
+ } else {
92
+ Mage::getSingleton('core/session')->setUserViewedProducts($productId);
93
+ }
94
+ Mage::getSingleton('core/session')->setHistory(true);
95
+ }
96
+
97
+ // Category page
98
+ if ($module === 'catalog' && Mage::registry('current_category')) {
99
+ // check if the category is a root category to avoid it
100
+ if (Mage::getModel('catalog/layer')->getCurrentCategory()->getLevel() !== "1") {
101
+
102
+ $catName = Mage::getSingleton('core/session')->getLastVisitedCategoryName();
103
+ $catLink = Mage::getSingleton('core/session')->getLastVisitedCategoryLink();
104
+
105
+ $currentCategoryName = Mage::getModel('catalog/layer')->getCurrentCategory()->getName();
106
+ $currentCategoryLink = Mage::getModel('catalog/layer')->getCurrentCategory()->getUrl();
107
+
108
+ if(!empty($catName) && !empty($catLink)) {
109
+ $catName .= ',' . $currentCategoryName;
110
+ $catLink .= ',' . $currentCategoryLink;
111
+ Mage::getSingleton('core/session')->setLastVisitedCategoryName($catName);
112
+ Mage::getSingleton('core/session')->setLastVisitedCategoryLink($catLink);
113
+ }else{
114
+ Mage::getSingleton('core/session')->setLastVisitedCategoryName($currentCategoryName);
115
+ Mage::getSingleton('core/session')->setLastVisitedCategoryLink($currentCategoryLink);
116
+ }
117
+ Mage::getSingleton('core/session')->setHistory(true);
118
+ }
119
+ }
120
+
121
+ $current = array(
122
+ 'currentUrl' => Mage::helper('core/url')->getCurrentUrl(),
123
+ 'orderId' => $orderId,
124
+ 'currentPageType' => $this->getPageType(),
125
+ 'product' => $this->getProductInformation($productId)
126
+ );
127
+
128
+ return $current;
129
+ }
130
+
131
+ /**
132
+ * Get currentPage type
133
+ */
134
+ public function getPageType()
135
+ {
136
+ $controller = Mage::app()->getRequest()->getControllerName();
137
+ $action = Mage::app()->getRequest()->getActionName();
138
+
139
+ $type = null;
140
+ switch ($controller) {
141
+ case 'index':
142
+ $type = 'home';
143
+ break;
144
+ case 'account':
145
+ if ($action == 'login') {
146
+ $type = 'login';
147
+ } else if ($action == 'create') {
148
+ $type = 'register';
149
+ }
150
+ break;
151
+ case 'product':
152
+ $type = 'product';
153
+ break;
154
+ case 'cart':
155
+ $type = 'basket';
156
+ break;
157
+ case 'category':
158
+ $type = 'category';
159
+ break;
160
+ case 'onepage':
161
+ if ($action != 'success') {
162
+ $type = 'checkout';
163
+ } else {
164
+ $type = 'complete';
165
+ }
166
+ break;
167
+ case 'multishipping':
168
+ if ($action != 'success') {
169
+ $type = 'checkout';
170
+ } else {
171
+ $type = 'complete';
172
+ }
173
+ break;
174
+ default:
175
+ $type = 'other';
176
+ }
177
+
178
+ return $type;
179
+ }
180
+
181
+ /**
182
+ * Get current order, all cart information
183
+ */
184
+ public function getCurrentOrder()
185
+ {
186
+ $taxes = array(
187
+ 'name' => null,
188
+ 'taxValue' => null
189
+ );
190
+
191
+ $promocode = array(
192
+ 'name' => null,
193
+ 'type' => null,
194
+ 'value' => null
195
+ );
196
+
197
+ $cart = array(
198
+ 'dateUpd' => null,
199
+ 'promocode' => $promocode,
200
+ 'totalPromocodeDiscount' => Mage::helper('core')->currency(0, true, false),
201
+ 'totalPrice' => Mage::helper('core')->currency(0, true, false),
202
+ 'totalProducts' => Mage::helper('core')->currency(0, true, false),
203
+ 'products' => array(),
204
+ 'taxes' => $taxes
205
+ );
206
+
207
+ $order = Mage::getModel('checkout/session')->getQuote();
208
+ if ($order !== null) {
209
+ $dateUpd = $order->getUpdatedAt();
210
+ if ($order->hasItems()) {
211
+ $products = array();
212
+ $i = 0;
213
+ foreach ($order->getAllVisibleItems() as $item) {
214
+ $products[$i] = $this->getProductInformation($item->getProductId());
215
+ $products[$i]['qty'] = $item->getQty();
216
+ $i++;
217
+ }
218
+
219
+ $grandTotal = $order->getGrandTotal();
220
+ $subtotal = $order->getSubtotal();
221
+
222
+ if ($order->isVirtual()) {
223
+ $totalTax = array(
224
+ 'name' => 'Total Tax',
225
+ 'taxValue' => Mage::helper('core')->currency($order->getBillingAddress()->getData('tax_amount'), true, false)
226
+ );
227
+ $discountAmount = $order->getBillingAddress()->getData('discount_amount');
228
+ } else {
229
+ $totalTax = array(
230
+ 'name' => 'Total Tax',
231
+ 'taxValue' => Mage::helper('core')->currency($order->getShippingAddress()->getData('tax_amount'), true, false)
232
+ );
233
+ $discountAmount = $order->getShippingAddress()->getData('discount_amount');
234
+ }
235
+
236
+ $tax[] = $totalTax;
237
+ }
238
+
239
+ $cart['dateUpd'] = $dateUpd;
240
+ $cart['totalPrice'] = Mage::helper('core')->currency($grandTotal, true, false);
241
+ $cart['totalProducts'] = Mage::helper('core')->currency($subtotal, true, false);
242
+ $cart['products'] = $products;
243
+ $cart['taxes'] = $tax;
244
+ $cart['promocode'] = $this->getPromocode($order);
245
+ $cart['totalPromocodeDiscount'] = Mage::helper('core')->currency(abs($discountAmount), true, false);
246
+ }
247
+
248
+ return $cart;
249
+ }
250
+
251
+
252
+ /**
253
+ * Get promocodes applied for the current order
254
+ */
255
+ public function getPromocode($order)
256
+ {
257
+ $promocode = array();
258
+
259
+ $ruleIds = explode(',', $order->getAppliedRuleIds());
260
+ $ruleIds = array_unique($ruleIds);
261
+
262
+ foreach ($ruleIds as $ruleId) {
263
+ $rule = Mage::getModel('salesrule/rule');
264
+ $rule->load($ruleId);
265
+ if ($rule->getId()) {
266
+ $type = $rule->getData('simple_action');
267
+
268
+ $currentPromocode = array(
269
+ 'name' => $rule->getData('name'),
270
+ 'type' => $type,
271
+ 'value' => $rule->getData('discount_amount')
272
+ );
273
+
274
+ $promocode[] = $currentPromocode;
275
+ }
276
+ }
277
+
278
+ return !empty($promocode) ? $promocode :
279
+ array(
280
+ 'name' => null,
281
+ 'type' => null,
282
+ 'value' => null
283
+ );
284
+ }
285
+
286
+ /**
287
+ * Build product structure used used in currentPage and cart
288
+ */
289
+ public function getProductInformation($id)
290
+ {
291
+ $prod = array(
292
+ 'productId' => null,
293
+ 'description' => null,
294
+ 'description_short' => null,
295
+ 'images' => array(
296
+ 'fullImagePath' => null,
297
+ 'partialImagePath' => null,
298
+ ),
299
+ 'manufacturerName' => null,
300
+ 'name' => null,
301
+ 'priceCurrent' => null,
302
+ 'priceDiscount' => null,
303
+ 'priceWithoutDiscount' => null,
304
+ 'productLink' => null
305
+ );
306
+
307
+ if (empty($id)) {
308
+ return $prod;
309
+ }
310
+
311
+ $product = Mage::getModel('catalog/product');
312
+ $product->load((int)$id);
313
+
314
+ $imgFullPath = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage());
315
+ $imgPartialPath = Mage::getModel('catalog/product_media_config')->getMediaShortUrl($product->getImage());
316
+
317
+ $finalPrice = Mage::helper('tax')->getPrice($product, $product->getFinalPrice(), true);
318
+ $originalPrice = Mage::helper('tax')->getPrice($product, $product->getPrice(), true);
319
+ $prod = array(
320
+ 'productId' => $id,
321
+ 'description' => $product->getData('description'),
322
+ 'description_short' => $product->getData('short_description'),
323
+ 'images' => array(
324
+ 'fullImagePath' => $imgFullPath,
325
+ 'partialImagePath' => $imgPartialPath,
326
+ ),
327
+ 'manufacturerName' => null,
328
+ 'name' => $product->getName(),
329
+ 'priceCurrent' => Mage::helper('core')->currency($finalPrice, true, false),
330
+ 'priceDiscount' => Mage::helper('core')->currency(($originalPrice - $finalPrice), true, false),
331
+ 'priceWithoutDiscount' => Mage::helper('core')->currency($originalPrice, true, false),
332
+ 'productLink' => $product->getProductUrl(true)
333
+ );
334
+
335
+ return $prod;
336
+ }
337
+
338
+ /**
339
+ * Get user history - products history and last visited category
340
+ */
341
+ public function getUserHistory()
342
+ { $history = array();
343
+ $hasHistory = Mage::getSingleton('core/session')->getHistory();
344
+ if (!$hasHistory) {
345
+ $history['productHistory'] = array();
346
+ $history['lastVisitedCategory'] = array(
347
+ 'name' => null,
348
+ 'link' => null
349
+ );
350
+ } else {
351
+ $latestViewedProducts = Mage::getSingleton('core/session')->getUserViewedProducts();
352
+
353
+ $categoryName = Mage::getSingleton('core/session')->getLastVisitedCategoryName();
354
+ $categoryLink = Mage::getSingleton('core/session')->getLastVisitedCategoryLink();
355
+ if (!empty($latestViewedProducts)) {
356
+ $productHistory = array();
357
+ $productList = array_unique(explode(',', $latestViewedProducts));
358
+ foreach ($productList as $productId) {
359
+ $productHistory[] = $this->getProductInformation($productId);
360
+ }
361
+ $history['productHistory'] = $productHistory;
362
+ }
363
+ if (!empty($categoryName) && !empty($categoryLink)) {
364
+ $catNameList = explode(',', $categoryName);
365
+ $catLinkList = explode(',', $categoryLink);
366
+
367
+ if(sizeof($catNameList) > 1) {
368
+ $length = sizeof($catNameList);
369
+ $history['lastVisitedCategory'] = array(
370
+ 'name' => $catNameList[$length-2],
371
+ 'link' => $catLinkList[$length-2]
372
+ );
373
+ }
374
+ }else{
375
+ $history['lastVisitedCategory'] = array(
376
+ 'name' => null,
377
+ 'link' => null
378
+ );
379
+ }
380
+ }
381
+ return $history;
382
+ }
383
+
384
+ /**
385
+ * Get customer info - email, firstName, lastName - if the user is logged in
386
+ */
387
+ public function getCustomer()
388
+ {
389
+ $customerInfo = array(
390
+ 'email' => null,
391
+ 'firstName' => null,
392
+ 'lastName' => null
393
+ );
394
+
395
+ $customer = Mage::getModel('customer/session');
396
+ if ($customer->isLoggedIn()) {
397
+ $customer = $customer->getCustomer();
398
+ $customerInfo = array(
399
+ 'email' => $customer->getEmail(),
400
+ 'firstName' => $customer->getFirstname() . (!empty($customer->getMiddlename()) ? ' ' . $customer->getMiddlename() : ''),
401
+ 'lastName' => $customer->getLastname()
402
+ );
403
+ }
404
+
405
+ return $customerInfo;
406
+ }
407
+ }
app/code/community/VeInteractive/VePlatform/Model/Products.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- class VeInteractive_VePlatform_Model_Products
4
- {
5
- public function toOptionArray()
6
- {
7
- return array(
8
- array( 'value' => '', 'label'=> '' ), // BUG-FIX for Magento < 1.7.
9
- array( 'value' => $this->getVeContactID(), 'label' => Mage::helper('VeInteractive_VePlatform')->__('VeContact') ),
10
- array( 'value' => $this->getVeChatID(), 'label' => Mage::helper('VeInteractive_VePlatform')->__('VeChat') ),
11
- array( 'value' => $this->getVeAssistID(), 'label' => Mage::helper('VeInteractive_VePlatform')->__('VeAssist') ),
12
- array( 'value' => $this->getVeAdsID(), 'label' => Mage::helper('VeInteractive_VePlatform')->__('VeAds') ),
13
- );
14
- }
15
-
16
- public function getAlls()
17
- {
18
- return array(
19
- $this->getVeContactID(),
20
- $this->getVeChatID(),
21
- $this->getVeAssistID(),
22
- $this->getVeAdsID(),
23
- );
24
- }
25
-
26
- public function getVeChatID()
27
- {
28
- return "vechat";
29
- }
30
-
31
- public function getVeContactID()
32
- {
33
- return "vecontact";
34
- }
35
-
36
- public function getVeAssistID()
37
- {
38
- return "veassist";
39
- }
40
-
41
- public function getVeAdsID()
42
- {
43
- return "veads";
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/VeInteractive/VePlatform/Observer/AdminUserLoadAfter.php CHANGED
@@ -2,163 +2,28 @@
2
 
3
  class VeInteractive_VePlatform_Observer_AdminUserLoadAfter {
4
 
5
- /**
6
- * Time in seconds to recheck
7
- */
8
- const REQUEST_THRESHOLD = 3600;
9
-
10
- /**
11
- * Checks if the client has been created in VePlatform, will be called when the user access the admin panel
12
- *
13
- * @param [type] $observer
14
- * @return null
15
- */
16
- public function checkInstallation($observer)
17
- {
18
- $isAjax = Mage::app()->getRequest()->isXmlHttpRequest();
19
- if(!$isAjax) {
20
- $this->checkModuleInstallation();
21
- $this->checkJourneyInstallation();
22
- }
23
  }
 
24
 
25
- private function checkJourneyInstallation()
26
- {
27
- // Ensure journey code exists
28
- $journeyTagUrl = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::TAG_URL);
29
-
30
- // If not install
31
- if(!$journeyTagUrl) {
32
- $helper = Mage::helper('VeInteractive_VePlatform');
33
-
34
- // get last request
35
- $lastRequest = (int) Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::CONFIG_LAST_REQUEST);
36
-
37
- // Is the user reting
38
- $veretry = (int) Mage::app()->getRequest()->getParam('veretry', 0);
39
-
40
- // If it has spent an hour since last request or if it is the first time we do the journey request (install)
41
- $delta = time() - $lastRequest;
42
-
43
- if($veretry || self::REQUEST_THRESHOLD < $delta) {
44
-
45
- // get data to send
46
- $data = array(
47
- 'domain' => $helper->getBaseUrl(),
48
- 'language' => $helper->getLang(),
49
- 'email' => Mage::getSingleton('admin/session')->getUser()->getEmail(),
50
- 'phone' => Mage::getStoreConfig('general/store_information/phone'),
51
- 'merchant' => Mage::app()->getWebsite()->getName(),
52
- 'country' => Mage::getStoreConfig('general/country/default'),
53
- 'currency'=> Mage::app()->getBaseCurrencyCode()
54
- );
55
-
56
- $jsonString = $helper->install($data);
57
-
58
- $response = false;
59
- if($jsonString) {
60
-
61
- $response = json_decode($jsonString);
62
 
63
- if( $response && isset($response->URLTag) && isset($response->URLPixel) && isset($response->Token)) {
64
- $journeyTagUrl = $response->URLTag;
65
- $journeyPixelUrl = $response->URLPixel;
66
- $token = $response->Token;
67
- if( strpos($journeyTagUrl, 'https://') === 0) {
68
- $journeyTagUrl = substr($journeyTagUrl, 6);
69
- }
70
- else if( strpos($journeyTagUrl, 'http://') === 0) {
71
- $journeyTagUrl = substr($journeyTagUrl, 5);
72
- }
73
- if( strpos($journeyPixelUrl, 'https://') === 0) {
74
- $journeyPixelUrl = substr($journeyPixelUrl, 6);
75
- }
76
- else if( strpos($journeyPixelUrl, 'http://') === 0) {
77
- $journeyPixelUrl = substr($journeyPixelUrl, 5);
78
- }
79
- }
80
- }
81
-
82
- // If a Journey code is returned we save it
83
- $config = new Mage_Core_Model_Config();
84
- if( isset($journeyTagUrl) && $journeyTagUrl && isset($journeyPixelUrl) && $journeyPixelUrl && isset($response->Token) && $token) {
85
 
86
- $config ->saveConfig(VeInteractive_VePlatform_Helper_Data::TAG_URL, $journeyTagUrl, 'default', 0);
87
- $config ->saveConfig(VeInteractive_VePlatform_Helper_Data::PIXEL_URL, $journeyPixelUrl, 'default', 0);
88
- $config ->saveConfig(VeInteractive_VePlatform_Helper_Data::TOKEN, $token, 'default', 0);
89
- }
90
- else {
91
- $config ->saveConfig(VeInteractive_VePlatform_Helper_Data::CONFIG_LAST_REQUEST, time(), 'default', 0);
92
- }
93
- // Clear config cache
94
- Mage::app()->getCacheInstance()->cleanType( "config" );
95
- }
96
- }
97
 
98
- // Check again, maybe we have it now
99
- if(!$journeyTagUrl) {
100
- if(!$this->isMessageSended()) {
101
- $optionsUrl = Mage::helper("adminhtml")->getUrl("adminhtml/system_config/edit/section/veplatform_options", array('veretry' => 1));
102
- $message = Mage::helper('VeInteractive_VePlatform')->__('There was a problem connecting to Ve Interactive Server, <a href="%s">try again please</a>', $optionsUrl);
103
- Mage::getSingleton('adminhtml/session')->addWarning($message);
104
- }
105
- }
106
- // If we have it we will check if it has select product
107
- else {
108
- // Check if has select any product, If not we show him a notice.
109
- if(!VeInteractive_VePlatform_Block_ConfigFieldset::getProductsEnabled()) {
110
- if( !$this->isMessageSended() && !$this->isOptionsPage() ) {
111
- $optionsUrl = Mage::helper("adminhtml")->getUrl("adminhtml/system_config/edit/section/veplatform_options");
112
- $message = Mage::helper('VeInteractive_VePlatform')->__('You have installed VePlatform successfully, please select which products want you to use: <a href="%s">Select Ve Products</a>', $optionsUrl);
113
- Mage::getSingleton('adminhtml/session')->addNotice($message);
114
- }
115
- }
116
- }
117
- }
118
-
119
- /**
120
- * Check if is the Ve options page
121
- *
122
- * @return boolean [description]
123
- */
124
- private function isOptionsPage()
125
- {
126
- $params = Mage::app()->getRequest()->getParams();
127
- if(isset($params['section']) && 'veplatform_options' == $params['section']) {
128
- return true;
129
- }
130
-
131
- return false;
132
- }
133
-
134
- /**
135
- * Check if we have already sended the message
136
- *
137
- * @return boolean [description]
138
- */
139
- private function isMessageSended()
140
- {
141
- $toSearch = array('VePlatform', 'VeInteractive');
142
- $smessages = Mage::getSingleton('adminhtml/session')->getMessages()->getItems();
143
- foreach ($smessages as $smessage) {
144
- foreach ($toSearch as $toSearchItem) {
145
- if(stripos($smessage->getText(), $toSearchItem) !== false) {
146
- return true;
147
- }
148
- }
149
- }
150
-
151
- return false;
152
- }
153
 
154
- private function checkModuleInstallation()
155
- {
156
- // Update ACL is needed after module installation to avoid 404 Error while accessing System > Configuration > VeInteractive > VePlatform.
157
- $module_installed = Mage::getStoreConfig( VeInteractive_VePlatform_Helper_Data::MODULE_INSTALLED );
158
- if( !$module_installed ) {
159
- Mage::getConfig()->saveConfig( VeInteractive_VePlatform_Helper_Data::MODULE_INSTALLED, true );
160
- Mage::app()->getCacheInstance()->cleanType( "config" );
161
- Mage::getSingleton( 'admin/session' )->setAcl( Mage::getResourceModel( 'admin/acl' )->loadAcl() );
162
- }
163
  }
 
164
  }
2
 
3
  class VeInteractive_VePlatform_Observer_AdminUserLoadAfter {
4
 
5
+ public function checkInstallation($observer) {
6
+ $isAjax = Mage::app()->getRequest()->isXmlHttpRequest();
7
+ if(!$isAjax) {
8
+ $this->checkModuleInstallation();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  }
10
+ }
11
 
12
+ private function checkModuleInstallation() {
13
+ $module_installed = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::MODULE_INSTALLED);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
+ if(!$module_installed) {
16
+ Mage::getConfig()->saveConfig(VeInteractive_VePlatform_Helper_Data::MODULE_INSTALLED, true);
17
+ Mage::getConfig()->saveConfig(VeInteractive_VePlatform_Helper_Data::FIRST_INSTALL, 1, 'default', 0);
18
+ Mage::app()->getCacheInstance()->cleanType("config");
19
+ Mage::getSingleton('admin/session')->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
+ $optionsUrl = Mage::helper("adminhtml")->getUrl("adminhtml/system_config/edit/section/veplatform_options");
 
 
 
 
 
 
 
 
 
 
22
 
23
+ $response = Mage::app()->getResponse();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
+ $response->setRedirect($optionsUrl)->sendResponse();
26
+ exit();
 
 
 
 
 
 
 
27
  }
28
+ }
29
  }
app/code/community/VeInteractive/VePlatform/Observer/Layout.php CHANGED
@@ -1,43 +1,54 @@
1
  <?php
2
 
3
- class VeInteractive_VePlatform_Observer_Layout
4
- {
5
- private static $BLOCKS = array(
6
- array(
7
- 'block'=> 'veplatform/vetag',
8
- 'name'=> 'veplatform.vetag',
9
- 'parent'=> 'before_body_end'
10
- ),
11
- array(
12
- 'block'=> 'veplatform/vepixel',
13
- 'name'=> 'veplatform.vepixel',
14
- 'parent'=> 'content'
15
- )
16
- );
17
-
18
- public function updateLayout( Varien_Event_Observer $observer )
19
- {
20
- // Only for FrontEnd.
21
- if( $observer->getLayout()->getArea() === 'frontend' ) {
22
- $layout = $observer->getLayout();
23
- if( $layout ) {
24
- foreach( self::$BLOCKS as $setting ) {
25
- // Avoid adding the block twice.
26
- if( !$layout->getBlock( $setting['block'] ) ){
27
- $block = $layout->createBlock(
28
- $setting['block'],
29
- $setting['name']
30
- );
31
-
32
- if( $block ) {
33
- $parent = $layout->getBlock( $setting['parent'] );
34
- if( $parent ) {
35
- $parent->append( $block );
36
- }
37
- }
 
 
 
 
 
 
 
38
  }
39
  }
40
- }
41
  }
 
 
 
42
  }
 
43
  }
1
  <?php
2
 
3
+ class VeInteractive_VePlatform_Observer_Layout {
4
+
5
+ private $blocks;
6
+
7
+ public function __construct(){
8
+ $this->blocks = array(
9
+ array(
10
+ 'block' => 'veplatform/vetag',
11
+ 'name' => 'veplatform.vetag',
12
+ 'parent' => 'before_body_end'
13
+ ),
14
+ array(
15
+ 'block' => 'veplatform/vepixel',
16
+ 'name' => 'veplatform.vepixel',
17
+ 'parent' => 'content'
18
+ ),
19
+ array(
20
+ 'block' => 'veplatform/vemaster',
21
+ 'name' => 'veplatform.vemaster',
22
+ 'parent' => 'content'
23
+ )
24
+ );
25
+ }
26
+
27
+ public function updateLayout(Varien_Event_Observer $observer) {
28
+ // Only for FrontEnd.
29
+ if($observer->getLayout()->getArea() === 'frontend') {
30
+
31
+ $layout = $observer->getLayout();
32
+ if($layout) {
33
+
34
+ foreach ($this->blocks as $setting) {
35
+ // Avoid adding the block twice.
36
+
37
+ if(!$layout->getBlock($setting['block'])) {
38
+
39
+ $block = $layout->createBlock( $setting['block'], $setting['name']);
40
+
41
+ if($block) {
42
+ $parent = $layout->getBlock($setting['parent']);
43
+ if($parent) {
44
+ $parent->append($block);
45
  }
46
  }
47
+ }
48
  }
49
+
50
+ }
51
+
52
  }
53
+ }
54
  }
app/code/community/VeInteractive/VePlatform/Observer/SaveSettings.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
-
3
- class VeInteractive_VePlatform_Observer_SaveSettings
4
- {
5
- const ACTIVATED_PRODUCTS_KEY = 'veplatform/adminhtml/activatedproducts';
6
-
7
- public function sendData()
8
- {
9
- $recentSaveSettings = VeInteractive_VePlatform_Block_ConfigFieldset::getProductsEnabled();
10
- if( $recentSaveSettings ) {
11
- $alreadyActivatedProducts = @unserialize( Mage::getStoreConfig( self::ACTIVATED_PRODUCTS_KEY ) );
12
- if( is_array( $alreadyActivatedProducts ) )
13
- $currentActivatedProducts = array_diff( $recentSaveSettings, $alreadyActivatedProducts );
14
- else
15
- $currentActivatedProducts = $recentSaveSettings;
16
- if( $currentActivatedProducts ) {
17
-
18
- $helper = Mage::helper('VeInteractive_VePlatform');
19
-
20
- $token = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::TOKEN);
21
-
22
- $data = array(
23
- 'token' => $token,
24
- 'language' => $helper->getLang(),
25
- 'domain' => $helper->getBaseUrl(),
26
- 'email' => Mage::getSingleton('admin/session')->getUser()->getEmail(),
27
- 'country' => Mage::getStoreConfig('general/country/default'),
28
- 'currency'=>Mage::app()->getBaseCurrencyCode(),
29
- 'taskId' => 1,
30
- 'appCodes' => self::getAppCodes( $currentActivatedProducts ),
31
- );
32
-
33
- $jsonString = $helper->sendProducts($data);
34
-
35
- if( $jsonString ) {
36
- Mage::getConfig()->saveConfig( self::ACTIVATED_PRODUCTS_KEY, serialize( $recentSaveSettings ) );
37
- Mage::app()->getCacheInstance()->cleanType( "config" );
38
- } else {
39
- // Rollback changes already saved, before to call this method.
40
- VeInteractive_VePlatform_Block_ConfigFieldset::setProductsEnabled( $alreadyActivatedProducts );
41
- $message = Mage::helper('VeInteractive_VePlatform')->__('There was a problem connecting to Ve Interactive Server, try again please.');
42
- throw new Mage_Core_Exception( $message );
43
- }
44
- }
45
- }
46
- }
47
-
48
- static private function getAppCodes( $productSettings )
49
- {
50
- $appCodes = array();
51
- if(in_array('vecontact', $productSettings)) {
52
- $appCodes[] = 1;
53
- }
54
- if(in_array('vechat', $productSettings)) {
55
- $appCodes[] = 2;
56
- }
57
- if(in_array('veassist', $productSettings)) {
58
- $appCodes[] = 3;
59
- }
60
- if(in_array('veads', $productSettings)) {
61
- $appCodes[] = 5;
62
- }
63
- $appCodes = implode('|', $appCodes);
64
- return $appCodes;
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/VeInteractive/VePlatform/Observer/ThanksPage.php CHANGED
@@ -1,12 +1,11 @@
1
  <?php
2
 
3
- class VeInteractive_VePlatform_Observer_ThanksPage
4
- {
5
- public function showPixel()
6
- {
7
- $journeyPixel = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::PIXEL_URL);
8
- if($journeyPixel) {
9
- Mage::getSingleton('core/session')->setShowPixel(true);
10
- }
11
  }
 
12
  }
1
  <?php
2
 
3
+ class VeInteractive_VePlatform_Observer_ThanksPage {
4
+
5
+ public function showPixel() {
6
+ $journeyPixel = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::PIXEL_URL);
7
+ if($journeyPixel) {
8
+ Mage::getSingleton('core/session')->setShowPixel(true);
 
 
9
  }
10
+ }
11
  }
app/code/community/VeInteractive/VePlatform/controllers/Adminhtml/CustomController.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VeInteractive_VePlatform_Adminhtml_CustomController extends Mage_Adminhtml_Controller_Action {
4
+
5
+ public function installVePlatformAction() {
6
+ $params = $this->getDataAction();
7
+ $helper = Mage::helper('VeInteractive_VePlatform');
8
+ $config = Mage::getConfig();
9
+
10
+ $jsonResponse = $helper->install($params);
11
+ if($jsonResponse) {
12
+ $response = json_decode($jsonResponse);
13
+ if($response && isset($response->HtmlView)) {
14
+
15
+ //if we received the tag, token, pixel - we save them in db
16
+ if(isset($response->URLTag) && $response->URLTag != ""
17
+ && isset($response->URLPixel) && $response->URLPixel != ""
18
+ && isset($response->Token) && $response->Token != ""
19
+ ) {
20
+ $config->saveConfig(VeInteractive_VePlatform_Helper_Data::TOKEN, $response->Token, 'default', 0);
21
+ $config->saveConfig(VeInteractive_VePlatform_Helper_Data::TAG_URL, $response->URLTag, 'default', 0);
22
+ $config->saveConfig(VeInteractive_VePlatform_Helper_Data::PIXEL_URL, $response->URLPixel, 'default', 0);
23
+ }
24
+
25
+ $config->saveConfig(VeInteractive_VePlatform_Helper_Data::FIRST_INSTALL, 0, 'default', 0);
26
+
27
+ Mage::dispatchEvent('adminhtml_cache_flush_all');
28
+ Mage::app()->getCacheInstance()->flush();
29
+
30
+ echo json_encode($response);
31
+ } else {
32
+ $this->showError();
33
+ }
34
+ } else {
35
+ $this->showError();
36
+ }
37
+
38
+ }
39
+
40
+ private function showError() {
41
+ $optionsUrl = Mage::helper("adminhtml")->getUrl("adminhtml/system_config/edit/section/veplatform_options");
42
+ $message = Mage::helper('adminhtml')->__('Ve - Oops! An error has occured. <a href="%s">Please try again!</a>', $optionsUrl);
43
+ Mage::getSingleton('adminhtml/session')->addWarning($message);
44
+
45
+ $response = array(
46
+ 'redirectUrl' => Mage::helper('adminhtml')->getUrl('/')
47
+ );
48
+
49
+ echo json_encode($response);
50
+ }
51
+
52
+ private function getDataAction() {
53
+ $helper = Mage::helper('VeInteractive_VePlatform');
54
+ $firstInstall = Mage::getStoreConfig(VeInteractive_VePlatform_Helper_Data::FIRST_INSTALL);
55
+
56
+ // get data to send
57
+ $data = array(
58
+ 'ecommerce' => $helper->getPlatformName(),
59
+ 'domain' => $helper->getBaseUrl(),
60
+ 'language' => $helper->getLang(),
61
+ 'email' => Mage::getSingleton('admin/session')->getUser()->getEmail(),
62
+ 'phone' => Mage::getStoreConfig('general/store_information/phone'),
63
+ 'merchant' => Mage::app()->getWebsite()->getName(),
64
+ 'country' => Mage::getStoreConfig('general/country/default'),
65
+ 'currency' => Mage::app()->getBaseCurrencyCode(),
66
+ 'isInstallFLow' => ($firstInstall == 1) ? 'true' : 'false'
67
+ );
68
+
69
+ return $data;
70
+ }
71
+
72
+ }
app/code/community/VeInteractive/VePlatform/controllers/IndexController.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class VeInteractive_VePlatform_IndexController extends Mage_Core_Controller_Front_Action {
3
+
4
+ private $data;
5
+
6
+ public function updateCartAction()
7
+ {
8
+ sleep(1);
9
+ $this->data = Mage::getModel('VeInteractive_VePlatform/data');
10
+ die(Mage::helper('core')->jsonEncode($this->data->getCurrentOrder()));
11
+ }
12
+ }
app/code/community/VeInteractive/VePlatform/etc/adminhtml.xml CHANGED
@@ -8,8 +8,8 @@
8
  <children>
9
  <config>
10
  <children>
11
- <veplatform_options translate="label" >
12
- <title>VePlatform Section</title>
13
  </veplatform_options>
14
  </children>
15
  </config>
8
  <children>
9
  <config>
10
  <children>
11
+ <veplatform_options translate="label">
12
+ <title>Ve Section</title>
13
  </veplatform_options>
14
  </children>
15
  </config>
app/code/community/VeInteractive/VePlatform/etc/config.xml CHANGED
@@ -1,84 +1,104 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <config>
3
- <modules>
4
- <VeInteractive_VePlatform>
5
- <version>15.1.2.0</version>
6
- </VeInteractive_VePlatform>
7
- </modules>
8
- <global>
9
- <models>
10
- <VeInteractive_VePlatform>
11
- <class>VeInteractive_VePlatform_Model</class>
12
- </VeInteractive_VePlatform>
13
- </models>
14
- <helpers>
15
- <VeInteractive_VePlatform>
16
- <class>VeInteractive_VePlatform_Helper</class>
17
- </VeInteractive_VePlatform>
18
- </helpers>
19
- <events>
20
- <admin_user_load_after>
21
- <observers>
22
- <veplatform_admin_user_load_after_observer>
23
- <type>singleton</type>
24
- <class>VeInteractive_VePlatform_Observer_AdminUserLoadAfter</class>
25
- <method>checkInstallation</method>
26
- </veplatform_admin_user_load_after_observer>
27
- </observers>
28
- </admin_user_load_after>
29
- <controller_action_layout_generate_blocks_after>
30
- <observers>
31
- <veplatform_controller_action_layout_generate_blocks_after_observer>
32
- <type>singleton</type>
33
- <class>VeInteractive_VePlatform_Observer_Layout</class>
34
- <method>updateLayout</method>
35
- </veplatform_controller_action_layout_generate_blocks_after_observer>
36
- </observers>
37
- </controller_action_layout_generate_blocks_after>
38
- <checkout_onepage_controller_success_action>
39
- <observers>
40
- <veplatform_checkout_onepage_controller_success_action_observer>
41
- <type>singleton</type>
42
- <class>VeInteractive_VePlatform_Observer_ThanksPage</class>
43
- <method>showPixel</method>
44
- </veplatform_checkout_onepage_controller_success_action_observer>
45
- </observers>
46
- </checkout_onepage_controller_success_action>
47
- <checkout_multishipping_controller_success_action>
48
- <observers>
49
- <veplatform_checkout_multishipping_controller_success_action_observer>
50
- <type>singleton</type>
51
- <class>VeInteractive_VePlatform_Observer_ThanksPage</class>
52
- <method>showPixel</method>
53
- </veplatform_checkout_multishipping_controller_success_action_observer>
54
- </observers>
55
- </checkout_multishipping_controller_success_action>
56
- <admin_system_config_changed_section_veplatform_options>
57
- <observers>
58
- <veplatform_admin_system_config_changed_section_veplatform_options_observer>
59
- <type>singleton</type>
60
- <class>VeInteractive_VePlatform_Observer_SaveSettings</class>
61
- <method>sendData</method>
62
- </veplatform_admin_system_config_changed_section_veplatform_options_observer>
63
- </observers>
64
- </admin_system_config_changed_section_veplatform_options>
65
- </events>
66
- <blocks>
67
- <veplatform>
68
- <class>VeInteractive_VePlatform_Block</class>
69
- </veplatform>
70
- <adminhtml>
71
- <rewrite>
72
- <system_config_form_fieldset>VeInteractive_VePlatform_Block_ConfigFieldset</system_config_form_fieldset>
73
- </rewrite>
74
- </adminhtml>
75
- </blocks>
76
- </global>
77
- <default>
78
- <veplatform>
79
- <service>
80
- <url>http://veconnect.veinteractive.com</url>
81
- </service>
82
- </veplatform>
83
- </default>
84
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <VeInteractive_VePlatform>
5
+ <version>16.3.5.0</version>
6
+ </VeInteractive_VePlatform>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <VeInteractive_VePlatform>
11
+ <class>VeInteractive_VePlatform_Model</class>
12
+ </VeInteractive_VePlatform>
13
+ </models>
14
+ <helpers>
15
+ <VeInteractive_VePlatform>
16
+ <class>VeInteractive_VePlatform_Helper</class>
17
+ </VeInteractive_VePlatform>
18
+ </helpers>
19
+ <events>
20
+ <admin_user_load_after>
21
+ <observers>
22
+ <veplatform_admin_user_load_after_observer>
23
+ <type>singleton</type>
24
+ <class>VeInteractive_VePlatform_Observer_AdminUserLoadAfter</class>
25
+ <method>checkInstallation</method>
26
+ </veplatform_admin_user_load_after_observer>
27
+ </observers>
28
+ </admin_user_load_after>
29
+ <controller_action_layout_generate_blocks_after>
30
+ <observers>
31
+ <veplatform_controller_action_layout_generate_blocks_after_observer>
32
+ <type>singleton</type>
33
+ <class>VeInteractive_VePlatform_Observer_Layout</class>
34
+ <method>updateLayout</method>
35
+ </veplatform_controller_action_layout_generate_blocks_after_observer>
36
+ </observers>
37
+ </controller_action_layout_generate_blocks_after>
38
+ <checkout_onepage_controller_success_action>
39
+ <observers>
40
+ <veplatform_checkout_onepage_controller_success_action_observer>
41
+ <type>singleton</type>
42
+ <class>VeInteractive_VePlatform_Observer_ThanksPage</class>
43
+ <method>showPixel</method>
44
+ </veplatform_checkout_onepage_controller_success_action_observer>
45
+ </observers>
46
+ </checkout_onepage_controller_success_action>
47
+ <checkout_multishipping_controller_success_action>
48
+ <observers>
49
+ <veplatform_checkout_multishipping_controller_success_action_observer>
50
+ <type>singleton</type>
51
+ <class>VeInteractive_VePlatform_Observer_ThanksPage</class>
52
+ <method>showPixel</method>
53
+ </veplatform_checkout_multishipping_controller_success_action_observer>
54
+ </observers>
55
+ </checkout_multishipping_controller_success_action>
56
+ </events>
57
+ <blocks>
58
+ <veplatform>
59
+ <class>VeInteractive_VePlatform_Block</class>
60
+ </veplatform>
61
+ <adminhtml>
62
+ <rewrite>
63
+ <system_config_form_fieldset>VeInteractive_VePlatform_Block_ConfigFieldset</system_config_form_fieldset>
64
+ </rewrite>
65
+ </adminhtml>
66
+ </blocks>
67
+ </global>
68
+ <admin>
69
+ <routers>
70
+ <adminhtml>
71
+ <args>
72
+ <modules>
73
+ <veplatform before="Mage_Adminhtml">VeInteractive_VePlatform_Adminhtml</veplatform>
74
+ </modules>
75
+ </args>
76
+ </adminhtml>
77
+ </routers>
78
+ </admin>
79
+ <frontend>
80
+ <layout>
81
+ <updates>
82
+ <veinteractive_veplatform>
83
+ <file>veplatform.xml</file>
84
+ </veinteractive_veplatform>
85
+ </updates>
86
+ </layout>
87
+ <routers>
88
+ <veplatform>
89
+ <use>standard</use>
90
+ <args>
91
+ <module>VeInteractive_VePlatform</module>
92
+ <frontname>veplatform</frontname>
93
+ </args>
94
+ </veplatform>
95
+ </routers>
96
+ </frontend>
97
+ <default>
98
+ <veplatform>
99
+ <service>
100
+ <url>https://veconnect.veinteractive.com</url>
101
+ </service>
102
+ </veplatform>
103
+ </default>
104
+ </config>
app/code/community/VeInteractive/VePlatform/etc/system.xml CHANGED
@@ -6,9 +6,9 @@
6
  <sort_order>900</sort_order>
7
  </veinteractive_tab>
8
  </tabs>
9
- <sections>
10
  <veplatform_options translate="label" module="VeInteractive_VePlatform">
11
- <label>VePlatform</label>
12
  <tab>veinteractive_tab</tab>
13
  <sort_order>100</sort_order>
14
  <frontend_type>text</frontend_type>
@@ -22,15 +22,6 @@
22
  <show_in_default>1</show_in_default>
23
  <show_in_website>0</show_in_website>
24
  <show_in_store>0</show_in_store>
25
- <fields>
26
- <products>
27
- <frontend_type>multiselect</frontend_type>
28
- <source_model>VeInteractive_VePlatform/Products</source_model>
29
- <show_in_default>1</show_in_default>
30
- <show_in_website>0</show_in_website>
31
- <show_in_store>0</show_in_store>
32
- </products>
33
- </fields>
34
  </settings>
35
  </groups>
36
  </veplatform_options>
6
  <sort_order>900</sort_order>
7
  </veinteractive_tab>
8
  </tabs>
9
+ <sections>
10
  <veplatform_options translate="label" module="VeInteractive_VePlatform">
11
+ <label>Ve for Magento</label>
12
  <tab>veinteractive_tab</tab>
13
  <sort_order>100</sort_order>
14
  <frontend_type>text</frontend_type>
22
  <show_in_default>1</show_in_default>
23
  <show_in_website>0</show_in_website>
24
  <show_in_store>0</show_in_store>
 
 
 
 
 
 
 
 
 
25
  </settings>
26
  </groups>
27
  </veplatform_options>
app/code/community/VeInteractive/VePlatform/templates/vemaster.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <script type='text/javascript' id='script-masterdata'>
2
+ var masterData = <?php echo json_encode($this->getMasterData());?>;
3
+ </script>
app/code/community/VeInteractive/VePlatform/templates/vepixel.phtml CHANGED
@@ -1,3 +1,3 @@
1
  <?php if($this->showPixel()): ?>
2
- <img height="1" width="1" src="<?php echo $this->journeyPixel() ; ?>" />
3
  <?php endif; ?>
1
  <?php if($this->showPixel()): ?>
2
+ <img height="1" width="1" src="<?php echo $this->journeyPixel(); ?>"/>
3
  <?php endif; ?>
app/code/community/VeInteractive/VePlatform/templates/vetag.phtml CHANGED
@@ -1,11 +1,14 @@
1
- <?php $tag = $this->journeyTag(); ?>
2
- <?php if($tag): ?>
3
- <script type='text/javascript'>
4
- (function() {
5
- var ve = document.createElement('script');
6
- ve.type = 'text/javascript';
7
- ve.async = true;
8
- ve.src = document.location.protocol + '<?php echo $tag; ?>';
9
- var s = document.getElementsByTagName('body')[0];s.appendChild(ve, s);})()
10
- </script>
 
 
 
11
  <?php endif; ?>
1
+ <?php
2
+ $tag = $this->journeyTag();
3
+ if($tag): ?>
4
+ <script type='text/javascript'>
5
+ (function () {
6
+ var ve = document.createElement('script');
7
+ ve.type = 'text/javascript';
8
+ ve.async = true;
9
+ ve.src = document.location.protocol + '<?php echo $tag; ?>';
10
+ var s = document.getElementsByTagName('body')[0];
11
+ s.appendChild(ve, s);
12
+ })()
13
+ </script>
14
  <?php endif; ?>
app/design/adminhtml/veplatform/default/template/systemconfig/veplatform_options_settings/formfieldset/footer.phtml CHANGED
@@ -1,2 +0,0 @@
1
- </div>
2
- </fieldset>
 
 
app/design/adminhtml/veplatform/default/template/systemconfig/veplatform_options_settings/formfieldset/header.phtml CHANGED
@@ -1,1017 +1,34 @@
1
- <style>
2
- /**
3
- * Magento styles
4
- */
5
- #veplatform_options_settings {
6
- padding: 0;
7
- }
8
- #mage-veplatform_options_settings {
9
- display:none;
10
- }
11
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .quest_btn,
12
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info .quest_btn {
13
- font-family: DINWeb-Medium, sans-serif;
14
- background: #fff;
15
- color: #1fbd9d;
16
- border: 1px solid #dadada;
17
- padding: 10px;
18
- display: block;
19
- margin: 0 auto;
20
- font-size: 18px;
21
- font-weight: normal; }
22
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .quest_btn.hidden {
23
- visibility: hidden;
24
- }
25
- #veinteractive_main .ve_footer {
26
- height: 50px;
27
- }
28
-
29
- /**
30
- * Common styles
31
- */
32
- .icons-sprite, .icons-envelope, .icons-phone, .icons-pike {
33
- background-image: url('<?php echo $this->getMyImagesUrl( 'icons-sdb320c34e8.png' ); ?>');
34
- background-repeat: no-repeat; }
35
-
36
- .icons-envelope {
37
- background-position: 0 0; }
38
-
39
- .icons-phone {
40
- background-position: 0 -12px; }
41
-
42
- .icons-pike {
43
- background-position: 0 -28px; }
44
-
45
- @font-face {
46
- font-family: DINWeb;
47
- src: url(<?php echo $this->getMyFontsUrl( 'DINWeb.eot?' ); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl( 'DINWeb.woff' ); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl( 'DINComp.ttf' ); ?>) format("truetype"); }
48
- @font-face {
49
- font-family: DINWeb-Medium;
50
- src: url(<?php echo $this->getMyFontsUrl( 'DINWeb-Medium.eot?' ); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl( 'DINWeb-Medium.woff' ); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl( 'DINComp-Medium.ttf' ); ?>) format("truetype"); }
51
- @font-face {
52
- font-family: DINWeb-Bold;
53
- src: url(<?php echo $this->getMyFontsUrl( 'DINWeb-Bold.eot?' ); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl( 'DINWeb-Bold.woff' ); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl( 'DINComp-Bold.ttf' ); ?>) format("truetype"); }
54
- @font-face {
55
- font-family: DINWeb-Light;
56
- src: url(<?php echo $this->getMyFontsUrl( 'DINWeb-Light.eot?' ); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl( 'DINWeb-Light.woff' ); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl( 'DINComp-Light.ttf' ); ?>) format("truetype"); }
57
- #veinteractive_main {
58
- border: 0;
59
- background-color: #fff;
60
- margin: 0; }
61
- #veinteractive_main .product-logo-clickable {
62
- cursor: pointer; }
63
- #veinteractive_main .product-logo-clickable.no-clickable {
64
- cursor: default; }
65
- #veinteractive_main .main_messages h2, #veinteractive_main p, #veinteractive_main span, #veinteractive_main li {
66
- font-family: DINWeb; }
67
- #veinteractive_main .content_grid {
68
- width: 100%;
69
- max-width: 1200px;
70
- margin: 0 auto; }
71
- #veinteractive_main a {
72
- text-decoration: none;
73
- font-family: DINWeb-Bold; }
74
- #veinteractive_main .ve_header .header_top .right_header .hidden,
75
- #veinteractive_main .hidden .extra_content {
76
- display: none; }
77
- #veinteractive_main .ecommerce-logo {
78
- margin-bottom: 34px; }
79
- #veinteractive_main .icons-pike,
80
- #veinteractive_main .icons-envelope,
81
- #veinteractive_main .icons-phone {
82
- display: inline-block;
83
- position: relative; }
84
- #veinteractive_main .icons-pike {
85
- height: 12px;
86
- width: 12px;
87
- top: 2px;
88
- margin-left: 5px; }
89
- #veinteractive_main .icons-envelope {
90
- height: 12px;
91
- width: 17px;
92
- top: 2px;
93
- margin-right: 15px; }
94
- #veinteractive_main .icons-phone {
95
- height: 18px;
96
- width: 18px;
97
- top: 3px;
98
- margin-right: 15px; }
99
- #veinteractive_main .ve_error {
100
- background: #fff; }
101
- #veinteractive_main .ve_error p {
102
- font-family: DINWeb-Medium;
103
- display: block;
104
- text-align: center;
105
- color: red;
106
- font-weight: bold;
107
- font-size: 20px; }
108
- #veinteractive_main .ve_header {
109
- background: url("<?php echo $this->getMyImagesUrl( 'header_banner.jpg' ); ?>") center center;
110
- width: 100%;
111
- padding-bottom: 70px;
112
- height: 216px; }
113
- #veinteractive_main .ve_header .header_top {
114
- padding: 35px 30px; }
115
- #veinteractive_main .ve_header .header_top .left_header, #veinteractive_main .ve_header .header_top .right_header {
116
- width: 50%; }
117
- #veinteractive_main .ve_header .header_top .left_header {
118
- float: left; }
119
- #veinteractive_main .ve_header .header_top .right_header {
120
- float: right; }
121
- #veinteractive_main .ve_header .header_top .right_header .main_menu {
122
- margin-top: 34px; }
123
- #veinteractive_main .ve_header .header_top .right_header li {
124
- display: block;
125
- text-align: right; }
126
- #veinteractive_main .ve_header .header_top .right_header li .cli_quest {
127
- color: #92ab45;
128
- margin-right: 10px;
129
- font-size: 16px; }
130
- #veinteractive_main .ve_header .header_top .right_header li a {
131
- color: #fff;
132
- font-size: 20px; }
133
- #veinteractive_main .ve_header .header_top .right_header li a:hover {
134
- color: #92ab45; }
135
- #veinteractive_main .ve_header .faint-line {
136
- margin: 50px 0;
137
- padding-top: 10px;
138
- border-top: 2px solid #788590;
139
- border-top: 2px solid rgba(255, 255, 255, 0.05); }
140
- #veinteractive_main .ve_header .faint-line .main_messages .conf-msg, #veinteractive_main .ve_header .faint-line .main_messages .thx-msg {
141
- display: block;
142
- text-align: left;
143
- margin: 20px 0px; }
144
- #veinteractive_main .ve_header .faint-line .main_messages .thx-msg {
145
- color: #9d9a9a;
146
- font-size: 28px; }
147
- #veinteractive_main .ve_header .faint-line .main_messages .conf-msg {
148
- color: #fff;
149
- font-size: 36px; }
150
- #veinteractive_main .ve_main .hidden {
151
- display: none; }
152
- #veinteractive_main .ve_main .company_info,
153
- #veinteractive_main .ve_main .legal_info,
154
- #veinteractive_main .ve_main .thanks_info {
155
- margin: 70px auto; }
156
- #veinteractive_main .ve_main .company_info .info_text p,
157
- #veinteractive_main .ve_main .legal_info .info_text p,
158
- #veinteractive_main .ve_main .thanks_info .info_text p {
159
- color: #6e7479;
160
- font-size: 16px;
161
- line-height: 25px; }
162
- #veinteractive_main .ve_main .company_info .info_text a,
163
- #veinteractive_main .ve_main .legal_info .info_text a,
164
- #veinteractive_main .ve_main .thanks_info .info_text a {
165
- color: #1fbd9d; }
166
- #veinteractive_main .ve_main .company_info .info_text a:hover,
167
- #veinteractive_main .ve_main .legal_info .info_text a:hover,
168
- #veinteractive_main .ve_main .thanks_info .info_text a:hover {
169
- color: #000; }
170
- #veinteractive_main .ve_main .company_info .info_text .ve-list,
171
- #veinteractive_main .ve_main .legal_info .info_text .ve-list,
172
- #veinteractive_main .ve_main .thanks_info .info_text .ve-list {
173
- list-style-image: url("<?php echo $this->getMyImagesUrl( 've-check.png' ); ?>");
174
- margin: 0;
175
- padding: 0 40px; }
176
- #veinteractive_main .ve_main .company_info .info_text .ve-list li,
177
- #veinteractive_main .ve_main .legal_info .info_text .ve-list li,
178
- #veinteractive_main .ve_main .thanks_info .info_text .ve-list li {
179
- color: #6e7479;
180
- line-height: 25px;
181
- font-size: 16px; }
182
- #veinteractive_main .ve_main .company_info .info_text .ve-list li:empty,
183
- #veinteractive_main .ve_main .legal_info .info_text .ve-list li:empty,
184
- #veinteractive_main .ve_main .thanks_info .info_text .ve-list li:empty {
185
- display: none; }
186
- #veinteractive_main .ve_main .company_info .info_text .social-info,
187
- #veinteractive_main .ve_main .legal_info .info_text .social-info,
188
- #veinteractive_main .ve_main .thanks_info .info_text .social-info {
189
- margin: 0;
190
- padding: 0; }
191
- #veinteractive_main .ve_main .company_info .info_text .social-info li,
192
- #veinteractive_main .ve_main .legal_info .info_text .social-info li,
193
- #veinteractive_main .ve_main .thanks_info .info_text .social-info li {
194
- list-style: none;
195
- margin: 5px 10px; }
196
- #veinteractive_main .ve_main .company_info .info_text .social-info a,
197
- #veinteractive_main .ve_main .legal_info .info_text .social-info a,
198
- #veinteractive_main .ve_main .thanks_info .info_text .social-info a {
199
- font-size: 16px; }
200
- #veinteractive_main .ve_main .company_info .info_text .social-info span,
201
- #veinteractive_main .ve_main .legal_info .info_text .social-info span,
202
- #veinteractive_main .ve_main .thanks_info .info_text .social-info span {
203
- color: #6e7479;
204
- font-size: 16px; }
205
- #veinteractive_main .ve_main .company_info .info_text .social-info .country,
206
- #veinteractive_main .ve_main .legal_info .info_text .social-info .country,
207
- #veinteractive_main .ve_main .thanks_info .info_text .social-info .country {
208
- font-family: DINWeb-Bold; }
209
- #veinteractive_main .ve_main .product_activation {
210
- background-color: #f0f0f0;
211
- padding: 70px 40px; }
212
- #veinteractive_main .ve_main .product_activation .product_activation_content .vebutton .confirm-btn {
213
- font-family: DINWeb-Medium;
214
- font-size: 16px;
215
- display: block;
216
- margin: 50px auto 0px;
217
- padding: 10px 20px;
218
- background: #09b692;
219
- color: #fff;
220
- border: none;
221
- -moz-border-radius: 2px;
222
- -webkit-border-radius: 2px;
223
- border-radius: 2px; }
224
- #veinteractive_main .ve_main .product_activation .product_activation_content .vebutton .confirm-btn:hover {
225
- cursor: pointer; }
226
- #veinteractive_main .ve_main .product_activation .product_activation_content .product_act_title {
227
- font-family: DINWeb-Medium;
228
- color: #343f48;
229
- padding-bottom: 5px;
230
- margin-bottom: 32px;
231
- font-size: 30px;
232
- font-weight: lighter;
233
- display: block;
234
- text-align: center;
235
- border-bottom: 1px solid #dadada; }
236
- #veinteractive_main .ve_main .product_activation .product_activation_content .extra_content {
237
- margin: 64px 0px 0px; }
238
- #veinteractive_main .ve_main .product_activation .product_activation_content .extra_content .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .extra_content p {
239
- float: left; }
240
- #veinteractive_main .ve_main .product_activation .product_activation_content .extra_content .product_logo {
241
- width: 30%; }
242
- #veinteractive_main .ve_main .product_activation .product_activation_content .extra_content p {
243
- width: 70%;
244
- font-size: 16px;
245
- line-height: 25px; }
246
- #veinteractive_main .ve_main .product_activation .product_activation_content .product {
247
- width: 25%; }
248
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .product .product_name {
249
- margin: 0 auto; }
250
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .product_logo {
251
- height: 232px;
252
- width: 212px; }
253
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .product_name {
254
- text-align: center; }
255
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .product_name p {
256
- font-size: 16px; }
257
- #veinteractive_main .ve_main .product_activation .product_activation_content .product input[type="checkbox"] {
258
- display: none; }
259
- #veinteractive_main .ve_main .product_activation .product_activation_content .product input[type="checkbox"] + label {
260
- display: block;
261
- margin: 20px auto;
262
- width: 22px;
263
- height: 22px;
264
- background: url("<?php echo $this->getMyImagesUrl( 'radio_unselected.png' ); ?>") left top no-repeat; }
265
- #veinteractive_main .ve_main .product_activation .product_activation_content .product input[type="checkbox"]:checked + label {
266
- background: url("<?php echo $this->getMyImagesUrl( 'radio_selected.png' ); ?>") left top no-repeat; }
267
- #veinteractive_main .ve_main .product_activation .product_activation_content .product input[type="checkbox"]:disabled + label {
268
- background: url("<?php echo $this->getMyImagesUrl( 'product_selected.png' ); ?>") left top no-repeat; }
269
- #veinteractive_main .ve_main .product_activation .product_activation_content .product input[type="checkbox"]:disabled + label:hover {
270
- cursor: default; }
271
- #veinteractive_main .ve_main .product_activation .product_activation_content .product label:hover {
272
- cursor: pointer; }
273
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .quest_btn {
274
- font-family: DINWeb-Medium;
275
- background-color: #F0F0F0;
276
- color: #1fbd9d;
277
- border: 1px solid #dadada;
278
- padding: 10px;
279
- display: block;
280
- margin: 0 auto;
281
- font-size: 18px; }
282
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .quest_btn:hover {
283
- cursor: pointer; }
284
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info .product_logo {
285
- height: 180px;
286
- width: 212px;
287
- margin: 0 auto; }
288
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #vecontact_info_content .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #vechat_info_content .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #veassist_info_content .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #veads_info_content .product_logo {
289
- margin-right: 50px; }
290
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #vecontact_info_content .product_logo {
291
- background: url("<?php echo $this->getMyImagesUrl( 'vecontact-logo-min.png' ); ?>") no-repeat; }
292
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #vechat_info_content .product_logo {
293
- background: url("<?php echo $this->getMyImagesUrl( 'vechat-logo-min.png' ); ?>") no-repeat; }
294
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #veassist_info_content .product_logo {
295
- background: url("<?php echo $this->getMyImagesUrl( 'veassist-logo-min.png' ); ?>") no-repeat; }
296
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #veads_info_content .product_logo {
297
- background: url("<?php echo $this->getMyImagesUrl( 'veads-logo-min.png' ); ?>") no-repeat; }
298
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info .quest_btn {
299
- font-family: DINWeb-Medium;
300
- background-color: #F0F0F0;
301
- color: #1fbd9d;
302
- border: 1px solid #dadada;
303
- padding: 10px;
304
- display: inline-block;
305
- font-size: 18px; }
306
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info .quest_btn:hover {
307
- cursor: pointer; }
308
- #veinteractive_main .ve_main .product_activation .product_activation_content .vecontact .product_logo {
309
- background: url("<?php echo $this->getMyImagesUrl( 'vecontact-logo-big.png' ); ?>") no-repeat; }
310
- #veinteractive_main .ve_main .product_activation .product_activation_content .vechat {
311
- float: right; }
312
- #veinteractive_main .ve_main .product_activation .product_activation_content .vechat .product_logo {
313
- background: url("<?php echo $this->getMyImagesUrl( 'vechat-logo-big.png' ); ?>") no-repeat; }
314
- #veinteractive_main .ve_main .product_activation .product_activation_content .veassist {
315
- float: right; }
316
- #veinteractive_main .ve_main .product_activation .product_activation_content .veassist .product_logo {
317
- background: url("<?php echo $this->getMyImagesUrl( 'veassist-logo-big.png' ); ?>") no-repeat; }
318
- #veinteractive_main .ve_main .product_activation .product_activation_content .veads {
319
- float: right; }
320
- #veinteractive_main .ve_main .product_activation .product_activation_content .veads .product_logo {
321
- background: url("<?php echo $this->getMyImagesUrl( 'veads-logo-big.png' ); ?>") no-repeat; }
322
- #veinteractive_main .ve_footer {
323
- background-color: #2f383c; }
324
- #veinteractive_main .ve_footer .footer-content {
325
- margin: 0 auto;
326
- padding: 25px 50px 0px;
327
- font-size: 14px;
328
- color: #fff; }
329
- #veinteractive_main .ve_footer .footer-content .footer-left, #veinteractive_main .ve_footer .footer-content .footer-center, #veinteractive_main .ve_footer .footer-content .footer-right {
330
- width: 33%;
331
- position: relative;
332
- top: 50%;
333
- -webkit-transform: translateY(-50%);
334
- -ms-transform: translateY(-50%);
335
- transform: translateY(-50%); }
336
- #veinteractive_main .ve_footer .footer-content .footer-left {
337
- float: left; }
338
- #veinteractive_main .ve_footer .footer-content .footer-left a {
339
- font-family: DINWeb-Light;
340
- color: #fff; }
341
- #veinteractive_main .ve_footer .footer-content .footer-left a:hover {
342
- color: #1fbd9d; }
343
- #veinteractive_main .ve_footer .footer-content .footer-center {
344
- display: inline-block;
345
- margin: 0 auto; }
346
- #veinteractive_main .ve_footer .footer-content .footer-center img {
347
- display: block;
348
- margin: 0 auto; }
349
- #veinteractive_main .ve_footer .footer-content .footer-right {
350
- float: right;
351
- text-align: right; }
352
- #veinteractive_main .ve_footer .footer-content .footer-right span {
353
- font-family: DINWeb-Light; }
354
-
355
- @media screen and (max-width: 1600px) {
356
- #veinteractive_main .content_grid {
357
- max-width: 900px;
358
- margin: 0px auto;
359
- min-width: 500px; }
360
- }
361
-
362
- @media screen and (max-width: 1335px) {
363
- #veinteractive_main .ve_footer .footer-content {
364
- padding: 25px 0px 0px; }
365
-
366
-
367
- }
368
- @media screen and (max-width: 1287px) {
369
- #veinteractive_main .ve_footer .footer-content .footer-right {
370
- text-align: right; } }
371
- @media screen and (max-width: 1253px) {
372
- #veinteractive_main .ve_header .header_top {
373
- padding: 35px 30px; }
374
-
375
- #veinteractive_main .ve_header .faint-line .main_messages .thx-msg, #veinteractive_main .ve_header .faint-line .main_messages .conf-msg {
376
- margin: 20px 30px; }
377
-
378
- #veinteractive_main .content_grid {
379
- max-width: 900px;
380
- margin: 0px auto;
381
- min-width: 500px; }
382
-
383
- #veinteractive_main .info_text {
384
- margin: 0 30px; }
385
-
386
- #veinteractive_main .ve_main .product_activation .product_activation_content .vecontact .product_logo {
387
- background: url("<?php echo $this->getMyImagesUrl( 'vecontact-logo.png' ); ?>") no-repeat; }
388
- #veinteractive_main .ve_main .product_activation .product_activation_content .vechat .product_logo {
389
- background: url("<?php echo $this->getMyImagesUrl( 'vechat-logo.png' ); ?>") no-repeat; }
390
- #veinteractive_main .ve_main .product_activation .product_activation_content .veassist .product_logo {
391
- background: url("<?php echo $this->getMyImagesUrl( 'veassist-logo.png' ); ?>") no-repeat; }
392
- #veinteractive_main .ve_main .product_activation .product_activation_content .veads .product_logo {
393
- background: url("<?php echo $this->getMyImagesUrl( 'veads-logo.png' ); ?>") no-repeat; }
394
-
395
- #veinteractive_main .ve_main .product_activation .product_activation_content .product .product_logo {
396
- height: 200px;
397
- width: 175px; }
398
-
399
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info .quest_btn {
400
- display: block;
401
- margin: 0 auto; }
402
-
403
- #veinteractive_main .ve_footer .footer-content .footer-center, #veinteractive_main .ve_footer .footer-content .footer-right {
404
- text-align: center; }
405
-
406
- #veinteractive_main .ve_header .header_top .right_header li {
407
- margin-right: 40px; } }
408
- @media screen and (max-width: 1120px) {
409
- #veinteractive_main .ve_main .product_activation .product_activation_content .product {
410
- width: 50%;
411
- display: inline-block;
412
- margin-bottom: 50px; }
413
-
414
- #veinteractive_main .ve_main .product_activation .product_activation_content .vebutton .confirm-btn {
415
- margin: 0 auto; }
416
-
417
- #veinteractive_main .ve_footer {
418
- padding: 0 30px; } }
419
- @media screen and (max-width: 990px) {
420
- #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #vecontact_info_content .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #vechat_info_content .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #veassist_info_content .product_logo, #veinteractive_main .ve_main .product_activation .product_activation_content .product-extra-info #veads_info_content .product_logo {
421
- display: none; }
422
-
423
- #veinteractive_main .ve_main .product_activation .product_activation_content .extra_content p {
424
- width: auto; }
425
-
426
- #veinteractive_main .ve_footer .footer-content {
427
- font-size: 12px; } }
428
- @media screen and (max-width: 800px) {
429
- #veinteractive_main .ve_header .faint-line .main_messages .thx-msg {
430
- font-size: 22px; }
431
-
432
- #veinteractive_main .ve_header .faint-line .main_messages .conf-msg {
433
- font-size: 30px; }
434
-
435
- #veinteractive_main .ve_header .header_top .right_header li {
436
- text-align: right;
437
- display: block;
438
- margin-right: 40px; }
439
- #veinteractive_main .ve_header .header_top .right_header li .cli_quest {
440
- display: block;
441
- margin-right: 0; } }
442
-
443
- </style>
444
-
445
- <script>
446
- (function (window, document){
447
- 'use strict';
448
-
449
- function veAnimate(elem,style,unit,from,to,time,prop) {
450
- if( !elem) return;
451
- var start = new Date().getTime(),
452
- timer = setInterval(function() {
453
- var step = Math.min(1,(new Date().getTime()-start)/time);
454
- if (prop) {
455
- elem[style] = (from+step*(to-from))+unit;
456
- } else {
457
- elem.style[style] = (from+step*(to-from))+unit;
458
- }
459
- if( step == 1) clearInterval(timer);
460
- },25);
461
-
462
- elem.style[style] = from+unit;
463
- }
464
-
465
- function veAddEvent( evnt, elem, func ) {
466
- if( elem.addEventListener ) { // W3C DOM
467
- elem.addEventListener( evnt, func, false );
468
- }
469
- else if( elem.attachEvent ) { // IE DOM
470
- elem.attachEvent( "on"+evnt, func );
471
- }
472
- else { // No much to do
473
- elem[ evnt ] = func;
474
- }
475
- }
476
-
477
- function veQueryClass(matchClass) {
478
- var responseElems = [];
479
- var elems = document.getElementsByTagName('*'), i;
480
-
481
- for (i=0;i<elems.length;i++) {
482
- if((' ' + elems[i].className + ' ').indexOf(' ' + matchClass + ' ') > -1) {
483
- responseElems.push(elems[i]);
484
- }
485
- }
486
-
487
- return responseElems;
488
- }
489
-
490
- function veAddClass(elem, classToAdd) {
491
- if (elem.className.split(' ').indexOf(classToAdd) < 0) {
492
- elem.className = elem.className + ' ' + classToAdd;
493
- }
494
- }
495
-
496
- function veHasClass(elem, classToCheck) {
497
- return elem.className.match(new RegExp('(\\s|^)' + classToCheck + '(\\s|$)'));
498
- }
499
-
500
- function veRemoveClass(elem, classToRemove) {
501
- if (veHasClass(elem, classToRemove)) {
502
- var reg = new RegExp('(\\s|^)' + classToRemove + '(\\s|$)');
503
- elem.className = elem.className.replace(reg, ' ');
504
- }
505
- }
506
-
507
- function veCheckButton() {
508
- var confirmButton = document.getElementById('confirm-btn');
509
- var checkBoxes = veQueryClass('veplatform-checkbox');
510
- var itr;
511
- var allFalse = true;
512
-
513
- for (itr=0;itr<checkBoxes.length;itr++) {
514
- if(checkBoxes[itr].checked && !checkBoxes[itr].disabled) {
515
- allFalse = false;
516
- }
517
- }
518
-
519
- if(allFalse) {
520
- confirmButton.style.visibility = "hidden";
521
- }
522
- else {
523
- confirmButton.style.visibility = "visible";
524
- }
525
- }
526
-
527
- function veFindItemByValue( element, value ){
528
- var index = null;
529
- for( var i = 0; index == null && i < element.options.length; i++ ) {
530
- if( element.options[i].value === value ) {
531
- index = i;
532
- }
533
- }
534
- return index;
535
- }
536
-
537
- function veProductSelected( productSelected ) {
538
- var productList = document.getElementById( "veplatform_options_settings_products" );
539
- var idx = veFindItemByValue( productList, productSelected );
540
-
541
- if( idx != null ) {
542
- productList.options[ idx ].selected = !productList.options[ idx ].selected;
543
- }
544
- }
545
-
546
- function veSelectAllByDefault() {
547
- var productList = document.getElementById( "veplatform_options_settings_products" );
548
- var idx;
549
-
550
- for (idx=0;idx<productList.options.length;idx++) {
551
- productList.options[ idx ].selected = true;
552
- }
553
- }
554
-
555
- window.onload = function( onloadEvent ) {
556
- var iterator, logo, checkbox, button, closeButton, infoContentIterator;
557
- var buttons = veQueryClass('ve-open-info');
558
- var closeButtons = veQueryClass('ve-close-info');
559
- var infoContents = veQueryClass('ve-info-content');
560
- var checkBoxes = veQueryClass('veplatform-checkbox');
561
- var logos = veQueryClass('product-logo-clickable');
562
-
563
- // Click logo
564
- for (iterator=0;iterator<logos.length;iterator++) {
565
- logo = logos[iterator];
566
-
567
- veAddEvent( 'click', logo, function(currentEvent) {
568
- var currentEvent = currentEvent || window.event;
569
- var that = this;
570
- var targetId = that.getAttribute('data-target');
571
- var targetValue = that.getAttribute('data-value');
572
- var target = document.getElementById(targetId);
573
-
574
- currentEvent.preventDefault();
575
-
576
- if(target.checked) {
577
- target.checked = false;
578
- }
579
- else {
580
- target.checked = true;
581
- }
582
-
583
- veCheckButton();
584
-
585
- if(!veHasClass(that, 'no-clickable')) {
586
- veProductSelected(targetValue);
587
- }
588
- });
589
- }
590
-
591
- // Check boxes
592
- for (iterator=0;iterator<checkBoxes.length;iterator++) {
593
- checkbox = checkBoxes[iterator];
594
-
595
- veAddEvent( 'change', checkbox, function(currentEvent) {
596
- var that = this;
597
-
598
- veCheckButton();
599
- veProductSelected(that.value);
600
- });
601
- }
602
-
603
- // Open buttons
604
- for (iterator=0;iterator<buttons.length;iterator++) {
605
- button = buttons[iterator];
606
-
607
- veAddEvent( 'click', button, function(currentEvent) {
608
- var currentEvent = currentEvent || window.event;
609
- var that = this;
610
- var infoContentIterator;
611
- var infoContent;
612
- var targetId = that.getAttribute('data-target');
613
- var target = document.getElementById(targetId);
614
-
615
- currentEvent.preventDefault();
616
-
617
- if(veHasClass(target, 'hidden')) {
618
- for(infoContentIterator=0;infoContentIterator<infoContents.length;infoContentIterator++) {
619
- infoContent = infoContents[infoContentIterator];
620
- veAddClass(infoContent, 'hidden');
621
- }
622
-
623
- veRemoveClass(target, 'hidden');
624
- veAnimate(document.documentElement, "scrollTop", "", document.documentElement.scrollTop, target.offsetTop, 300, true);
625
- veAnimate(document.body, "scrollTop", "", document.body.scrollTop, target.offsetTop, 300, true);
626
- }
627
- else {
628
- veAddClass(target, 'hidden');
629
- }
630
- });
631
- }
632
-
633
- // Close buttons
634
- for (iterator=0;iterator<closeButtons.length;iterator++) {
635
- closeButton = closeButtons[iterator];
636
-
637
- veAddEvent( 'click', closeButton, function(currentEvent) {
638
- var currentEvent = currentEvent || window.event;
639
- var that = this;
640
- var targetId = that.getAttribute('data-target');
641
- var target = document.getElementById(targetId);
642
-
643
- currentEvent.preventDefault();
644
-
645
- veAddClass(target, 'hidden');
646
- });
647
- }
648
-
649
- veCheckButton();
650
- veSelectAllByDefault();
651
- };
652
-
653
- }(window, document));
654
-
655
- /*
656
- (function (window){
657
- 'use strict';
658
-
659
- function veProductCloseInfo( currentEvent, me, infoContentId ) {
660
- var infoContent = document.getElementById( infoContentId );
661
- infoContent.className = "hidden";
662
- }
663
-
664
- function veProductOpenInfo( currentEvent, me, infoContentId, allInfoContent ) {
665
-
666
- var infoContent = document.getElementById( infoContentId );
667
-
668
- if(infoContent.className == "") {
669
- infoContent.className = "hidden";
670
-
671
- return;
672
- }
673
-
674
- for(var i = 0; i < allInfoContent.length; i++) {
675
- document.getElementById( allInfoContent[i] ).className = "hidden";
676
- }
677
-
678
- infoContent.className = "";
679
- }
680
-
681
- function veProductSelected( currentEvent, me, productListId, productSelected ) {
682
- var productList = document.getElementById( productListId );
683
- var idx = veFindItemByValue( productList, productSelected );
684
- if( idx != null ) {
685
- productList.options[ idx ].selected = !productList.options[ idx ].selected;
686
- }
687
- }
688
-
689
- function veProductLoad( currentEvent, me ) {
690
- me.disabled = me.checked;
691
- }
692
-
693
- var veEvents = {
694
- "vecontact_moreinfo": {
695
- "click": {
696
- prevent: true,
697
- funct: veProductOpenInfo,
698
- args: [ "vecontact_info_content", [ "vecontact_info_content", "vechat_info_content" ] ]
699
- }
700
- },
701
- "vecontact_closeinfo": {
702
- "click": {
703
- prevent: true,
704
- funct: veProductCloseInfo,
705
- args: [ "vecontact_info_content" ]
706
- }
707
- },
708
- "vechat_moreinfo": {
709
- "click": {
710
- prevent: true,
711
- funct: veProductOpenInfo,
712
- args: [ "vechat_info_content", [ "vecontact_info_content", "vechat_info_content" ] ]
713
- }
714
- },
715
- "vechat_closeinfo": {
716
- "click": {
717
- prevent: true,
718
- funct: veProductCloseInfo,
719
- args: [ "vechat_info_content" ]
720
- }
721
- },
722
- "contactCb": {
723
- "click": {
724
- funct: veProductSelected,
725
- args: [ "veplatform_options_settings_products", "vecontact" ]
726
- },
727
- "load":{
728
- funct: veProductLoad
729
- }
730
- },
731
- "chatCb": {
732
- "click": {
733
- funct: veProductSelected,
734
- args: [ "veplatform_options_settings_products", "vechat" ]
735
- },
736
- "load": {
737
- funct: veProductLoad
738
- }
739
- }
740
- };
741
-
742
- function veAddEvent( evnt, elem, func ) {
743
- if( elem.addEventListener ) { // W3C DOM
744
- elem.addEventListener( evnt, func, false );
745
- } else if( elem.attachEvent ) { // IE DOM
746
- elem.attachEvent( "on"+evnt, func );
747
- } else { // No much to do
748
- elem[ evnt ] = func;
749
- }
750
- }
751
-
752
- function veFindItemByValue( element, value ){
753
- var index = null;
754
- for( var i = 0; index == null && i < element.options.length; i++ ) {
755
- if( element.options[i].value === value ) {
756
- index = i;
757
- }
758
- }
759
- return index;
760
- }
761
-
762
- function veCall( currentEvent, me, funct, args ) {
763
- var new_args;
764
-
765
- if( typeof funct === "function" ) {
766
- new_args = [ currentEvent, me ];
767
- if( args ) new_args = new_args.concat( args );
768
- funct.apply( null, new_args );
769
- }
770
- }
771
-
772
- window.onload = function( onloadEvent ) {
773
- var onloadEvent = onloadEvent || window.event;
774
-
775
- for( var elementId in veEvents ){
776
- if(veEvents.hasOwnProperty(elementId)) {
777
- for( var eventId in veEvents[ elementId ] ) {
778
- if(veEvents[ elementId ].hasOwnProperty(eventId)) {
779
- if( eventId == "load" ) {
780
- veCall( onloadEvent, document.getElementById( elementId ), veEvents[elementId][eventId].funct, veEvents[elementId][eventId].args );
781
- }
782
- else {
783
- veAddEvent( eventId, document.getElementById( elementId ), function( currentEvent ) {
784
- var currentEvent = currentEvent || window.event;
785
-
786
- if( veEvents[this.id][currentEvent.type].prevent ) currentEvent.preventDefault();
787
- veCall( currentEvent, this, veEvents[this.id][currentEvent.type].funct, veEvents[this.id][currentEvent.type].args );
788
- });
789
- }
790
- }
791
- }
792
- }
793
- }
794
- };
795
- }(window));
796
- */
797
- </script>
798
-
799
- <?php $isThanksTime = $this->triggerThanksTime(); ?>
800
- <fieldset class="<?php echo $this->_getFieldsetCss(); ?>" id="<?php echo $this->parent_html_id; ?>">
801
- <div id="veinteractive_main">
802
-
803
- <div class="ve_header">
804
- <div class="header_top content_grid">
805
- <div class="left_header">
806
- <img src="<?php echo $this->getMyImagesUrl( 'main-logo.png' ); ?>" alt="VeInteractive">
807
- </div>
808
- <div class="right_header">
809
- <nav class="main_menu">
810
- <ul>
811
- <li class="<?php if( !$this->isAnyProductCtrlEnabled() ) echo "hidden"; ?>">
812
- <span class="cli_quest">Are you already a client? Then...</span>
813
- <a href="http://veplatform.veinteractive.com/Account/Login?ReturnUrl=%2f">Login</a>
814
- </li>
815
- </ul>
816
- </nav>
817
- </div>
818
- </div>
819
-
820
- <div class="faint-line">
821
- <div class="main_messages content_grid">
822
- <h2 class="thx-msg">
823
- <?php if( $isThanksTime ) : ?>
824
- Thank you for selecting your Ve product
825
- <?php else: ?>
826
- Thank you for installing VePlatform with Magento
827
- <?php endif; ?>
828
- </h2>
829
- <h2 class="conf-msg">
830
- <?php if( $isThanksTime ) : ?>
831
- Now see below for the next steps
832
- <?php else: ?>
833
- Now choose from our range of applications
834
- <?php endif; ?>
835
- </h2>
836
- </div>
837
- </div>
838
- </div>
839
-
840
- <div class="ve_main">
841
- <div class="company_info content_grid">
842
- <div class="info_text">
843
- <?php if( $isThanksTime ) : ?>
844
- <p>
845
- Thank you for selecting your Ve Apps.
846
- You are one step closer to increasing customer engagement and conversions on your site.
847
- </p>
848
- <p>
849
- An Account Manager will contact you within 2 working days to configure your
850
- first campaigns or you can contact us below to get started straight away.
851
- </p>
852
- <p>
853
- Creative examples of our apps available to view<a href="http://vecreative.veinteractive.com"> here</a>.
854
- </p>
855
- <ul class="social-info">
856
- <li>
857
- <span class="icons-envelope"></span>
858
- <a href="mailto:magento@veinteractive.com">Magento@veinteractive.com</a>
859
- </li>
860
- <li>
861
- <span class="icons-phone"></span>
862
- <span class="country">US:</span>
863
- <span>+1 857-284-7007</span>
864
- </li>
865
- <li>
866
- <span class="icons-phone"></span>
867
- <span class="country">UK:</span>
868
- <span>+44 (0)20 337 22555</span>
869
- </li>
870
- </ul>
871
- <p>Best regards,</p>
872
- <p>Ve Interactive</p>
873
- <?php else: ?>
874
- <p>
875
- By integrating the VePlatform into your Magento webstore, you now have instant access to its suite of
876
- retargeting, remarketing and re-engagement apps designed to:
877
- </p>
878
- <ul class="ve-list">
879
- <li>Reduce your website's bounce rate</li>
880
- <li>Recover lost sales with email, display retargeting and SMS messaging</li>
881
- <li>Increase conversion with real time onsite engagement</li>
882
- <li>Reach new and existing prospects with digital display advertising</li>
883
- </ul>
884
- <p>
885
- Activating all the Ve Apps on the VePlatform will deliver the maximum uplift in conversion. However, we also
886
- provide the option of selecting one or multiple apps to match your ecommerce goals.
887
- </p>
888
- <?php endif; ?>
889
- </div>
890
- </div>
891
-
892
- <div class="product_activation">
893
- <div class="product_activation_content content_grid">
894
- <h2 class="product_act_title">Please select from the following apps</h2>
895
-
896
- <div id="veads-section" class="veads product">
897
- <div class="product_logo product-logo-clickable <?php if( $this->isVeAdsCtrlEnabled() ) echo "no-clickable"; ?>" data-target="adsCb" data-value="veads"></div>
898
- <div class="product_name">
899
- <p>Dynamic display advertising</p>
900
- </div>
901
- <input type="checkbox" class="veplatform-checkbox" id="adsCb" name="product" value="veads" <?php if( $this->isVeAdsCtrlEnabled() ): ?>checked disabled <?php else: ?> checked <?php endif; ?> />
902
- <label for="adsCb"></label>
903
- <button id="veads_moreinfo" class="quest_btn ve-open-info" data-target="veads_info_content">
904
- Find out more <span class="icons-pike"></span>
905
- </button>
906
- </div>
907
-
908
- <div id="veassist-section" class="veassist product">
909
- <div class="product_logo product-logo-clickable <?php if( $this->isVeAssistCtrlEnabled() ) echo "no-clickable"; ?>" data-target="assistCb" data-value="veassist"></div>
910
- <div class="product_name">
911
- <p>Search optimization</p>
912
- </div>
913
- <input type="checkbox" class="veplatform-checkbox" id="assistCb" name="product" value="veassist" <?php if( $this->isVeAssistCtrlEnabled() ): ?>checked disabled <?php else: ?> checked <?php endif; ?> />
914
- <label for="assistCb"></label>
915
- <button id="veassist_moreinfo" class="quest_btn ve-open-info" data-target="veassist_info_content">
916
- Find out more <span class="icons-pike"></span>
917
- </button>
918
- </div>
919
-
920
- <div id="vechat-section" class="vechat product">
921
- <div class="product_logo product-logo-clickable <?php if( $this->isVeChatCtrlEnabled() ) echo "no-clickable"; ?>" data-target="chatCb" data-value="vechat"></div>
922
- <div class="product_name">
923
- <p>Increase website conversion</p>
924
- </div>
925
- <input type="checkbox" class="veplatform-checkbox" id="chatCb" name="product" value="vechat" <?php if( $this->isVeChatCtrlEnabled() ): ?>checked disabled <?php else: ?> checked <?php endif; ?> />
926
- <label for="chatCb"></label>
927
- <button id="vechat_moreinfo" class="quest_btn ve-open-info" data-target="vechat_info_content">
928
- Find out more <span class="icons-pike"></span>
929
- </button>
930
- </div>
931
-
932
- <div id="vecontact-section" class="vecontact product">
933
- <div class="product_logo product-logo-clickable <?php if( $this->isVeContactCtrlEnabled() ) echo "no-clickable"; ?>" data-target="contactCb" data-value="vecontact"></div>
934
- <div class="product_name">
935
- <p>Recover lost shopping carts</p>
936
- </div>
937
- <input type="checkbox" class="veplatform-checkbox" id="contactCb" name="product" value="vecontact" <?php if( $this->isVeContactCtrlEnabled() ): ?>checked disabled <?php else: ?> checked <?php endif; ?> />
938
- <label for="contactCb"></label>
939
- <button id="vecontact_moreinfo" class="quest_btn ve-open-info" data-target="vecontact_info_content">
940
- Find out more <span class="icons-pike"></span>
941
- </button>
942
- </div>
943
-
944
- <div class="vebutton">
945
- <input id="confirm-btn" class="confirm-btn" type="submit" value="Confirm Selection" onclick="configForm.submit()" />
946
- </div>
947
-
948
- <div class="product-extra-info">
949
- <div id="vechat_info_content" class="hidden ve-info-content">
950
- <div class="extra_content content_grid">
951
- <h2 class="product_act_title">VeChat: Increase website conversion</h2>
952
- <div class="product_logo"></div>
953
- <p>
954
- VeChat re-engages your customers at the point they abandon your website and prevents lost sales caused by price comparison shopping, site usability or distraction during the purchase process. The VeChat automated agent delivers real-time re-marketing messages. VeChat can also deliver promotional codes to specific segments based on purchasing behaviour.
955
- </p>
956
- <button id="vechat_closeinfo" class="quest_btn ve-close-info" data-target="vechat_info_content">Close App Details</button>
957
- </div>
958
- </div>
959
- <div id="vecontact_info_content" class="hidden ve-info-content">
960
- <div class="extra_content content_grid">
961
- <h2 class="product_act_title">VeContact: Recover lost shopping carts</h2>
962
- <div class="product_logo"></div>
963
- <p>
964
- VeContact increases your sales by delivering real-time emails to customers who abandon at the check-out, enticing them back to complete their purchase with highly targeted and personalised content. Includes promo code integration and compatible across all devices.
965
- </p>
966
- <button id="vecontact_closeinfo" class="quest_btn ve-close-info" data-target="vecontact_info_content">Close App Details</button>
967
- </div>
968
- </div>
969
- <div id="veassist_info_content" class="hidden ve-info-content">
970
- <div class="extra_content content_grid">
971
- <h2 class="product_act_title">VeAssist: Search optimization</h2>
972
- <div class="product_logo"></div>
973
- <p>
974
- VeAssist is an onsite product matching tool that directly tackles bounce caused by the disconnect that can exist between search and the products displayed on landing pages. Activated when a customer hits the back button to bounce, VeAssist interrogates your inventory and uses 'exact' and 'nearest' match logic to present the customer with enhanced product results, based on their original search engine query. Compatible with all search engines.
975
- </p>
976
- <button id="veassist_closeinfo" class="quest_btn ve-close-info" data-target="veassist_info_content">Close App Details</button>
977
- </div>
978
- </div>
979
- <div id="veads_info_content" class="hidden ve-info-content">
980
- <div class="extra_content content_grid">
981
- <h2 class="product_act_title">VeAds: Dynamic display advertising</h2>
982
- <div class="product_logo"></div>
983
- <p>
984
- VeAds harnesses the power of customer and purchasing intent data to deliver advertising campaigns that meet all advertiser KPIs. VeAds helps you target and convert new audiences, on a vast scale, across all connected devices.
985
- A successful digital advertising campaign uses a blend of prospecting and on and off site re-engagement to ensure that marketing dollars invested generate the best possible return.
986
- </p>
987
- <button id="veads_closeinfo" class="quest_btn ve-close-info" data-target="veads_info_content">Close App Details</button>
988
- </div>
989
- </div>
990
- </div>
991
- </div>
992
- </div>
993
-
994
- <div class="legal_info content_grid">
995
- <div class="info_text">
996
- <p>
997
- All Ve Apps are free to install and deploy. There are no upfront costs for set up, one-off charges or ongoing subscription costs.
998
- We only charge on a cost per acquisition basis meaning you only pay a 8% commission when one of our apps converts a sale on your site. If they all contribute to a sale, you still only pay once.
999
- </p>
1000
- </div>
1001
- </div>
1002
- </div>
1003
-
1004
- <div class="ve_footer">
1005
- <div class="footer-content content_grid">
1006
- <div class="footer-left">
1007
- <span><a target="_blank" href="http://www.veinteractive.com">Ve Interactive</a></span>
1008
- </div>
1009
- <div class="footer-right">
1010
- <span>&copy; <?php echo date("Y"); ?> All rights Reserved. Ve Interactive </span>
1011
- </div>
1012
- </div>
1013
- </div>
1014
-
1015
- </div>
1016
-
1017
- <div id="mage-<?php echo $this->parent_html_id; ?>">
1
+ <script type="text/javascript">
2
+ var installVePlatform = (function () {
3
+ var controllerUrl = '<?php echo $this->getUrl('/custom/installVePlatform');?>';
4
+ new Ajax.Request(controllerUrl,
5
+ {
6
+ method: 'POST',
7
+ requestHeaders: {Accept: 'application/json'},
8
+ contentType: 'application/x-www-form-urlencoded',
9
+ onCreate: function (request) {
10
+ Ajax.Responders.unregister(varienLoaderHandler.handler);
11
+ },
12
+ onSuccess: function (transport) {
13
+ Ajax.Responders.register(varienLoaderHandler.handler);
14
+ var resp = JSON.parse(transport.responseText);
15
+
16
+ if (resp.redirectUrl) {
17
+ window.location.href = resp.redirectUrl;
18
+ } else {
19
+ $('loadingGif').style.display = "none";
20
+ $('ve').insert(resp.HtmlView);
21
+ }
22
+ }
23
+ });
24
+
25
+ });
26
+
27
+ installVePlatform();
28
+ </script>
29
+ <?php include 'skin/adminhtml/veplatform/default/css/veplatform.php'; ?>
30
+ <div id="ve">
31
+ <div id="loadingGif">
32
+ <img src=<?php echo $this->getMyImagesUrl('loading.gif'); ?>>
33
+ </div>
34
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/layout/veplatform.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addItem"><type>skin_js</type>
6
+ <name>js/veinteractive/veplatform/veplatform.js</name></action>
7
+ </reference>
8
+ </default>
9
+ </layout>
app/etc/modules/VeInteractive_VePlatform.xml CHANGED
@@ -1,9 +1,9 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <config>
3
- <modules>
4
- <VeInteractive_VePlatform>
5
- <active>true</active>
6
- <codePool>community</codePool>
7
- </VeInteractive_VePlatform>
8
- </modules>
9
  </config>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <VeInteractive_VePlatform>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </VeInteractive_VePlatform>
8
+ </modules>
9
  </config>
package.xml CHANGED
@@ -1,27 +1,63 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>VeInteractive_VePlatform</name>
4
- <version>15.1.2.0</version>
5
  <stability>stable</stability>
6
- <license uri="http://opensource.org/licenses/OSL-3.0">Open Source License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>VePlatform: Increase conversions from abandoned carts.</summary>
10
- <description>Instantly increase your sales by adding the VePlatform&#x2019;s integrated remarketing and re-engagement apps that convert customers who abandon your site.&#xD;
11
- &#xD;
12
- Merchant Benefits:&#xD;
13
- &#xD;
14
- By integrating with the VePlatform you will have instant access to its suite of conversion enhancing remarketing and re-engagement apps designed to:&#xD;
15
- - Improve your bounce rate.&#xD;
16
- - Increase customer engagement.&#xD;
17
- - Increase conversions by reducing abandonment.&#xD;
18
- - Generate higher ROI from your campaigns.&#xD;
19
- - Deliver incremental revenue.</description>
20
- <notes>This release only support English at Magento Admin Panel.</notes>
21
- <authors><author><name>VeInteractive</name><user>VeInteractive</user><email>magento@veinteractive.com</email></author></authors>
22
- <date>2015-01-28</date>
23
- <time>14:08:58</time>
24
- <contents><target name="magecommunity"><dir name="VeInteractive"><dir name="VePlatform"><dir name="Block"><file name="ConfigFieldset.php" hash="572a650624cf2ab215e179b8376f340c"/><file name="Template.php" hash="8e3d2b912f786b5b29ffabdc3d838a60"/><file name="Vepixel.php" hash="63bbbba36389c22b6bf90caa697a73da"/><file name="Vetag.php" hash="aff8bf067fc9b63563db3fe3eeb17419"/></dir><dir name="Helper"><file name="Data.php" hash="abc7301b74c4f572f39c910feb8724a9"/></dir><dir name="Model"><file name="Products.php" hash="8698f312bc56e6cff245728a31380adc"/></dir><dir name="Observer"><file name="AdminUserLoadAfter.php" hash="964e6c5bbbffc1c947a98f2985248d00"/><file name="Layout.php" hash="2cee6a40331543feedbe6c7f8a8b1c92"/><file name="SaveSettings.php" hash="2413560ada3a5f17449bafebef79acd8"/><file name="ThanksPage.php" hash="e347e9eaee6c31f1ba0f8ba0b819bc19"/></dir><dir name="etc"><file name="adminhtml.xml" hash="23ea2e499eb2e9e3b92fb87999d06331"/><file name="config.xml" hash="9f163f302ee696b88a9fe98c48468c4f"/><file name="system.xml" hash="5bb9f7ce67bebdfa9243c8bae2c2d1ed"/></dir><dir name="templates"><file name="vepixel.phtml" hash="e972ba05a7fc6267ae3c0e34a8a5274c"/><file name="vetag.phtml" hash="f31a9c96f62bad694b40c621bfa3a950"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="VeInteractive_VePlatform.xml" hash="fbe1d8209404d5b7d916a380a08b5f3a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="veplatform"><dir name="default"><dir name="template"><dir name="systemconfig"><dir name="veplatform_options_settings"><dir name="formfieldset"><file name="footer.phtml" hash="ab72eeaf4a01bec6e5143aee9da9f655"/><file name="header.phtml" hash="038c2e479ea7be12535cc3182e81650a"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="veplatform"><dir name="default"><dir name="fonts"><file name="DINComp-Bold.ttf" hash="29a99a27fa48933c02cc47676e19ad1a"/><file name="DINComp-Light.ttf" hash="82bda6ffd6917610e787bdeaeddd811c"/><file name="DINComp-Medium.ttf" hash="03c28b69f3c99ca8fd4c011eb33cc22b"/><file name="DINComp.ttf" hash="3f1179a02f4ce1c3da780cae8fc8149d"/><file name="DINWeb-Bold.eot" hash="5f30c5806b6b26bcc46448a5ddca9b67"/><file name="DINWeb-Bold.woff" hash="a407b2546aeedeade21e31296945085e"/><file name="DINWeb-Light.eot" hash="03b09f3707b0faa147d0ef1e6e710904"/><file name="DINWeb-Light.woff" hash="6e72d4655039f1c33e2530f2340e0657"/><file name="DINWeb-Medium.eot" hash="c178e7c174e95ff9c95361395b9d325b"/><file name="DINWeb-Medium.woff" hash="08cf2c3f11f091aac767e788332bd1f4"/><file name="DINWeb.eot" hash="8daf4116fe83c7fa36454950832563e0"/><file name="DINWeb.woff" hash="f8df07a0857003759a5798eecfbd9324"/></dir><dir name="images"><file name="account-manager-logo.png" hash="856fd84bfca6dce479cb97602ac8573c"/><file name="apps-logo.png" hash="9007fd834d71f69a5d444189679f6bb4"/><file name="creatives-logo.png" hash="758e390ef9f209610916c514a15d4432"/><file name="header_banner.jpg" hash="cded95d37c171c69d4a384f092cf9a0f"/><dir name="icons"><file name="envelope.png" hash="49484f1364fd34e900f8edffaffa4100"/><file name="phone.png" hash="deb42024869831e863ece1a4ab8e1786"/><file name="pike.png" hash="0bba667c071b9bfbb51ceae09d4c9f3d"/></dir><file name="icons-sdb320c34e8.png" hash="8bb70bdb0631bbc5196b60f20c82350e"/><file name="icons.png" hash="8bb70bdb0631bbc5196b60f20c82350e"/><file name="main-logo.png" hash="9d326ad238477552f68833976eb75811"/><file name="product_selected.png" hash="bd1b368cc613df4808565d41dbb3b480"/><file name="radio_selected.png" hash="b257ac6f184cff8903285f9d6d9738d3"/><file name="radio_unselected.png" hash="bf02541872bfa223f2aeeb55b5cbd557"/><file name="ve-check.png" hash="c0a278358d23463819608a59f5657a5f"/><file name="veads-logo-big.png" hash="e7bcebb044ec61c555830aef25dbac9b"/><file name="veads-logo-min.png" hash="792ba1356919f972b42857175ee1079d"/><file name="veads-logo.png" hash="55f7a097f013a6dd38a23286d5782f3f"/><file name="veassist-logo-big.png" hash="5d957fc9674f2151ad2be6b48c5937a6"/><file name="veassist-logo-min.png" hash="3c67b79d6e74830f08344cd91889efca"/><file name="veassist-logo.png" hash="39d4a4f518f901211034ac0ab5509bcc"/><file name="vechat-logo-big.png" hash="8dc2a6d299f18480e979ef2b89a3182a"/><file name="vechat-logo-min.png" hash="476449006c5ca3f29302150ae24ccbc4"/><file name="vechat-logo.png" hash="57b5ff82ffc152379353207450b82c3f"/><file name="vecontact-logo-big.png" hash="0357256f6b6d431fd7d362194e05f573"/><file name="vecontact-logo-min.png" hash="6778f334408c71f96f76263657eb2972"/><file name="vecontact-logo.png" hash="ce76319d0fdce22b7170a261f30ca473"/></dir></dir></dir></dir></target></contents>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  <compatible/>
26
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
27
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>VeInteractive_VePlatform</name>
4
+ <version>16.3.5.0</version>
5
  <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>The only automated marketing solution to solve your abandonment &amp; conversion problems at every stage in the customer&#x2019;s journey.</summary>
10
+ <description>We believe data can change the way people buy and sell online.&#xD;
11
+ &#xD;
12
+ We&#x2019;re leading this shift by developing intuitive onsite tools that are powered by big data.&#xD;
13
+ &#xD;
14
+ These tools:&#xD;
15
+ &#x2022; Make converting customers easier for small online businesses&#xD;
16
+ &#x2022; Improve the onsite customer experience&#xD;
17
+ &#x2022; Give the eCommerce manager control to run their own campaigns&#xD;
18
+ &#xD;
19
+ The Problem:&#xD;
20
+ The rise in website abandonment and cart abandonment means that businesses lose up to 70% of potential sales. &#xD;
21
+ &#xD;
22
+ Not only that, 3 out of 4 potential customers who place your products in their basket will then abandon.&#xD;
23
+ &#xD;
24
+ How does Ve solve this?&#xD;
25
+ &#x2022; Engages with users who are about to leave the site&#xD;
26
+ &#x2022; Retargets lost customers and bringing them back to your site&#xD;
27
+ &#x2022; Increases your website&#x2019;s revenue&#xD;
28
+ &#x2022; Improves your customer&#x2019;s experience onsite&#xD;
29
+ &#xD;
30
+ Benefits of Ve:&#xD;
31
+ &#xD;
32
+ &#x2022; Turn passive visitors into customers &#x2013; engage with visitors on your site and once they&#x2019;ve left&#xD;
33
+ &#x2022; Easy to use &#x2013; simple setup, maintenance and transparent pricing model (pay on performance &#x2013; you only pay when customers convert)&#xD;
34
+ &#x2022; Data-driven solutions &#x2013; our insights into customer behaviour help us deliver the right message at the right time&#xD;
35
+ &#x2022; Centralised brand management &amp; customisable campaigns &#x2013; upload your logo and font for brand consistency, change copy &amp; messaging to suit the campaign.&#xD;
36
+ &#x2022; Will grow with your business &#x2013; take advantage of enhanced and new features as your business grows&#xD;
37
+ &#x2022; Comprehensive FAQs &#x2013; take advantage of our expertise with best practice guides and helpful tips&#xD;
38
+ &#xD;
39
+ How to get started in 3 simple steps:&#xD;
40
+ &#xD;
41
+ 1. Download our module and then follow our easy online tutorial to add a small piece of javascript (JS) to your website.&#xD;
42
+ &#xD;
43
+ 2. Set up an account to access our optimisation and reporting platform. Follow the steps to create your first campaign and map your website (sounds a lot more complicated than it is&#x2026;)&#xD;
44
+ &#xD;
45
+ 3. You go live!&#xD;
46
+ &#xD;
47
+ Change your LinkedIn job title to &#x201C;Performance Marketeer&#x201D;, sit back and watch the money roll in.&#xD;
48
+ &#xD;
49
+ Pricing:&#xD;
50
+ &#xD;
51
+ &#x2022; Ve&#x2019;s re-engagement solutions are currently on a CPA basis (you pay a % of the sales Ve generates for you)&#xD;
52
+ &#xD;
53
+ &#x2022; Our display advertising solution is currently on a CPA and CPM basis, priced to suit your goals &#x2013; please contact us for more information: hello@veinteractive.com &#xD;
54
+ &#xD;
55
+ Download Ve, and you&#x2019;ll join 10,000+ happy clients internationally, some of them you may have heard of Barclays Bank, Lloyds Bank, Audi, Microsoft, Topman, Argos, Karen Millen, Toys R Us, The Economist, Thomas Cook, Liverpool FC.</description>
56
+ <notes>Bug fixes and new features.</notes>
57
+ <authors><author><name>VeInteractive</name><user>VeInteractive</user><email>hello@veinteractive.com</email></author></authors>
58
+ <date>2016-09-27</date>
59
+ <time>13:43:59</time>
60
+ <contents><target name="magecommunity"><dir name="VeInteractive"><dir name="VePlatform"><dir name="Block"><file name="ConfigFieldset.php" hash="ca8c49039027f532b787992d08973749"/><file name="Template.php" hash="c91641171beb7f0576d945f089d5667f"/><file name="Vemaster.php" hash="520d28f59510e192733e69bc5b0125aa"/><file name="Vepixel.php" hash="bd42fc22c2d21f71974c4729011cac9a"/><file name="Vetag.php" hash="53014245b2bdb09351b8c3869a5320aa"/></dir><dir name="Helper"><file name="Data.php" hash="e971530adb9ac327391799b93f9a9b56"/></dir><dir name="Model"><file name="Data.php" hash="0cabc54944143ca17e5520052553d453"/></dir><dir name="Observer"><file name="AdminUserLoadAfter.php" hash="a8db9ab19c5edd3c581c3881ebde4151"/><file name="Layout.php" hash="a7c3c4fa1af23c9c899b639b308901ce"/><file name="ThanksPage.php" hash="24f1b51b1b5ad686bb1585cecef55471"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CustomController.php" hash="a750d73b628955ed505ce696c4022e6e"/></dir><file name="IndexController.php" hash="c4c54e305c24871224ca1c0dd2779fec"/></dir><dir name="etc"><file name="adminhtml.xml" hash="706c18254a6822f6fdd7c8c2d55b2d50"/><file name="config.xml" hash="41c76ea171997673fdf1f2d86432c93d"/><file name="system.xml" hash="427a47bb3b37f5cfa8b92a9cf02f0ce4"/></dir><dir name="templates"><file name="vemaster.phtml" hash="56f889fe6cb2d009f6ca5732a63bc1ae"/><file name="vepixel.phtml" hash="4f7d8b5c3edf4dd1bf78cced2a9d6bc2"/><file name="vetag.phtml" hash="7edd642a0215956d80ff16057b8343f7"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="VeInteractive_VePlatform.xml" hash="94e82b311d415d98a259398f63c9d58a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="veplatform"><dir name="default"><dir name="template"><dir name="systemconfig"><dir name="veplatform_options_settings"><dir name="formfieldset"><file name="footer.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="header.phtml" hash="3063d88d81a4294e8b49061a49730793"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="veplatform.xml" hash="40f43c3c9ea67c2858419dcc6c240289"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="veplatform"><dir name="default"><dir name="css"><file name="veplatform.php" hash="c8b3eba05bfd21caaa706c52b8b169b7"/></dir><dir name="fonts"><file name="DINComp-Bold.ttf" hash="29a99a27fa48933c02cc47676e19ad1a"/><file name="DINComp-Light.ttf" hash="82bda6ffd6917610e787bdeaeddd811c"/><file name="DINComp-Medium.ttf" hash="03c28b69f3c99ca8fd4c011eb33cc22b"/><file name="DINComp.ttf" hash="3f1179a02f4ce1c3da780cae8fc8149d"/><file name="DINWeb-Bold.eot" hash="5f30c5806b6b26bcc46448a5ddca9b67"/><file name="DINWeb-Bold.woff" hash="a407b2546aeedeade21e31296945085e"/><file name="DINWeb-Light.eot" hash="03b09f3707b0faa147d0ef1e6e710904"/><file name="DINWeb-Light.woff" hash="6e72d4655039f1c33e2530f2340e0657"/><file name="DINWeb-Medium.eot" hash="c178e7c174e95ff9c95361395b9d325b"/><file name="DINWeb-Medium.woff" hash="08cf2c3f11f091aac767e788332bd1f4"/><file name="DINWeb.eot" hash="8daf4116fe83c7fa36454950832563e0"/><file name="DINWeb.woff" hash="f8df07a0857003759a5798eecfbd9324"/></dir><dir name="images"><file name="MagentoConnect.png" hash="d436b53de0a8e9b39d94d8f99dd8817b"/><file name="account-manager-logo.png" hash="856fd84bfca6dce479cb97602ac8573c"/><file name="apps-logo.png" hash="9007fd834d71f69a5d444189679f6bb4"/><file name="creatives-logo.png" hash="758e390ef9f209610916c514a15d4432"/><dir name="icons"><file name="envelope.png" hash="49484f1364fd34e900f8edffaffa4100"/><file name="phone.png" hash="deb42024869831e863ece1a4ab8e1786"/><file name="pike.png" hash="0bba667c071b9bfbb51ceae09d4c9f3d"/></dir><file name="icons-sdb320c34e8.png" hash="8bb70bdb0631bbc5196b60f20c82350e"/><file name="icons.png" hash="8bb70bdb0631bbc5196b60f20c82350e"/><file name="loading.gif" hash="29ffadf4420161e8213c5c582a6d4417"/><file name="main-logo.png" hash="9d326ad238477552f68833976eb75811"/><file name="product_selected.png" hash="bd1b368cc613df4808565d41dbb3b480"/><file name="radio_selected.png" hash="b257ac6f184cff8903285f9d6d9738d3"/><file name="radio_unselected.png" hash="bf02541872bfa223f2aeeb55b5cbd557"/><file name="ve-check.png" hash="c0a278358d23463819608a59f5657a5f"/><file name="ve-logo.png" hash="95abc640b662b4e163c011cb01692edc"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="veinteractive"><dir name="veplatform"><file name="veplatform.js" hash="c75ab5dcfce0fca27bd155b0ae6246f6"/></dir></dir></dir></dir></dir></dir></target></contents>
61
  <compatible/>
62
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>PDO</name><min/><max/></extension></required></dependencies>
63
  </package>
skin/adminhtml/veplatform/default/css/veplatform.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style>
2
+ @font-face {
3
+ font-family: DINWeb;
4
+ src: url(<?php echo $this->getMyFontsUrl('DINWeb.eot?'); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl('DINWeb.woff'); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl('DINComp.ttf'); ?>) format("truetype"); }
5
+ @font-face {
6
+ font-family: DINWeb-Medium;
7
+ src: url(<?php echo $this->getMyFontsUrl('DINWeb-Medium.eot?'); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl('DINWeb-Medium.woff'); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl('DINComp-Medium.ttf'); ?>) format("truetype"); }
8
+ @font-face {
9
+ font-family: DINWeb-Bold;
10
+ src: url(<?php echo $this->getMyFontsUrl('DINWeb-Bold.eot?'); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl('DINWeb-Bold.woff'); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl('DINComp-Bold.ttf'); ?>) format("truetype"); }
11
+ @font-face {
12
+ font-family: DINWeb-Light;
13
+ src: url(<?php echo $this->getMyFontsUrl('DINWeb-Light.eot?'); ?>) format("eot"), url(<?php echo $this->getMyFontsUrl('DINWeb-Light.woff'); ?>) format("woff"), url(<?php echo $this->getMyFontsUrl('DINComp-Light.ttf'); ?>) format("truetype"); }
14
+
15
+ #loadingGif {
16
+ width:150px;
17
+ height:150px;
18
+ position:fixed;
19
+ top:50%;
20
+ left:50%;
21
+ margin-top:-75px;
22
+ margin-left:-75px;
23
+ }
24
+ </style>
skin/adminhtml/veplatform/default/fonts/DINComp-Bold.ttf CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINComp-Light.ttf CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINComp-Medium.ttf CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINComp.ttf CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb-Bold.eot CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb-Bold.woff CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb-Light.eot CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb-Light.woff CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb-Medium.eot CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb-Medium.woff CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb.eot CHANGED
File without changes
skin/adminhtml/veplatform/default/fonts/DINWeb.woff CHANGED
File without changes
skin/adminhtml/veplatform/default/images/MagentoConnect.png ADDED
Binary file
skin/adminhtml/veplatform/default/images/account-manager-logo.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/apps-logo.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/creatives-logo.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/header_banner.jpg DELETED
Binary file
skin/adminhtml/veplatform/default/images/icons-sdb320c34e8.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/icons.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/icons/envelope.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/icons/phone.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/icons/pike.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/loading.gif ADDED
Binary file
skin/adminhtml/veplatform/default/images/main-logo.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/product_selected.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/radio_selected.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/radio_unselected.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/ve-check.png CHANGED
File without changes
skin/adminhtml/veplatform/default/images/ve-logo.png ADDED
Binary file
skin/adminhtml/veplatform/default/images/veads-logo-big.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/veads-logo-min.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/veads-logo.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/veassist-logo-big.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/veassist-logo-min.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/veassist-logo.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/vechat-logo-big.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/vechat-logo-min.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/vechat-logo.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/vecontact-logo-big.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/vecontact-logo-min.png DELETED
Binary file
skin/adminhtml/veplatform/default/images/vecontact-logo.png DELETED
Binary file
skin/frontend/base/default/js/veinteractive/veplatform/veplatform.js ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var mDataProcessor = mDataProcessor || {};
2
+
3
+ mDataProcessor = (function (window, document) {
4
+ 'use strict';
5
+
6
+ var addEvent = function(evnt, elem, func) {
7
+ if (elem.addEventListener) { // W3C compatibility
8
+ elem.addEventListener(evnt, func, false);
9
+ }
10
+ else if (elem.attachEvent) { // IE compatibility
11
+ elem.attachEvent("on" + evnt, func);
12
+ }
13
+ else { // No much to do
14
+ elem[ evnt ] = func;
15
+ }
16
+ };
17
+
18
+ /**
19
+ *
20
+ * @param {type} elems
21
+ * @param {string|array} types
22
+ * @param {type} classes
23
+ * @param {type} ids
24
+ * @returns {Array}
25
+ */
26
+ var getElements = function(tag, expr) {
27
+ var responseElems = [];
28
+ var elems = [];
29
+ var pattern = new RegExp(expr);
30
+ tag.forEach(function (val) {
31
+ elems.push(document.getElementsByTagName(val));
32
+ });
33
+
34
+ for (var i = 0; i < elems.length; i++) {
35
+ for (var z = 0; z < elems[i].length; z++) {
36
+ if (pattern.test(elems[i][z].name)
37
+ || pattern.test(elems[i][z].className)
38
+ || pattern.test(elems[i][z].id)
39
+ || pattern.test(elems[i][z].type)) {
40
+ responseElems.push(elems[i][z]);
41
+ }
42
+ }
43
+ }
44
+
45
+ return responseElems;
46
+ };
47
+
48
+ var captureEmailsValues = function() {
49
+ var tag = ['input'];
50
+ var elems = getElements(tag, /text|mail/igm);
51
+
52
+ for (var i = 0; i < elems.length; i++) {
53
+ addEvent('keyup', elems[i], function (currentEvent) {
54
+ setNameEmail(this);
55
+ });
56
+ addEvent('click', elems[i], function (currentEvent) {
57
+ setNameEmail(this);
58
+ });
59
+ addEvent('blur', elems[i], function (currentEvent) {
60
+ setNameEmail(this);
61
+ });
62
+ }
63
+
64
+ for (var i = 0; i < elems.length; i++) {
65
+ setNameEmail(elems[i]);
66
+ }
67
+
68
+ };
69
+
70
+ var setNameEmail = function(a) {
71
+ if (typeof masterData !== 'undefined') {
72
+ if (checkEmailAdress(a.value)) {
73
+ masterData.user.email = a.value;
74
+ } else if ((a.value).trim().length > 0){
75
+ var fnameFieldNames = ['firstname', 'middlename', 'billing[firstname]', 'billing[middlename]'],
76
+ lnameFieldNames = ['lastname', 'billing[lastname]'];
77
+ if( fnameFieldNames.indexOf(a.name) != -1) {
78
+ if (a.name == 'firstname' || a.name == 'middlename') {
79
+ var fName = document.getElementsByName("firstname"),
80
+ mName = document.getElementsByName("middlename");
81
+ } else {
82
+ var fName = document.getElementsByName("billing[firstname]"),
83
+ mName = document.getElementsByName("billing[middlename]");
84
+ }
85
+ if (fName.length > 0) {
86
+ fName = fName[0].value;
87
+ }
88
+ if (mName.length > 0) {
89
+ mName = mName[0].value;
90
+ }
91
+
92
+ masterData.user.firstName = (fName + ' ' + mName).trim();
93
+ } else if(lnameFieldNames.indexOf(a.name) != -1) {
94
+ masterData.user.lastName = a.value.trim();
95
+ }
96
+ }
97
+ }
98
+ };
99
+
100
+ var checkEmailAdress = function(email) {
101
+ var pattern = new RegExp(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/);
102
+ return pattern.test(email);
103
+ };
104
+
105
+ /**
106
+ * In Magento 1.9 versions the $ was $j so in any ajax call we should check if VEjQuery is in there to use,
107
+ * instead other jQuery Objects.
108
+ *
109
+ * @param {type} step
110
+ * @returns {undefined}
111
+ */
112
+ var updateCart = function(step) {
113
+ step = step || 1;
114
+ if (step <= 5) {
115
+
116
+ var a = $j.ajax({
117
+ type: 'POST',
118
+ url: baseDir + 'masterdata/index/updateCart',
119
+ data: 'method=updateCart',
120
+ dataType: 'json',
121
+ success: function (data) {
122
+ if (masterData.cart.has_cart != 'false') {
123
+ var now = new Date(masterData.cart.date_upd);
124
+ var upd = new Date(data.date_upd);
125
+ if (now < upd) {
126
+ masterData.cart = data;
127
+
128
+ } else {
129
+ step++;
130
+ updateCart(step);
131
+ }
132
+ } else {
133
+ masterData.cart = data;
134
+
135
+ }
136
+ }
137
+ });
138
+ }
139
+ };
140
+
141
+
142
+ var captureCartUpdateButtons = function() {
143
+ if (typeof productAddToCartForm === "undefined" || !productAddToCartForm instanceof Object) {
144
+ var tag = ['button', 'a'];
145
+ var elems = getElements(tag, /submit|remove_link|cart/igm);
146
+
147
+ for (var i = 0; i < elems.length; i++) {
148
+ addEvent('click', elems[i], function (currentEvent) {
149
+ updateCart();
150
+ });
151
+ }
152
+
153
+ } else {
154
+
155
+ var oldUpdateCart = productAddToCartForm.submit;
156
+ productAddToCartForm.submit = function (button, url) {
157
+ oldUpdateCart(button, url);
158
+ updateCart();
159
+ };
160
+
161
+
162
+ }
163
+ };
164
+
165
+ return {
166
+ captureCartUpdateButtons: captureCartUpdateButtons,
167
+ captureEmailsValues: captureEmailsValues,
168
+ updateCart: updateCart
169
+ };
170
+
171
+ }(window, document));
172
+
173
+ window.onload = function (onloadEvent) {
174
+
175
+ mDataProcessor.captureEmailsValues();
176
+ mDataProcessor.captureCartUpdateButtons();
177
+ };