Numerno_Visilabs - Version 1.0.0

Version Notes

Version 1.0.0
* Initial relase

Build Date: 2015-12-21

Download this release

Release Info

Developer Numerno
Extension Numerno_Visilabs
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (29) hide show
  1. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/BasketCEP.php +140 -0
  2. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Cart.php +140 -0
  3. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Customer.php +140 -0
  4. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Order.php +140 -0
  5. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Product.php +140 -0
  6. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/CountOut.php +67 -0
  7. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/CustomerAttributes.php +110 -0
  8. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/OrderAttributes.php +102 -0
  9. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/QuoteAttributes.php +102 -0
  10. app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/VisibleProductAttributes.php +97 -0
  11. app/code/local/Numerno/Visilabs/Block/Global.php +70 -0
  12. app/code/local/Numerno/Visilabs/Block/Tagging.php +70 -0
  13. app/code/local/Numerno/Visilabs/Helper/Data.php +55 -0
  14. app/code/local/Numerno/Visilabs/Model/Observer.php +483 -0
  15. app/code/local/Numerno/Visilabs/Model/System/Config/Backend/Attributes.php +56 -0
  16. app/code/local/Numerno/Visilabs/Model/System/Config/Backend/Cache.php +55 -0
  17. app/code/local/Numerno/Visilabs/Model/System/Config/Source/Attribute.php +61 -0
  18. app/code/local/Numerno/Visilabs/Model/System/Config/Source/Cid.php +55 -0
  19. app/code/local/Numerno/Visilabs/etc/adminhtml.xml +52 -0
  20. app/code/local/Numerno/Visilabs/etc/config.xml +189 -0
  21. app/code/local/Numerno/Visilabs/etc/system.xml +260 -0
  22. app/design/frontend/base/default/layout/visilabs.xml +40 -0
  23. app/design/frontend/base/default/template/visilabs/global.phtml +46 -0
  24. app/design/frontend/base/default/template/visilabs/tagging.phtml +48 -0
  25. app/etc/modules/Numerno_Visilabs.xml +38 -0
  26. app/locale/en_US/Numerno_Visilabs.csv +37 -0
  27. app/locale/tr_TR/Numerno_Visilabs.csv +37 -0
  28. package.xml +21 -0
  29. skin/adminhtml/default/default/images/visilabs/visilabs_logo.png +0 -0
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/BasketCEP.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Catalog Attributes Form Field
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_BasketCEP
38
+ extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
39
+ {
40
+ /**
41
+ * Attribute renderer cache
42
+ */
43
+ protected $_attributeRenderer;
44
+
45
+ /**
46
+ * Parameter no renderer cache
47
+ */
48
+ protected $_noRenderer;
49
+
50
+ /**
51
+ * Retrieve attribute renderer
52
+ */
53
+ protected function _getAttributeRenderer()
54
+ {
55
+ if (!$this->_attributeRenderer) {
56
+ $this->_attributeRenderer = $this->getLayout()->createBlock(
57
+ 'visilabs/adminhtml_system_config_form_field_renderer_quoteAttributes', '',
58
+ array('is_render_to_js_template' => true)
59
+ );
60
+ $this->_attributeRenderer->setClass('attribute_select');
61
+ $this->_attributeRenderer->setExtraParams('style="width:200px"');
62
+ }
63
+ return $this->_attributeRenderer;
64
+ }
65
+
66
+ /**
67
+ * Retrieve attribute renderer
68
+ */
69
+ protected function _getNoRenderer()
70
+ {
71
+ if (!$this->_noRenderer) {
72
+ $this->_noRenderer = $this->getLayout()->createBlock(
73
+ 'visilabs/adminhtml_system_config_form_field_renderer_countOut', '',
74
+ array('is_render_to_js_template' => true)
75
+ );
76
+ $this->_noRenderer->setClass('attribute_select');
77
+ $this->_noRenderer->setExtraParams('style="width:100px"');
78
+ }
79
+ return $this->_noRenderer;
80
+ }
81
+
82
+ /**
83
+ * Prepare to render
84
+ */
85
+ protected function _prepareToRender()
86
+ {
87
+ $this->addColumn('param', array(
88
+ 'label' => Mage::helper('visilabs')->__('Parameter'),
89
+ 'renderer' => $this->_getNoRenderer()
90
+ ));
91
+ $this->addColumn('attribute', array(
92
+ 'label' => Mage::helper('visilabs')->__('Cart Attribute'),
93
+ 'renderer' => $this->_getAttributeRenderer()
94
+ ));
95
+
96
+ $this->_addAfter = false;
97
+ $this->_addButtonLabel = Mage::helper('visilabs')->__('Add Parameter');
98
+ }
99
+
100
+ /**
101
+ * Prepare existing row data object
102
+ *
103
+ * @param Varien_Object
104
+ */
105
+ protected function _prepareArrayRow(Varien_Object $row)
106
+ {
107
+ $row->setData(
108
+ 'option_extra_attr_' . $this->_getAttributeRenderer()->calcOptionHash($row->getData('attribute')),
109
+ 'selected="selected"'
110
+ );
111
+ $row->setData(
112
+ 'option_extra_attr_' . $this->_getNoRenderer()->calcOptionHash($row->getData('param')),
113
+ 'selected="selected"'
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Render cell template
119
+ *
120
+ * @param string
121
+ */
122
+ protected function _renderCellTemplate($columnName)
123
+ {
124
+ if (empty($this->_columns[$columnName])) {
125
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong column name specified.'));
126
+ }
127
+ $column = $this->_columns[$columnName];
128
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
129
+
130
+ if ($column['renderer']) {
131
+ return $column['renderer']->setInputName($inputName)->setColumnName($columnName)->setColumn($column)
132
+ ->toHtml();
133
+ }
134
+
135
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
136
+ ($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
137
+ (isset($column['class']) ? $column['class'] : 'input-text') . '"'.
138
+ (isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
139
+ }
140
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Cart.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Catalog Attributes Form Field
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Cart
38
+ extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
39
+ {
40
+ /**
41
+ * Attribute renderer cache
42
+ */
43
+ protected $_attributeRenderer;
44
+
45
+ /**
46
+ * Parameter no renderer cache
47
+ */
48
+ protected $_noRenderer;
49
+
50
+ /**
51
+ * Retrieve attribute renderer
52
+ */
53
+ protected function _getAttributeRenderer()
54
+ {
55
+ if (!$this->_attributeRenderer) {
56
+ $this->_attributeRenderer = $this->getLayout()->createBlock(
57
+ 'visilabs/adminhtml_system_config_form_field_renderer_quoteAttributes', '',
58
+ array('is_render_to_js_template' => true)
59
+ );
60
+ $this->_attributeRenderer->setClass('attribute_select');
61
+ $this->_attributeRenderer->setExtraParams('style="width:200px"');
62
+ }
63
+ return $this->_attributeRenderer;
64
+ }
65
+
66
+ /**
67
+ * Retrieve attribute renderer
68
+ */
69
+ protected function _getNoRenderer()
70
+ {
71
+ if (!$this->_noRenderer) {
72
+ $this->_noRenderer = $this->getLayout()->createBlock(
73
+ 'visilabs/adminhtml_system_config_form_field_renderer_countOut', '',
74
+ array('is_render_to_js_template' => true)
75
+ );
76
+ $this->_noRenderer->setClass('attribute_select');
77
+ $this->_noRenderer->setExtraParams('style="width:100px"');
78
+ }
79
+ return $this->_noRenderer;
80
+ }
81
+
82
+ /**
83
+ * Prepare to render
84
+ */
85
+ protected function _prepareToRender()
86
+ {
87
+ $this->addColumn('param', array(
88
+ 'label' => Mage::helper('visilabs')->__('Parameter'),
89
+ 'renderer' => $this->_getNoRenderer()
90
+ ));
91
+ $this->addColumn('attribute', array(
92
+ 'label' => Mage::helper('visilabs')->__('Cart Attribute'),
93
+ 'renderer' => $this->_getAttributeRenderer()
94
+ ));
95
+
96
+ $this->_addAfter = false;
97
+ $this->_addButtonLabel = Mage::helper('visilabs')->__('Add Parameter');
98
+ }
99
+
100
+ /**
101
+ * Prepare existing row data object
102
+ *
103
+ * @param Varien_Object
104
+ */
105
+ protected function _prepareArrayRow(Varien_Object $row)
106
+ {
107
+ $row->setData(
108
+ 'option_extra_attr_' . $this->_getAttributeRenderer()->calcOptionHash($row->getData('attribute')),
109
+ 'selected="selected"'
110
+ );
111
+ $row->setData(
112
+ 'option_extra_attr_' . $this->_getNoRenderer()->calcOptionHash($row->getData('param')),
113
+ 'selected="selected"'
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Render cell template
119
+ *
120
+ * @param string
121
+ */
122
+ protected function _renderCellTemplate($columnName)
123
+ {
124
+ if (empty($this->_columns[$columnName])) {
125
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong column name specified.'));
126
+ }
127
+ $column = $this->_columns[$columnName];
128
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
129
+
130
+ if ($column['renderer']) {
131
+ return $column['renderer']->setInputName($inputName)->setColumnName($columnName)->setColumn($column)
132
+ ->toHtml();
133
+ }
134
+
135
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
136
+ ($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
137
+ (isset($column['class']) ? $column['class'] : 'input-text') . '"'.
138
+ (isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
139
+ }
140
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Customer.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Customer Attributes Form Field
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Customer
38
+ extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
39
+ {
40
+ /**
41
+ * Attribute renderer cache
42
+ */
43
+ protected $_attributeRenderer;
44
+
45
+ /**
46
+ * Parameter no renderer cache
47
+ */
48
+ protected $_noRenderer;
49
+
50
+ /**
51
+ * Retrieve attribute renderer
52
+ */
53
+ protected function _getAttributeRenderer()
54
+ {
55
+ if (!$this->_attributeRenderer) {
56
+ $this->_attributeRenderer = $this->getLayout()->createBlock(
57
+ 'visilabs/adminhtml_system_config_form_field_renderer_customerAttributes', '',
58
+ array('is_render_to_js_template' => true)
59
+ );
60
+ $this->_attributeRenderer->setClass('attribute_select');
61
+ $this->_attributeRenderer->setExtraParams('style="width:200px"');
62
+ }
63
+ return $this->_attributeRenderer;
64
+ }
65
+
66
+ /**
67
+ * Retrieve attribute renderer
68
+ */
69
+ protected function _getNoRenderer()
70
+ {
71
+ if (!$this->_noRenderer) {
72
+ $this->_noRenderer = $this->getLayout()->createBlock(
73
+ 'visilabs/adminhtml_system_config_form_field_renderer_countOut', '',
74
+ array('is_render_to_js_template' => true)
75
+ );
76
+ $this->_noRenderer->setClass('attribute_select');
77
+ $this->_noRenderer->setExtraParams('style="width:100px"');
78
+ }
79
+ return $this->_noRenderer;
80
+ }
81
+
82
+ /**
83
+ * Prepare to render
84
+ */
85
+ protected function _prepareToRender()
86
+ {
87
+ $this->addColumn('param', array(
88
+ 'label' => Mage::helper('visilabs')->__('Parameter'),
89
+ 'renderer' => $this->_getNoRenderer()
90
+ ));
91
+ $this->addColumn('attribute', array(
92
+ 'label' => Mage::helper('visilabs')->__('Customer Attribute'),
93
+ 'renderer' => $this->_getAttributeRenderer()
94
+ ));
95
+
96
+ $this->_addAfter = false;
97
+ $this->_addButtonLabel = Mage::helper('visilabs')->__('Add Parameter');
98
+ }
99
+
100
+ /**
101
+ * Prepare existing row data object
102
+ *
103
+ * @param Varien_Object
104
+ */
105
+ protected function _prepareArrayRow(Varien_Object $row)
106
+ {
107
+ $row->setData(
108
+ 'option_extra_attr_' . $this->_getAttributeRenderer()->calcOptionHash($row->getData('attribute')),
109
+ 'selected="selected"'
110
+ );
111
+ $row->setData(
112
+ 'option_extra_attr_' . $this->_getNoRenderer()->calcOptionHash($row->getData('param')),
113
+ 'selected="selected"'
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Render cell template
119
+ *
120
+ * @param string
121
+ */
122
+ protected function _renderCellTemplate($columnName)
123
+ {
124
+ if (empty($this->_columns[$columnName])) {
125
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong column name specified.'));
126
+ }
127
+ $column = $this->_columns[$columnName];
128
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
129
+
130
+ if ($column['renderer']) {
131
+ return $column['renderer']->setInputName($inputName)->setColumnName($columnName)->setColumn($column)
132
+ ->toHtml();
133
+ }
134
+
135
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
136
+ ($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
137
+ (isset($column['class']) ? $column['class'] : 'input-text') . '"'.
138
+ (isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
139
+ }
140
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Order.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Catalog Attributes Form Field
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Order
38
+ extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
39
+ {
40
+ /**
41
+ * Attribute renderer cache
42
+ */
43
+ protected $_attributeRenderer;
44
+
45
+ /**
46
+ * Parameter no renderer cache
47
+ */
48
+ protected $_noRenderer;
49
+
50
+ /**
51
+ * Retrieve attribute renderer
52
+ */
53
+ protected function _getAttributeRenderer()
54
+ {
55
+ if (!$this->_attributeRenderer) {
56
+ $this->_attributeRenderer = $this->getLayout()->createBlock(
57
+ 'visilabs/adminhtml_system_config_form_field_renderer_orderAttributes', '',
58
+ array('is_render_to_js_template' => true)
59
+ );
60
+ $this->_attributeRenderer->setClass('attribute_select');
61
+ $this->_attributeRenderer->setExtraParams('style="width:200px"');
62
+ }
63
+ return $this->_attributeRenderer;
64
+ }
65
+
66
+ /**
67
+ * Retrieve attribute renderer
68
+ */
69
+ protected function _getNoRenderer()
70
+ {
71
+ if (!$this->_noRenderer) {
72
+ $this->_noRenderer = $this->getLayout()->createBlock(
73
+ 'visilabs/adminhtml_system_config_form_field_renderer_countOut', '',
74
+ array('is_render_to_js_template' => true)
75
+ );
76
+ $this->_noRenderer->setClass('attribute_select');
77
+ $this->_noRenderer->setExtraParams('style="width:100px"');
78
+ }
79
+ return $this->_noRenderer;
80
+ }
81
+
82
+ /**
83
+ * Prepare to render
84
+ */
85
+ protected function _prepareToRender()
86
+ {
87
+ $this->addColumn('param', array(
88
+ 'label' => Mage::helper('visilabs')->__('Parameter'),
89
+ 'renderer' => $this->_getNoRenderer()
90
+ ));
91
+ $this->addColumn('attribute', array(
92
+ 'label' => Mage::helper('visilabs')->__('Order Attribute'),
93
+ 'renderer' => $this->_getAttributeRenderer()
94
+ ));
95
+
96
+ $this->_addAfter = false;
97
+ $this->_addButtonLabel = Mage::helper('visilabs')->__('Add Parameter');
98
+ }
99
+
100
+ /**
101
+ * Prepare existing row data object
102
+ *
103
+ * @param Varien_Object
104
+ */
105
+ protected function _prepareArrayRow(Varien_Object $row)
106
+ {
107
+ $row->setData(
108
+ 'option_extra_attr_' . $this->_getAttributeRenderer()->calcOptionHash($row->getData('attribute')),
109
+ 'selected="selected"'
110
+ );
111
+ $row->setData(
112
+ 'option_extra_attr_' . $this->_getNoRenderer()->calcOptionHash($row->getData('param')),
113
+ 'selected="selected"'
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Render cell template
119
+ *
120
+ * @param string
121
+ */
122
+ protected function _renderCellTemplate($columnName)
123
+ {
124
+ if (empty($this->_columns[$columnName])) {
125
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong column name specified.'));
126
+ }
127
+ $column = $this->_columns[$columnName];
128
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
129
+
130
+ if ($column['renderer']) {
131
+ return $column['renderer']->setInputName($inputName)->setColumnName($columnName)->setColumn($column)
132
+ ->toHtml();
133
+ }
134
+
135
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
136
+ ($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
137
+ (isset($column['class']) ? $column['class'] : 'input-text') . '"'.
138
+ (isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
139
+ }
140
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Product.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Catalog Attributes Form Field
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Product
38
+ extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
39
+ {
40
+ /**
41
+ * Attribute renderer cache
42
+ */
43
+ protected $_attributeRenderer;
44
+
45
+ /**
46
+ * Parameter no renderer cache
47
+ */
48
+ protected $_noRenderer;
49
+
50
+ /**
51
+ * Retrieve attribute renderer
52
+ */
53
+ protected function _getAttributeRenderer()
54
+ {
55
+ if (!$this->_attributeRenderer) {
56
+ $this->_attributeRenderer = $this->getLayout()->createBlock(
57
+ 'visilabs/adminhtml_system_config_form_field_renderer_visibleProductAttributes', '',
58
+ array('is_render_to_js_template' => true)
59
+ );
60
+ $this->_attributeRenderer->setClass('attribute_select');
61
+ $this->_attributeRenderer->setExtraParams('style="width:200px"');
62
+ }
63
+ return $this->_attributeRenderer;
64
+ }
65
+
66
+ /**
67
+ * Retrieve attribute renderer
68
+ */
69
+ protected function _getNoRenderer()
70
+ {
71
+ if (!$this->_noRenderer) {
72
+ $this->_noRenderer = $this->getLayout()->createBlock(
73
+ 'visilabs/adminhtml_system_config_form_field_renderer_countOut', '',
74
+ array('is_render_to_js_template' => true)
75
+ );
76
+ $this->_noRenderer->setClass('attribute_select');
77
+ $this->_noRenderer->setExtraParams('style="width:100px"');
78
+ }
79
+ return $this->_noRenderer;
80
+ }
81
+
82
+ /**
83
+ * Prepare to render
84
+ */
85
+ protected function _prepareToRender()
86
+ {
87
+ $this->addColumn('param', array(
88
+ 'label' => Mage::helper('visilabs')->__('Parameter'),
89
+ 'renderer' => $this->_getNoRenderer()
90
+ ));
91
+ $this->addColumn('attribute', array(
92
+ 'label' => Mage::helper('visilabs')->__('Product Attribute'),
93
+ 'renderer' => $this->_getAttributeRenderer()
94
+ ));
95
+
96
+ $this->_addAfter = false;
97
+ $this->_addButtonLabel = Mage::helper('visilabs')->__('Add Parameter');
98
+ }
99
+
100
+ /**
101
+ * Prepare existing row data object
102
+ *
103
+ * @param Varien_Object
104
+ */
105
+ protected function _prepareArrayRow(Varien_Object $row)
106
+ {
107
+ $row->setData(
108
+ 'option_extra_attr_' . $this->_getAttributeRenderer()->calcOptionHash($row->getData('attribute')),
109
+ 'selected="selected"'
110
+ );
111
+ $row->setData(
112
+ 'option_extra_attr_' . $this->_getNoRenderer()->calcOptionHash($row->getData('param')),
113
+ 'selected="selected"'
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Render cell template
119
+ *
120
+ * @param string
121
+ */
122
+ protected function _renderCellTemplate($columnName)
123
+ {
124
+ if (empty($this->_columns[$columnName])) {
125
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong column name specified.'));
126
+ }
127
+ $column = $this->_columns[$columnName];
128
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
129
+
130
+ if ($column['renderer']) {
131
+ return $column['renderer']->setInputName($inputName)->setColumnName($columnName)->setColumn($column)
132
+ ->toHtml();
133
+ }
134
+
135
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
136
+ ($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
137
+ (isset($column['class']) ? $column['class'] : 'input-text') . '"'.
138
+ (isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
139
+ }
140
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/CountOut.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Catalog Incremental Form Field Renderer
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Euromsg
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Renderer_CountOut
38
+ extends Mage_Core_Block_Html_Select
39
+ {
40
+
41
+ /**
42
+ * Set form element input name
43
+ *
44
+ * @param string $value
45
+ * @return string
46
+ */
47
+ public function setInputName($value)
48
+ {
49
+ return $this->setName($value);
50
+ }
51
+
52
+ /**
53
+ * Render block HTML
54
+ *
55
+ * @return string
56
+ */
57
+ public function _toHtml()
58
+ {
59
+ if (!$this->getOptions()) {
60
+ for ($i = 1; $i <= 10; $i++) {
61
+ $this->addOption($i, "OM.cep$i");
62
+ }
63
+ }
64
+
65
+ return parent::_toHtml();
66
+ }
67
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/CustomerAttributes.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Customer Attribute Form Field Renderer
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Euromsg
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Renderer_CustomerAttributes
38
+ extends Mage_Core_Block_Html_Select
39
+ {
40
+ /**
41
+ * Attributes cache
42
+ *
43
+ * @var array
44
+ */
45
+ private $_attributes;
46
+
47
+ /**
48
+ * Retrieve allowed attributes
49
+ *
50
+ * @param int $storeId
51
+ * @return array
52
+ *
53
+ */
54
+ protected function _getAttributes()
55
+ {
56
+ if (is_null($this->_attributes)) {
57
+
58
+ $this->_attributes = array(
59
+ 'entity_id' => Mage::helper('visilabs')->__('Customer ID (entity_id)'),
60
+ '_group' => Mage::helper('visilabs')->__('Group Name')
61
+ );
62
+
63
+ $attributes = Mage::getModel('eav/entity_attribute')
64
+ ->getCollection()
65
+ ->setEntityTypeFilter(Mage::getSingleton('eav/config')->getEntityType('customer'))
66
+ ->addFieldToFilter(
67
+ 'attribute_code',
68
+ array('nin' => array('password_hash', 'default_billing', 'default_shipping', 'confirmation', 'rp_token', 'rp_token_created_at', 'disable_auto_group_change', 'reward_update_notification', 'reward_warning_notification', 'dob', 'email', 'firstname', 'lastname', 'gender'))
69
+ );
70
+
71
+ foreach ($attributes as $attribute) {
72
+ $this->_attributes[$attribute->getAttributeCode()] = $attribute->getFrontendLabel() . ' ('
73
+ . $attribute->getAttributeCode() . ')';
74
+ }
75
+
76
+ $attributes = $this->_attributes;
77
+ asort($attributes);
78
+ $this->_attributes = $attributes;
79
+ }
80
+
81
+ return $this->_attributes;
82
+ }
83
+
84
+ /**
85
+ * Set form element input name
86
+ *
87
+ * @param string $value
88
+ * @return string
89
+ */
90
+ public function setInputName($value)
91
+ {
92
+ return $this->setName($value);
93
+ }
94
+
95
+ /**
96
+ * Render block HTML
97
+ *
98
+ * @return string
99
+ */
100
+ public function _toHtml()
101
+ {
102
+ if (!$this->getOptions()) {
103
+ foreach ($this->_getAttributes() as $id => $label) {
104
+ $this->addOption($id, $label);
105
+ }
106
+ }
107
+
108
+ return parent::_toHtml();
109
+ }
110
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/OrderAttributes.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Order Attribute Form Field Renderer
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Euromsg
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Renderer_OrderAttributes
38
+ extends Mage_Core_Block_Html_Select
39
+ {
40
+ /**
41
+ * Attributes cache
42
+ *
43
+ * @var array
44
+ */
45
+ private $_attributes;
46
+
47
+ /**
48
+ * Retrieve allowed attributes
49
+ *
50
+ * @param int $storeId
51
+ * @return array
52
+ *
53
+ */
54
+ protected function _getAttributes()
55
+ {
56
+ if (is_null($this->_attributes)) {
57
+
58
+ $resource = Mage::getSingleton('core/resource');
59
+ $connection = $resource->getConnection('read');
60
+ $config = $connection->getConfig();
61
+
62
+ $query = $connection->select()
63
+ ->from('information_schema.COLUMNS', array('COLUMNS.COLUMN_NAME', 'COLUMNS.COLUMN_COMMENT'))
64
+ ->where('COLUMNS.TABLE_SCHEMA = ?', $config['dbname'])
65
+ ->where('COLUMNS.TABLE_NAME = ?', $resource->getTableName('sales/order'));
66
+
67
+ $this->_attributes = $connection->fetchPairs($query);
68
+ }
69
+
70
+ return $this->_attributes;
71
+ }
72
+
73
+ /**
74
+ * Set form element input name
75
+ *
76
+ * @param string $value
77
+ * @return string
78
+ */
79
+ public function setInputName($value)
80
+ {
81
+ return $this->setName($value);
82
+ }
83
+
84
+ /**
85
+ * Render block HTML
86
+ *
87
+ * @return string
88
+ */
89
+ public function _toHtml()
90
+ {
91
+ if (!$this->getOptions()) {
92
+ foreach ($this->_getAttributes() as $columnName => $columnComment) {
93
+ if ($columnName == 'password_hash') {
94
+ continue;
95
+ }
96
+ $this->addOption($columnName, trim($columnComment . ' (' . $columnName . ')'));
97
+ }
98
+ }
99
+
100
+ return parent::_toHtml();
101
+ }
102
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/QuoteAttributes.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Quote Attribute Form Field Renderer
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Euromsg
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Renderer_QuoteAttributes
38
+ extends Mage_Core_Block_Html_Select
39
+ {
40
+ /**
41
+ * Attributes cache
42
+ *
43
+ * @var array
44
+ */
45
+ private $_attributes;
46
+
47
+ /**
48
+ * Retrieve allowed attributes
49
+ *
50
+ * @param int $storeId
51
+ * @return array
52
+ *
53
+ */
54
+ protected function _getAttributes()
55
+ {
56
+ if (is_null($this->_attributes)) {
57
+
58
+ $resource = Mage::getSingleton('core/resource');
59
+ $connection = $resource->getConnection('read');
60
+ $config = $connection->getConfig();
61
+
62
+ $query = $connection->select()
63
+ ->from('information_schema.COLUMNS', array('COLUMNS.COLUMN_NAME', 'COLUMNS.COLUMN_COMMENT'))
64
+ ->where('COLUMNS.TABLE_SCHEMA = ?', $config['dbname'])
65
+ ->where('COLUMNS.TABLE_NAME = ?', $resource->getTableName('sales/quote'));
66
+
67
+ $this->_attributes = $connection->fetchPairs($query);
68
+ }
69
+
70
+ return $this->_attributes;
71
+ }
72
+
73
+ /**
74
+ * Set form element input name
75
+ *
76
+ * @param string $value
77
+ * @return string
78
+ */
79
+ public function setInputName($value)
80
+ {
81
+ return $this->setName($value);
82
+ }
83
+
84
+ /**
85
+ * Render block HTML
86
+ *
87
+ * @return string
88
+ */
89
+ public function _toHtml()
90
+ {
91
+ if (!$this->getOptions()) {
92
+ foreach ($this->_getAttributes() as $columnName => $columnComment) {
93
+ if ($columnName == 'password_hash') {
94
+ continue;
95
+ }
96
+ $this->addOption($columnName, trim($columnComment . ' (' . $columnName . ')'));
97
+ }
98
+ }
99
+
100
+ return parent::_toHtml();
101
+ }
102
+ }
app/code/local/Numerno/Visilabs/Block/Adminhtml/System/Config/Form/Field/Renderer/VisibleProductAttributes.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Catalog Attribute Form Field Renderer
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Euromsg
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Adminhtml_System_Config_Form_Field_Renderer_VisibleProductAttributes
38
+ extends Mage_Core_Block_Html_Select
39
+ {
40
+ /**
41
+ * Attributes cache
42
+ *
43
+ * @var array
44
+ */
45
+ private $_attributes;
46
+
47
+ /**
48
+ * Retrieve allowed attributes
49
+ *
50
+ * @param int $storeId
51
+ * @return array
52
+ *
53
+ */
54
+ protected function _getAttributes()
55
+ {
56
+ if (is_null($this->_attributes)) {
57
+
58
+ $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
59
+ ->addVisibleFilter()
60
+ ->addFieldToFilter('main_table.is_user_defined', 1);
61
+
62
+ foreach ($attributes as $attribute) {
63
+ $this->_attributes[$attribute->getAttributeCode()] = $attribute->getFrontendLabel() . ' ('
64
+ . $attribute->getAttributeCode() . ')';
65
+ }
66
+ }
67
+
68
+ return $this->_attributes;
69
+ }
70
+
71
+ /**
72
+ * Set form element input name
73
+ *
74
+ * @param string $value
75
+ * @return string
76
+ */
77
+ public function setInputName($value)
78
+ {
79
+ return $this->setName($value);
80
+ }
81
+
82
+ /**
83
+ * Render block HTML
84
+ *
85
+ * @return string
86
+ */
87
+ public function _toHtml()
88
+ {
89
+ if (!$this->getOptions()) {
90
+ foreach ($this->_getAttributes() as $id => $label) {
91
+ $this->addOption($id, $label);
92
+ }
93
+ }
94
+
95
+ return parent::_toHtml();
96
+ }
97
+ }
app/code/local/Numerno/Visilabs/Block/Global.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Visilabs global script
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Global extends Mage_Core_Block_Template
38
+ {
39
+ const VISILABS_URL = 'vsh.visilabs.net';
40
+
41
+ /**
42
+ * Visilabs Site ID
43
+ *
44
+ * @return string
45
+ */
46
+ public function getSiteId()
47
+ {
48
+ return Mage::getStoreConfig('visilabs/general/sid');
49
+ }
50
+
51
+ /**
52
+ * Visilabs Organization Id
53
+ *
54
+ * @return string
55
+ */
56
+ public function getOrganizationId()
57
+ {
58
+ return Mage::getStoreConfig('visilabs/general/oid');
59
+ }
60
+
61
+ /**
62
+ * Visilabs URL
63
+ *
64
+ * @return string
65
+ */
66
+ public function getVisilabsUrl()
67
+ {
68
+ return self::VISILABS_URL;
69
+ }
70
+ }
app/code/local/Numerno/Visilabs/Block/Tagging.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Visilabs tags
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Block_Tagging extends Mage_Core_Block_Template
38
+ {
39
+ public function getParams()
40
+ {
41
+ $session = Mage::getSingleton('core/session', array("name" => "frontend"));
42
+ $toHtml = '';
43
+
44
+ if (Mage::getStoreConfigFlag("visilabs/general/use_suggest")) {
45
+
46
+ $channel = Mage::getStoreConfig("visilabs/general/channel");
47
+ if (!$channel) {
48
+ $channel = Mage::app()->getStore()->getCode();
49
+ }
50
+
51
+ $toHtml .= "VL.AddParameter('OM.vchannel','" . htmlspecialchars($channel) . "');\n";
52
+ }
53
+
54
+ if ($session->hasVisilabsParams() ) {
55
+ foreach ($session->getVisilabsParams() as $key => $value) {
56
+ $toHtml .= "VL.AddParameter('$key','" . htmlspecialchars($value) . "');\n";
57
+ }
58
+ $session->unsVisilabsParams();
59
+ }
60
+
61
+ return $toHtml;
62
+
63
+ }
64
+
65
+ public function canSuggestActions()
66
+ {
67
+ return Mage::getStoreConfigFlag("visilabs/general/use_suggest");
68
+
69
+ }
70
+ }
app/code/local/Numerno/Visilabs/Helper/Data.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Helper
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Helper_Data extends Mage_Core_Helper_Abstract
38
+ {
39
+ public function isTaggingEnabled($event = null)
40
+ {
41
+ if (!$this->isModuleOutputEnabled()) {
42
+ return false;
43
+ }
44
+
45
+ if (!Mage::getStoreConfigFlag('visilabs/general/enabled')) {
46
+ return false;
47
+ }
48
+
49
+ if (!is_null($event) && !Mage::getStoreConfigFlag("visilabs/$event/enabled")) {
50
+ return false;
51
+ }
52
+
53
+ return true;
54
+ }
55
+ }
app/code/local/Numerno/Visilabs/Model/Observer.php ADDED
@@ -0,0 +1,483 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Event observer
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Model_Observer
38
+ {
39
+ const VISILABS_CACHE_LIFETIME = 86400;
40
+ const VISILABS_CACHE_TAG = 'VISILABS';
41
+ const VISILABS_CACHE_PRODUCT_KEY = 'VISILABS_P';
42
+ const VISILABS_CACHE_CATEGORY_KEY = 'VISILABS_C';
43
+
44
+ /**
45
+ * Get customer identifier attribute
46
+ *
47
+ * @return string
48
+ */
49
+ private function _getCustomerIdentifier()
50
+ {
51
+ return Mage::getStoreConfig('visilabs/general/cid');
52
+ }
53
+
54
+ /**
55
+ * Prepare category hierarcy array
56
+ *
57
+ * @param Mage_Catalog_Model_Product $product
58
+ * @return array
59
+ */
60
+ private function _prepareCategoryHierarchy($product)
61
+ {
62
+
63
+ $categoryIds = $product->getCategoryIds();
64
+ if (empty($categoryIds)) {
65
+ return array();
66
+ }
67
+
68
+ $foundDeepestHierarchy = false;
69
+
70
+ while (!$foundDeepestHierarchy) {
71
+
72
+ //get deepest category by level
73
+ $category = Mage::getModel('catalog/category')
74
+ ->getCollection()
75
+ ->addAttributeToSelect(array('entity_id', 'path'))
76
+ ->addAttributeToFilter('is_active', 1)
77
+ ->addFieldToFilter('entity_id', array('in' => $categoryIds))
78
+ ->setOrder('level', 'DESC')
79
+ ->setPageSize(1)
80
+ ->setCurPage(1)
81
+ ->getFirstItem();
82
+
83
+ $pathIds = array_reverse(explode(',', $category->getPathInStore()));
84
+
85
+ $categories = Mage::getModel('catalog/category')
86
+ ->getCollection()
87
+ ->addAttributeToSelect('name')
88
+ ->addAttributeToFilter('is_active', 1)
89
+ ->addFieldToFilter('entity_id', array('in' => $pathIds));
90
+
91
+ $pathDiff = array_diff($pathIds, $categories->getAllIds());
92
+ if (!empty($pathDiff) ) { //there is a disabled category in hierarcy
93
+ $categoryIds = array_diff($categoryIds, array($category->getId()));
94
+ if(empty($categoryIds)) {
95
+ return array(); //there is no category of this product that has a hierarcy with all categories active
96
+ }
97
+ $foundDeepestHierarchy = false;
98
+ } else {
99
+ $foundDeepestHierarchy = true;
100
+ }
101
+ }
102
+
103
+ $hierarchy = array_flip($pathIds);
104
+ foreach ($categories as $category) {
105
+ $hierarchy[$category->getId()] = $category->getName();
106
+ }
107
+
108
+ return $hierarchy;
109
+ }
110
+
111
+ /**
112
+ * Prepare customer parameters
113
+ *
114
+ * @param Mage_Customer_Model_Customer $customer
115
+ * @return array
116
+ */
117
+ private function _prepareCustomerParams($customer, $eventType)
118
+ {
119
+ //get customer identifier
120
+ switch ($this->_getCustomerIdentifier()) {
121
+ case 'email':
122
+ $exVisitorId = $customer->getEmail();
123
+ break;
124
+ default:
125
+ $exVisitorId = $customer->getId();
126
+ }
127
+
128
+ //initial parameters
129
+ $params = array(
130
+ 'OM.exVisitorID' => $exVisitorId,
131
+ 'OM.vn' => $customer->getFirstname(),
132
+ 'OM.sn' => $customer->getLastname(),
133
+ 'OM.em' => $customer->getEmail(),
134
+ $eventType => $customer->getId(),
135
+ 'EventType' => $eventType
136
+ );
137
+
138
+ //location
139
+ $address = $customer->getPrimaryBillingAddress();
140
+ if ($address) {
141
+ $params['OM.loc'] = $address->getRegion();
142
+ }
143
+
144
+ //date of birth
145
+ if(Zend_Date::isDate($customer->getDob(), Zend_Date::ISO_8601)) {
146
+ $params['OM.bd'] = date("Y-m-d", strtotime($customer->getDob()));
147
+ }
148
+
149
+ //gender
150
+ $genders = array(1 => 'Male', 2 => 'Female'); //static labels in Visilabs
151
+ if($customer->getGender() && isset($genders[$customer->getGender()])){
152
+ $params['OM.gn'] = $genders[$customer->getGender()];
153
+ }
154
+
155
+ //custom event parameters
156
+ $customParams = unserialize(Mage::getStoreConfig('visilabs/general/cep'));
157
+ foreach ($customParams as $param) {
158
+
159
+ //get group name
160
+ if ($param['attribute'] == '_group') {
161
+ $groupName = Mage::getModel('customer/group')
162
+ ->load($customer->getGroupId())
163
+ ->getCustomerGroupCode();
164
+ $params['OM.cep' . $param['param']] = $groupName;
165
+ continue;
166
+ }
167
+
168
+ if (!$param['attribute'] || !$customer->getResource()->getAttribute($param['attribute'])) {
169
+ continue;
170
+ }
171
+ $params['OM.cep' . $param['param']] = $customer->getAttributeText($param['attribute']);
172
+ }
173
+
174
+ return $params;
175
+ }
176
+
177
+ /**
178
+ * Format price
179
+ *
180
+ * @param float $price
181
+ * @return string
182
+ */
183
+ private function _formatPrice($price)
184
+ {
185
+ return number_format($price, 2, ',', '');
186
+ }
187
+
188
+ /**
189
+ * Get visitor session
190
+ *
191
+ * @param array $params
192
+ * @return void
193
+ */
194
+ protected function getSession()
195
+ {
196
+ return Mage::getSingleton('core/session', array("name" => "frontend"));
197
+ }
198
+
199
+ /**
200
+ * Add visilabs params to visitor session
201
+ *
202
+ * @param array $params
203
+ * @return void
204
+ */
205
+ public function addVisilabsParams($params)
206
+ {
207
+ $session = $this->getSession();
208
+ if($session->hasVisilabsParams()) {
209
+ $params = array_merge($session->getVisilabsParams(), $params);
210
+ }
211
+ $session->setVisilabsParams($params);
212
+ }
213
+
214
+ /**
215
+ * Login Event
216
+ *
217
+ * @param Varien_Event_Observer $observer
218
+ * @return Numerno_Visilabs_Model_Observer
219
+ */
220
+ public function eventLogin(Varien_Event_Observer $observer)
221
+ {
222
+ if (!Mage::helper('visilabs')->isTaggingEnabled()) {
223
+ return $this;
224
+ }
225
+
226
+ $customer = $observer->getCustomer();
227
+ $params = $this->_prepareCustomerParams($customer, 'Login');
228
+
229
+ $this->addVisilabsParams($params);
230
+
231
+ return $this;
232
+ }
233
+
234
+ /**
235
+ * Signup Event
236
+ *
237
+ * @param Varien_Event_Observer $observer
238
+ * @return Numerno_Visilabs_Model_Observer
239
+ */
240
+ public function eventSignup(Varien_Event_Observer $observer)
241
+ {
242
+ if (!Mage::helper('visilabs')->isTaggingEnabled()) {
243
+ return $this;
244
+ }
245
+ $event = $observer->getEvent();
246
+ $customer = $event->getCustomer();
247
+
248
+ if (!$customer->isObjectNew()) { return $this; }
249
+
250
+ $params = $this->_prepareCustomerParams($customer, 'Signup');
251
+
252
+ $this->addVisilabsParams($params);
253
+
254
+ return $this;
255
+ }
256
+
257
+ /**
258
+ * Product View Event
259
+ *
260
+ * @param Varien_Event_Observer $observer
261
+ * @return Numerno_Visilabs_Model_Observer
262
+ */
263
+ public function eventProductView(Varien_Event_Observer $observer)
264
+ {
265
+ if (!Mage::helper('visilabs')->isTaggingEnabled('catalog')) {
266
+ return $this;
267
+ }
268
+
269
+ $event = $observer->getEvent();
270
+ $product = $event->getProduct();
271
+ $cache = Mage::app()->getCache();
272
+ $params = json_decode($cache->load(self::VISILABS_CACHE_PRODUCT_KEY . $product->getId()));
273
+
274
+ if (!$params) {
275
+
276
+ $categoryHierarcy = $this->_prepareCategoryHierarchy($product);
277
+
278
+ //initial parameters
279
+ $params = array(
280
+ 'OM.pv' => $product->getId(),
281
+ 'OM.pn' => $product->getName(),
282
+ 'OM.cat' => implode('|', array_keys($categoryHierarcy)),
283
+ 'OM.catn' => implode('|', $categoryHierarcy),
284
+ 'OM.inv' => $product->getStockItem()->getIsInStock(),
285
+ 'OM.ppr' => $this->_formatPrice($product->getFinalPrice())
286
+ );
287
+
288
+ //brand
289
+ $brandAttribute = Mage::getStoreConfig('visilabs/catalog/brand');
290
+ if ($brandAttribute && $product->getResource()->getAttribute($brandAttribute)) {
291
+ $params['OM.pv.1'] = $product->getAttributeText($brandAttribute);
292
+ }
293
+
294
+ //custom event parameters
295
+ $customParams = unserialize(Mage::getStoreConfig('visilabs/catalog/cep'));
296
+ foreach ($customParams as $param) {
297
+ if ($param['attribute'] && $product->getResource()->getAttribute($param['attribute'])) {
298
+ $params['OM.cep' . $param['param']] = $product->getAttributeText($param['attribute']);
299
+ }
300
+ }
301
+
302
+ $cache->save(
303
+ json_encode($params),
304
+ self::VISILABS_CACHE_PRODUCT_KEY . $product->getId(),
305
+ array(self::VISILABS_CACHE_TAG),
306
+ self::VISILABS_CACHE_LIFETIME
307
+ );
308
+ }
309
+
310
+ $this->addVisilabsParams($params);
311
+
312
+ return $this;
313
+ }
314
+
315
+ /**
316
+ * Refresh Product Cache
317
+ *
318
+ * @param Varien_Event_Observer $observer
319
+ * @return Numerno_Visilabs_Model_Observer
320
+ */
321
+ public function refreshProduct(Varien_Event_Observer $observer)
322
+ {
323
+ if (!Mage::helper('visilabs')->isTaggingEnabled('catalog')) {
324
+ return $this;
325
+ }
326
+
327
+ $event = $observer->getEvent();
328
+ $product = $event->getProduct();
329
+
330
+ if ($product->hasDataChanges()) {
331
+ Mage::app()->getCache()->remove(self::VISILABS_CACHE_PRODUCT_KEY . $product->getId());
332
+ }
333
+
334
+ return $this;
335
+ }
336
+
337
+ /**
338
+ * Category View Event
339
+ *
340
+ * @param Varien_Event_Observer $observer
341
+ * @return Numerno_Visilabs_Model_Observer
342
+ */
343
+ public function eventCategoryView(Varien_Event_Observer $observer)
344
+ {
345
+ if (!Mage::helper('visilabs')->isTaggingEnabled('catalog')) {
346
+ return $this;
347
+ }
348
+
349
+ $event = $observer->getEvent();
350
+ $category = $event->getCategory();
351
+ $params = array('OM.clist' => $category->getId());
352
+
353
+ $this->addVisilabsParams($params);
354
+
355
+ return $this;
356
+ }
357
+
358
+ /**
359
+ * Add to Cart Event
360
+ *
361
+ * @return Numerno_Visilabs_Model_Observer
362
+ */
363
+ public function eventBasket()
364
+ {
365
+ if (!Mage::helper('visilabs')->isTaggingEnabled('cart')) {
366
+ return $this;
367
+ }
368
+
369
+ $quote = Mage::getModel('checkout/cart')->getQuote();
370
+ $items = $quote->getAllVisibleItems();
371
+ $products = array();
372
+ $totals = array();
373
+ foreach ($items as $item) {
374
+ $pid = $item->getProductId();
375
+
376
+ if (isset($products[$pid])) {
377
+ $products[$pid] += $item->getQty();
378
+ $totals[$pid] += round($item->getRowTotalInclTax(), 2);
379
+ } else {
380
+ $products[$pid] = $item->getQty();
381
+ $totals[$pid] = round($item->getRowTotalInclTax(), 2);
382
+ }
383
+ }
384
+
385
+ $params = array(
386
+ 'OM.pbid' => $quote->getId(),
387
+ 'OM.pb' => implode(';', array_keys($products)),
388
+ 'OM.pu' => implode(';', $products),
389
+ 'OM.ppr' => str_ireplace('.', ',', implode(';', $totals))
390
+ );
391
+
392
+ //custom event parameters
393
+ $customParams = unserialize(Mage::getStoreConfig('visilabs/cart/cep'));
394
+ foreach ($customParams as $param) {
395
+ if ($param['attribute'] && $quote->hasData($param['attribute'])) {
396
+ $params['OM.cep' . $param['param']] = (string) $quote->getData($param['attribute']);
397
+ }
398
+ }
399
+
400
+ $this->addVisilabsParams($params);
401
+
402
+ return $this;
403
+ }
404
+
405
+ /**
406
+ * Purchase Event
407
+ *
408
+ * @param Varien_Event_Observer $observer
409
+ * @return Numerno_Visilabs_Model_Observer
410
+ */
411
+ public function eventPurchase(Varien_Event_Observer $observer)
412
+ {
413
+ if (!Mage::helper('visilabs')->isTaggingEnabled('order')) {
414
+ return $this;
415
+ }
416
+
417
+ $event = $observer->getEvent();
418
+ $order = $event->getOrder();
419
+ $items = $order->getAllVisibleItems();
420
+ $products = array();
421
+ $totals = array();
422
+
423
+ foreach ($items as $item) {
424
+ $pid = $item->getProductId();
425
+
426
+ if (isset($products[$pid])) {
427
+ $products[$pid] += $item->getQtyOrdered();
428
+ $totals[$pid] += round($item->getRowTotalInclTax(), 2);
429
+ } else {
430
+ $products[$pid] = $item->getQtyOrdered();
431
+ $totals[$pid] = round($item->getRowTotalInclTax(), 2);
432
+ }
433
+ }
434
+
435
+ $params = array(
436
+ 'OM.tid' => $order->getIncrementId(),
437
+ 'OM.pp' => implode(';', array_keys($products)),
438
+ 'OM.pu' => implode(';', $products),
439
+ 'OM.ppr' => str_ireplace('.', ',', implode(';', $totals))
440
+ );
441
+
442
+ //customer identifier
443
+ switch ($this->_getCustomerIdentifier()) {
444
+ case 'email':
445
+ $params['OM.exVisitorID'] = $order->getCustomerEmail();
446
+ break;
447
+ default:
448
+ $params['OM.exVisitorID'] = $order->getCustomerId();
449
+ }
450
+
451
+ //custom event parameters
452
+ $customParams = unserialize(Mage::getStoreConfig('visilabs/order/cep'));
453
+ foreach ($customParams as $param) {
454
+ if ($param['attribute'] && $order->hasData($param['attribute'])) {
455
+ $params['OM.cep' . $param['param']] = (string) $order->getData($param['attribute']);
456
+ }
457
+ }
458
+
459
+ $this->addVisilabsParams($params);
460
+
461
+ return $this;
462
+ }
463
+
464
+ /**
465
+ * On Site Search Event
466
+ *
467
+ * @param Varien_Event_Observer $observer
468
+ * @return Numerno_Visilabs_Model_Observer
469
+ */
470
+ public function eventOnSiteSearch()
471
+ {
472
+ if (!Mage::helper('visilabs')->isTaggingEnabled('search')) {
473
+ return $this;
474
+ }
475
+
476
+ $params = array('OM.OSS' => Mage::helper('catalogsearch')->getQueryText());
477
+
478
+ $this->addVisilabsParams($params);
479
+
480
+ return $this;
481
+ }
482
+
483
+ }
app/code/local/Numerno/Visilabs/Model/System/Config/Backend/Attributes.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Backend Model to Clean Visilabs Cache
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Model_System_Config_Backend_Attributes
38
+ extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array
39
+ {
40
+ /**
41
+ * Cron settings after save
42
+ *
43
+ * @return Numerno_Visilabs_Model_System_Config_Backend_Attributes
44
+ */
45
+ protected function _afterSave()
46
+ {
47
+ if ($this->isValueChanged()) {
48
+ Mage::app()->getCache()->clean(
49
+ Zend_Cache::CLEANING_MODE_MATCHING_TAG,
50
+ array(Numerno_Visilabs_Model_Observer::VISILABS_CACHE_TAG)
51
+ );
52
+ }
53
+
54
+ return $this;
55
+ }
56
+ }
app/code/local/Numerno/Visilabs/Model/System/Config/Backend/Cache.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Backend Model to Clean Visilabs Cache
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Model_System_Config_Backend_Cache extends Mage_Core_Model_Config_Data
38
+ {
39
+ /**
40
+ * Cron settings after save
41
+ *
42
+ * @return Mage_Core_Model_Config_Data
43
+ */
44
+ protected function _afterSave()
45
+ {
46
+ if ($this->isValueChanged()) {
47
+ Mage::app()->getCache()->clean(
48
+ Zend_Cache::CLEANING_MODE_MATCHING_TAG,
49
+ array(Numerno_Visilabs_Model_Observer::VISILABS_CACHE_TAG)
50
+ );
51
+ }
52
+
53
+ return $this;
54
+ }
55
+ }
app/code/local/Numerno/Visilabs/Model/System/Config/Source/Attribute.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Product Attributes Options
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Model_System_Config_Source_Attribute
38
+ {
39
+ /**
40
+ * Retrieve Product Attributes to Option array
41
+ *
42
+ * @return array
43
+ */
44
+ public function toOptionArray()
45
+ {
46
+ $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
47
+ ->addVisibleFilter()
48
+ ->addFieldToFilter('main_table.is_user_defined', 1);
49
+ $result = array();
50
+
51
+ foreach ($attributes as $attribute) {
52
+ if (($label = $attribute->getFrontendLabel())) {
53
+ $result[$attribute->getAttributeCode()] = $label . '(' . $attribute->getAttributeCode() . ')';
54
+ }
55
+ }
56
+
57
+ return $result;
58
+ }
59
+
60
+ }
61
+
app/code/local/Numerno/Visilabs/Model/System/Config/Source/Cid.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * Customer Identifier Options
32
+ *
33
+ * @category Numerno
34
+ * @package Numerno_Visilabs
35
+ * @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
36
+ */
37
+ class Numerno_Visilabs_Model_System_Config_Source_Cid
38
+ {
39
+ /**
40
+ * Retrieve Customer Identifier Attributes to Option array
41
+ *
42
+ * @return array
43
+ */
44
+ public function toOptionArray()
45
+ {
46
+ $options = array(
47
+ 'entity_id' => Mage::helper('visilabs')->__('Customer Id'),
48
+ 'email' => Mage::helper('visilabs')->__('Customer Email')
49
+ );
50
+
51
+ return $options;
52
+ }
53
+
54
+ }
55
+
app/code/local/Numerno/Visilabs/etc/adminhtml.xml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Numerno - Visilabs Magento Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
9
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
10
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
16
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
17
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
18
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
19
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
20
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
21
+ * code if caused by other Magento extension.
22
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
23
+ * so we can send you a copy immediately.
24
+ *
25
+ * @category [Numerno]
26
+ * @package [Numerno_Visilabs]
27
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
28
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
29
+ */
30
+ -->
31
+ <config>
32
+ <acl>
33
+ <resources>
34
+ <admin>
35
+ <children>
36
+ <system>
37
+ <children>
38
+ <config>
39
+ <children>
40
+ <visilabs translate="title">
41
+ <title>Visilabs Settings</title>
42
+ <sort_order>100</sort_order>
43
+ </visilabs>
44
+ </children>
45
+ </config>
46
+ </children>
47
+ </system>
48
+ </children>
49
+ </admin>
50
+ </resources>
51
+ </acl>
52
+ </config>
app/code/local/Numerno/Visilabs/etc/config.xml ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Numerno - Visilabs Magento Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
9
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
10
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
16
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
17
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
18
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
19
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
20
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
21
+ * code if caused by other Magento extension.
22
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
23
+ * so we can send you a copy immediately.
24
+ *
25
+ * @category [Numerno]
26
+ * @package [Numerno_Visilabs]
27
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
28
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
29
+ */
30
+ -->
31
+ <config>
32
+ <modules>
33
+ <Numerno_Visilabs>
34
+ <version>1.0.0</version>
35
+ </Numerno_Visilabs>
36
+ </modules>
37
+ <global>
38
+ <blocks>
39
+ <visilabs>
40
+ <class>Numerno_Visilabs_Block</class>
41
+ </visilabs>
42
+ </blocks>
43
+ <helpers>
44
+ <visilabs>
45
+ <class>Numerno_Visilabs_Helper</class>
46
+ </visilabs>
47
+ </helpers>
48
+ <models>
49
+ <visilabs>
50
+ <class>Numerno_Visilabs_Model</class>
51
+ </visilabs>
52
+ </models>
53
+ </global>
54
+ <adminhtml>
55
+ <translate>
56
+ <modules>
57
+ <Numerno_Visilabs>
58
+ <files>
59
+ <default>Numerno_Visilabs.csv</default>
60
+ </files>
61
+ </Numerno_Visilabs>
62
+ </modules>
63
+ </translate>
64
+ </adminhtml>
65
+ <frontend>
66
+ <events>
67
+ <customer_login>
68
+ <observers>
69
+ <visilabs_event_login>
70
+ <type>singleton</type>
71
+ <class>visilabs/observer</class>
72
+ <method>eventLogin</method>
73
+ </visilabs_event_login>
74
+ </observers>
75
+ </customer_login>
76
+ <customer_save_before>
77
+ <observers>
78
+ <visilabs_event_signup>
79
+ <type>singleton</type>
80
+ <class>visilabs/observer</class>
81
+ <method>eventSignup</method>
82
+ </visilabs_event_signup>
83
+ </observers>
84
+ </customer_save_before>
85
+ <catalog_controller_product_init_after>
86
+ <observers>
87
+ <visilabs_event_product_view>
88
+ <type>singleton</type>
89
+ <class>visilabs/observer</class>
90
+ <method>eventProductView</method>
91
+ </visilabs_event_product_view>
92
+ </observers>
93
+ </catalog_controller_product_init_after>
94
+ <catalog_product_save_commit_after>
95
+ <observers>
96
+ <visilabs_cache_product_refresh>
97
+ <type>singleton</type>
98
+ <class>visilabs/observer</class>
99
+ <method>refreshProduct</method>
100
+ </visilabs_cache_product_refresh>
101
+ </observers>
102
+ </catalog_product_save_commit_after>
103
+ <catalog_controller_category_init_after>
104
+ <observers>
105
+ <visilabs_event_category_view>
106
+ <type>singleton</type>
107
+ <class>visilabs/observer</class>
108
+ <method>eventCategoryView</method>
109
+ </visilabs_event_category_view>
110
+ </observers>
111
+ </catalog_controller_category_init_after>
112
+ <sales_quote_item_save_after>
113
+ <observers>
114
+ <visilabs_quote_item_save>
115
+ <type>singleton</type>
116
+ <class>visilabs/observer</class>
117
+ <method>eventBasket</method>
118
+ </visilabs_quote_item_save>
119
+ </observers>
120
+ </sales_quote_item_save_after>
121
+ <sales_quote_item_delete_after>
122
+ <observers>
123
+ <visilabs_quote_item_delete>
124
+ <type>singleton</type>
125
+ <class>visilabs/observer</class>
126
+ <method>eventBasket</method>
127
+ </visilabs_quote_item_delete>
128
+ </observers>
129
+ </sales_quote_item_delete_after>
130
+ <controller_action_predispatch_checkout_cart_index>
131
+ <observers>
132
+ <visilabs_event_basket_view>
133
+ <type>singleton</type>
134
+ <class>visilabs/observer</class>
135
+ <method>eventBasket</method>
136
+ </visilabs_event_basket_view>
137
+ </observers>
138
+ </controller_action_predispatch_checkout_cart_index>
139
+ <sales_order_place_after>
140
+ <observers>
141
+ <visilabs_event_purchase>
142
+ <type>singleton</type>
143
+ <class>visilabs/observer</class>
144
+ <method>eventPurchase</method>
145
+ </visilabs_event_purchase>
146
+ </observers>
147
+ </sales_order_place_after>
148
+ <controller_action_predispatch_catalogsearch_result_index>
149
+ <observers>
150
+ <visilabs_event_onsitesearch>
151
+ <type>singleton</type>
152
+ <class>visilabs/observer</class>
153
+ <method>eventOnSiteSearch</method>
154
+ </visilabs_event_onsitesearch>
155
+ </observers>
156
+ </controller_action_predispatch_catalogsearch_result_index>
157
+ </events>
158
+ <layout>
159
+ <updates>
160
+ <visilabs>
161
+ <file>visilabs.xml</file>
162
+ </visilabs>
163
+ </updates>
164
+ </layout>
165
+ </frontend>
166
+ <default>
167
+ <visilabs>
168
+ <general>
169
+ <enabled>0</enabled>
170
+ <use_channel>0</use_channel>
171
+ <use_suggest>0</use_suggest>
172
+ <cid>entity_id</cid>
173
+ </general>
174
+ <catalog>
175
+ <enabled>0</enabled>
176
+ <brand>manufacturer</brand>
177
+ </catalog>
178
+ <search>
179
+ <enabled>0</enabled>
180
+ </search>
181
+ <cart>
182
+ <enabled>0</enabled>
183
+ </cart>
184
+ <order>
185
+ <enabled>0</enabled>
186
+ </order>
187
+ </visilabs>
188
+ </default>
189
+ </config>
app/code/local/Numerno/Visilabs/etc/system.xml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Numerno - Visilabs Magento Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
9
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
10
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
16
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
17
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
18
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
19
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
20
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
21
+ * code if caused by other Magento extension.
22
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
23
+ * so we can send you a copy immediately.
24
+ *
25
+ * @category [Numerno]
26
+ * @package [Numerno_Visilabs]
27
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
28
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
29
+ */
30
+ -->
31
+ <config>
32
+ <tabs>
33
+ <visilabs translate="label" module="visilabs">
34
+ <label><![CDATA[<div style="position: absolute;"><img id="visilabs-logo" src="" alt="" border="0" /></div>&nbsp;<script>
35
+ var skin_dir_pos = SKIN_URL.indexOf("adminhtml");
36
+ var skin_dir = SKIN_URL.substring(0, skin_dir_pos);
37
+ $('visilabs-logo').src = skin_dir + "adminhtml/default/default/images/visilabs/visilabs_logo.png";
38
+ </script>]]></label>
39
+ <sort_order>400</sort_order>
40
+ </visilabs>
41
+ </tabs>
42
+ <sections>
43
+ <visilabs translate="label" module="visilabs">
44
+ <label>Visilabs Tagging</label>
45
+ <tab>visilabs</tab>
46
+ <frontend_type>text</frontend_type>
47
+ <sort_order>10</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>1</show_in_store>
51
+ <groups>
52
+ <general module="visilabs" translate="label comment">
53
+ <label>General Settings</label>
54
+ <expanded>true</expanded>
55
+ <frontend_type>text</frontend_type>
56
+ <sort_order>10</sort_order>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_website>1</show_in_website>
59
+ <show_in_store>1</show_in_store>
60
+ <comment><![CDATA[<div style='height: 20px;margin-bottom:10px;'> <img style='float:left;' src='http://numerno.com/media/modules/visilabs-logo.png' /></div><br /><br /> Configure your Visilabs platform connection below. If you have any questions or would like any help please visit <a href='http://numerno.com' target='_blank'>numerno.com</a>.]]></comment>
61
+ <fields>
62
+ <enabled translate="label">
63
+ <label>Enabled</label>
64
+ <frontend_type>select</frontend_type>
65
+ <source_model>adminhtml/system_config_source_yesno</source_model>
66
+ <sort_order>10</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>1</show_in_store>
70
+ </enabled>
71
+ <sid translate="label">
72
+ <label>Site ID</label>
73
+ <frontend_type>text</frontend_type>
74
+ <sort_order>20</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>1</show_in_store>
78
+ </sid>
79
+ <oid translate="label">
80
+ <label>Organization ID</label>
81
+ <frontend_type>text</frontend_type>
82
+ <sort_order>30</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>1</show_in_website>
85
+ <show_in_store>1</show_in_store>
86
+ </oid>
87
+ <use_channel translate="label comment">
88
+ <label>Enable Channel Tag</label>
89
+ <frontend_type>select</frontend_type>
90
+ <source_model>adminhtml/system_config_source_yesno</source_model>
91
+ <sort_order>40</sort_order>
92
+ <show_in_default>1</show_in_default>
93
+ <show_in_website>1</show_in_website>
94
+ <show_in_store>1</show_in_store>
95
+ <comment>You need to specify store channel on store view scope, otherwise store code will be used as channel name.</comment>
96
+ </use_channel>
97
+ <channel translate="label">
98
+ <label>Store Channel</label>
99
+ <frontend_type>text</frontend_type>
100
+ <sort_order>50</sort_order>
101
+ <show_in_store>1</show_in_store>
102
+ <depends><use_channel>1</use_channel></depends>
103
+ </channel>
104
+ <use_suggest translate="label comment">
105
+ <label>Enable Action Suggestion</label>
106
+ <frontend_type>select</frontend_type>
107
+ <source_model>adminhtml/system_config_source_yesno</source_model>
108
+ <sort_order>60</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ <comment>Calling SuggestActions() is needed for pop-up scenarios.</comment>
113
+ </use_suggest>
114
+ <cid translate="label">
115
+ <label>Customer Identifier Attribute</label>
116
+ <frontend_type>select</frontend_type>
117
+ <source_model>visilabs/system_config_source_cid</source_model>
118
+ <sort_order>70</sort_order>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_website>1</show_in_website>
121
+ <show_in_store>1</show_in_store>
122
+ <comment>Will be used for exVisitorID parameter</comment>
123
+ </cid>
124
+ <cep>
125
+ <label>Custom Event Parameters for Customer Signup and Login</label>
126
+ <frontend_model>visilabs/adminhtml_system_config_form_field_customer</frontend_model>
127
+ <backend_model>visilabs/system_config_backend_attributes</backend_model>
128
+ <sort_order>80</sort_order>
129
+ <show_in_default>1</show_in_default>
130
+ <show_in_website>1</show_in_website>
131
+ <show_in_store>1</show_in_store>
132
+ <depends><enabled>1</enabled></depends>
133
+ </cep>
134
+ </fields>
135
+ </general>
136
+ <catalog module="visilabs" translate="label">
137
+ <label>Catalog Tagging Settings</label>
138
+ <expanded>true</expanded>
139
+ <frontend_type>text</frontend_type>
140
+ <sort_order>30</sort_order>
141
+ <show_in_default>1</show_in_default>
142
+ <show_in_website>1</show_in_website>
143
+ <show_in_store>1</show_in_store>
144
+ <fields>
145
+ <enabled translate="label">
146
+ <label>Enable Catalog Tagging</label>
147
+ <frontend_type>select</frontend_type>
148
+ <source_model>adminhtml/system_config_source_yesno</source_model>
149
+ <sort_order>10</sort_order>
150
+ <show_in_default>1</show_in_default>
151
+ <show_in_website>1</show_in_website>
152
+ <show_in_store>1</show_in_store>
153
+ </enabled>
154
+ <brand translate="label">
155
+ <label>Brand Attribute</label>
156
+ <frontend_type>select</frontend_type>
157
+ <source_model>visilabs/system_config_source_attribute</source_model>
158
+ <backend_model>visilabs/system_config_backend_cache</backend_model>
159
+ <sort_order>20</sort_order>
160
+ <show_in_default>1</show_in_default>
161
+ <show_in_website>1</show_in_website>
162
+ <show_in_store>1</show_in_store>
163
+ <depends><enabled>1</enabled></depends>
164
+ </brand>
165
+ <cep>
166
+ <label>Custom Product Parameters</label>
167
+ <frontend_model>visilabs/adminhtml_system_config_form_field_product</frontend_model>
168
+ <backend_model>visilabs/system_config_backend_attributes</backend_model>
169
+ <sort_order>30</sort_order>
170
+ <show_in_default>1</show_in_default>
171
+ <show_in_website>1</show_in_website>
172
+ <show_in_store>1</show_in_store>
173
+ <depends><enabled>1</enabled></depends>
174
+ </cep>
175
+ </fields>
176
+ </catalog>
177
+ <search module="visilabs" translate="label">
178
+ <label>On Site Search Tagging Settings</label>
179
+ <expanded>true</expanded>
180
+ <frontend_type>text</frontend_type>
181
+ <sort_order>50</sort_order>
182
+ <show_in_default>1</show_in_default>
183
+ <show_in_website>1</show_in_website>
184
+ <show_in_store>1</show_in_store>
185
+ <fields>
186
+ <enabled translate="label">
187
+ <label>Enable On Site Search Tagging</label>
188
+ <frontend_type>select</frontend_type>
189
+ <source_model>adminhtml/system_config_source_yesno</source_model>
190
+ <sort_order>10</sort_order>
191
+ <show_in_default>1</show_in_default>
192
+ <show_in_website>1</show_in_website>
193
+ <show_in_store>1</show_in_store>
194
+ </enabled>
195
+ </fields>
196
+ </search>
197
+ <cart module="visilabs" translate="label">
198
+ <label>Shopping Cart Tagging Settings</label>
199
+ <expanded>true</expanded>
200
+ <frontend_type>text</frontend_type>
201
+ <sort_order>60</sort_order>
202
+ <show_in_default>1</show_in_default>
203
+ <show_in_website>1</show_in_website>
204
+ <show_in_store>1</show_in_store>
205
+ <fields>
206
+ <enabled translate="label">
207
+ <label>Enable Shopping Cart Tagging</label>
208
+ <frontend_type>select</frontend_type>
209
+ <source_model>adminhtml/system_config_source_yesno</source_model>
210
+ <sort_order>10</sort_order>
211
+ <show_in_default>1</show_in_default>
212
+ <show_in_website>1</show_in_website>
213
+ <show_in_store>1</show_in_store>
214
+ </enabled>
215
+ <cep>
216
+ <label>Custom Cart Parameters</label>
217
+ <frontend_model>visilabs/adminhtml_system_config_form_field_cart</frontend_model>
218
+ <backend_model>visilabs/system_config_backend_attributes</backend_model>
219
+ <sort_order>20</sort_order>
220
+ <show_in_default>1</show_in_default>
221
+ <show_in_website>1</show_in_website>
222
+ <show_in_store>1</show_in_store>
223
+ <depends><enabled>1</enabled></depends>
224
+ </cep>
225
+ </fields>
226
+ </cart>
227
+ <order module="visilabs" translate="label">
228
+ <label>Purchase Tagging Settings</label>
229
+ <expanded>true</expanded>
230
+ <frontend_type>text</frontend_type>
231
+ <sort_order>70</sort_order>
232
+ <show_in_default>1</show_in_default>
233
+ <show_in_website>1</show_in_website>
234
+ <show_in_store>1</show_in_store>
235
+ <fields>
236
+ <enabled translate="label">
237
+ <label>Enable Purchase Tagging</label>
238
+ <frontend_type>select</frontend_type>
239
+ <source_model>adminhtml/system_config_source_yesno</source_model>
240
+ <sort_order>10</sort_order>
241
+ <show_in_default>1</show_in_default>
242
+ <show_in_website>1</show_in_website>
243
+ <show_in_store>1</show_in_store>
244
+ </enabled>
245
+ <cep>
246
+ <label>Custom Order Parameters</label>
247
+ <frontend_model>visilabs/adminhtml_system_config_form_field_order</frontend_model>
248
+ <backend_model>visilabs/system_config_backend_attributes</backend_model>
249
+ <sort_order>20</sort_order>
250
+ <show_in_default>1</show_in_default>
251
+ <show_in_website>1</show_in_website>
252
+ <show_in_store>1</show_in_store>
253
+ <depends><enabled>1</enabled></depends>
254
+ </cep>
255
+ </fields>
256
+ </order>
257
+ </groups>
258
+ </visilabs>
259
+ </sections>
260
+ </config>
app/design/frontend/base/default/layout/visilabs.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Numerno - Visilabs Magento Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
9
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
10
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
16
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
17
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
18
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
19
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
20
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
21
+ * code if caused by other Magento extension.
22
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
23
+ * so we can send you a copy immediately.
24
+ *
25
+ * @category [Numerno]
26
+ * @package [Numerno_Visilabs]
27
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
28
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
29
+ */
30
+ -->
31
+ <layout version="1.0.0">
32
+ <default>
33
+ <reference name="head" before="-">
34
+ <block type="visilabs/global" name="visilabs.global" template="visilabs/global.phtml"/>
35
+ </reference>
36
+ <reference name="after_body_start" before="-">
37
+ <block type="visilabs/tagging" name="visilabs.tagging" template="visilabs/tagging.phtml" />
38
+ </reference>
39
+ </default>
40
+ </layout>
app/design/frontend/base/default/template/visilabs/global.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * @var $this Numerno_Visilabs_Block_Global
32
+ */
33
+ ?>
34
+ <!-- Visilabs Global Script -->
35
+ <script type="text/javascript">
36
+ //<![CDATA[
37
+ var d = new Date();
38
+ var l = (location.protocol.indexOf("https")==0?"https":"http") + "://<?php echo $this->getVisilabsUrl() ?>/Visilabs.js?sid=<?php echo $this->getSiteId() ?>&oid=<?php echo $this->getOrganizationId() ?>&d=" + d;
39
+ var s = document.createElement("script");
40
+ if(location.href.toString().indexOf("vldebug=true") > 0){l = (location.protocol.indexOf("https")==0?"https":"http") + "://<?php echo $this->getVisilabsUrl() ?>/Visilabs_Debug.js?sid=<?php echo $this->getSiteId() ?>&oid=<?php echo $this->getOrganizationId() ?>&d=" + d;}
41
+ s.onload = function(){try{OnVisilabsLoaded();}catch(Ex){}};
42
+ s.type = "text/javascript";
43
+ s.src = l;
44
+ document.getElementsByTagName("head")[0].appendChild(s);
45
+ //]]>
46
+ </script>
app/design/frontend/base/default/template/visilabs/tagging.phtml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Numerno - Visilabs Magento Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
8
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
9
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
15
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
16
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
17
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
18
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
19
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
20
+ * code if caused by other Magento extension.
21
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
22
+ * so we can send you a copy immediately.
23
+ *
24
+ * @category [Numerno]
25
+ * @package [Numerno_Visilabs]
26
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
27
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
28
+ */
29
+
30
+ /**
31
+ * @var $this Numerno_Visilabs_Block_Tagging
32
+ */
33
+
34
+ ?>
35
+ <script type="text/javascript">
36
+ //<![CDATA[
37
+ function OnVisilabsLoaded() {
38
+ var VL = new Visilabs();
39
+
40
+ <?php echo $this->getParams() ?>
41
+ VL.Collect();
42
+
43
+ <?php if ($this->canSuggestActions()): ?>
44
+ VL.SuggestActions();
45
+ <?php endif; ?>
46
+ }
47
+ //]]>
48
+ </script>
app/etc/modules/Numerno_Visilabs.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Numerno - Visilabs Magento Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the NUMERNO VISILABS MAGENTO EXTENSION License, which extends the Open Software
9
+ * License (OSL 3.0). The Visilabs Magento Extension License is available at this URL:
10
+ * http://numerno.com/licenses/visilabs-ce.txt The Open Software License is available at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
16
+ * abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
17
+ * terminates any agreement of support offered by Numerno, outlined in the provided Visilabs Magento Extension License.
18
+ * Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
19
+ * billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
20
+ * Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
21
+ * code if caused by other Magento extension.
22
+ * If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
23
+ * so we can send you a copy immediately.
24
+ *
25
+ * @category [Numerno]
26
+ * @package [Numerno_Visilabs]
27
+ * @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
28
+ * @license http://numerno.com/licenses/visilabs-ce.txt Numerno Visilabs Magento Extension License
29
+ */
30
+ -->
31
+ <config>
32
+ <modules>
33
+ <Numerno_Visilabs>
34
+ <active>true</active>
35
+ <codePool>local</codePool>
36
+ </Numerno_Visilabs>
37
+ </modules>
38
+ </config>
app/locale/en_US/Numerno_Visilabs.csv ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Visilabs Settings","Visilabs Settings"
2
+ "Visilabs Tagging","Visilabs Tagging"
3
+ "General Settings","General Settings"
4
+ "<div style='height: 20px;margin-bottom:10px;'> <img style='float:left;' src='http://numerno.com/media/modules/visilabs-logo.png' /></div><br /><br /> Configure your Visilabs platform connection below. If you have any questions or would like any help please visit <a href='http://numerno.com' target='_blank'>numerno.com</a>.","<div style='height: 20px;margin-bottom:10px;'> <img style='float:left;' src='http://numerno.com/media/modules/visilabs-logo.png' /></div><br /><br /> Configure your Visilabs platform connection below. If you have any questions or would like any help please visit <a href='http://numerno.com' target='_blank'>numerno.com</a>."
5
+ "Enabled","Enabled"
6
+ "Site ID","Site ID"
7
+ "Organization ID","Organization ID"
8
+ "Enable Channel Tag","Enable Channel Tag"
9
+ "You need to specify store channel on store view scope, otherwise store code will be used as channel name.","You need to specify store channel on store view scope, otherwise store code will be used as channel name."
10
+ "Store Channel","Store Channel"
11
+ "Enable Action Suggestion","Enable Action Suggestion"
12
+ "Calling SuggestActions() is needed for pop-up scenarios.","Calling SuggestActions() is needed for pop-up scenarios."
13
+ "Customer Identifier Attribute","Customer Identifier Attribute"
14
+ "Will be used for exVisitorID parameter","Will be used for exVisitorID parameter"
15
+ "Custom Event Parameters for Customer Signup and Login","Custom Event Parameters for Customer Signup and Login"
16
+ "Catalog Tagging Settings","Catalog Tagging Settings"
17
+ "Enable Catalog Tagging","Enable Catalog Tagging"
18
+ "Brand Attribute","Brand Attribute"
19
+ "Custom Product Parameters","Custom Product Parameters"
20
+ "On Site Search Tagging Settings","On Site Search Tagging Settings"
21
+ "Enable On Site Search Tagging","Enable On Site Search Tagging"
22
+ "Shopping Cart Tagging Settings","Shopping Cart Tagging Settings"
23
+ "Enable Shopping Cart Tagging","Enable Shopping Cart Tagging"
24
+ "Custom Cart Parameters","Custom Cart Parameters"
25
+ "Purchase Tagging Settings","Purchase Tagging Settings"
26
+ "Enable Purchase Tagging","Enable Purchase Tagging"
27
+ "Custom Order Parameters","Custom Order Parameters"
28
+ "Customer ID (entity_id)","Customer ID (entity_id)"
29
+ "Group Name","Group Name"
30
+ "Parameter","Parameter"
31
+ "Cart Attribute","Cart Attribute"
32
+ "Add Parameter","Add Parameter"
33
+ "Customer Attribute","Customer Attribute"
34
+ "Order Attribute","Order Attribute"
35
+ "Product Attribute","Product Attribute"
36
+ "Customer Id","Customer Id"
37
+ "Customer Email","Customer Email"
app/locale/tr_TR/Numerno_Visilabs.csv ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Visilabs Settings","Visilabs Ayarları"
2
+ "Visilabs Tagging","Visilabs Etiketleme"
3
+ "General Settings","Genel Ayarlar"
4
+ "<div style='height: 20px;margin-bottom:10px;'> <img style='float:left;' src='http://numerno.com/media/modules/visilabs-logo.png' /></div><br /><br /> Configure your Visilabs platform connection below. If you have any questions or would like any help please visit <a href='http://numerno.com' target='_blank'>numerno.com</a>.","<div style='height: 20px;margin-bottom:10px;'> <img style='float:left;' src='http://numerno.com/media/modules/visilabs-logo.png' /></div><br /><br /> Visilabs ayarlarınızı aşağıdaki formdan değiştiriniz. Eğer herhangi bir desteğe ihtiyacınız olursa <a href='http://numerno.com' target='_blank'>numerno.com</a>'u ziyaret ediniz."
5
+ "Enabled","Etkin"
6
+ "Site ID","Site ID"
7
+ "Organization ID","Organizasyon ID"
8
+ "Enable Channel Tag","Channel Etiketi Kullan"
9
+ "You need to specify store channel on store view scope, otherwise store code will be used as channel name.","Channel etiketinizi mağaza görünümü seviyesinde düzenleyebilirsiniz. Channel etiketi belirtilmemişse yerine mağaza kodu kullanılır."
10
+ "Store Channel","Mağaza Channel Etiketi"
11
+ "Enable Action Suggestion","Pop-up Senaryoları Etkin"
12
+ "Calling SuggestActions() is needed for pop-up scenarios.","Pop-up senaryoları etkinleştirildiğinde SuggestActions() fonksiyonu kullanılır."
13
+ "Customer Identifier Attribute","Müşteri Ayrıştırıcı Değişken"
14
+ "Will be used for exVisitorID parameter","exVisitorID parametresi için kullanılır"
15
+ "Custom Event Parameters for Customer Signup and Login","Yeni Üyelik ve Üye Girişi için Özel Müşteri Parametreleri"
16
+ "Catalog Tagging Settings","Katalog Etiketleme Ayarları"
17
+ "Enable Catalog Tagging","Katalog Etiketleme Etkin"
18
+ "Brand Attribute","Marka Değişkeni"
19
+ "Custom Product Parameters","Özel Ürün Parametreleri"
20
+ "On Site Search Tagging Settings","Site İçi Arama için Etiketleme Ayarları"
21
+ "Enable On Site Search Tagging","Site İçi Arama için Etiketleme Etkin"
22
+ "Shopping Cart Tagging Settings","Alışveriş Sepeti için Etiketleme Ayarları"
23
+ "Enable Shopping Cart Tagging","Alışveriş Sepeti için Etiketleme Etkin"
24
+ "Custom Cart Parameters","Özel Alışveriş Sepeti Parametreleri"
25
+ "Purchase Tagging Settings","Sipariş Etiketleme Ayarları"
26
+ "Enable Purchase Tagging","Sipariş Etiketleme Etkin"
27
+ "Custom Order Parameters","Özel Sipariş Parametreleri"
28
+ "Customer ID (entity_id)","Müşteri No (entity_id)"
29
+ "Group Name","Müşteri Grubu Adı"
30
+ "Parameter","Parametre"
31
+ "Cart Attribute","Sepet Değişkeni"
32
+ "Add Parameter","Parametre Ekle"
33
+ "Customer Attribute","Müşteri Değişkeni"
34
+ "Order Attribute","Sipariş Değişkeni"
35
+ "Product Attribute","Ürün Değişkeni"
36
+ "Customer Id","Müşteri No"
37
+ "Customer Email","E-posta Adresi"
package.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Numerno_Visilabs</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://numerno.com/licenses/visilabs-ce.txt">NUMERNO VISILABS MAGENTO EXTENSION</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Tagging Module for Visilabs omni-channel automation platform.</summary>
10
+ <description>This extension allows you to easily tag your Magento pages according to Visilabs platform requirements.</description>
11
+ <notes>Version 1.0.0&#xD;
12
+ * Initial relase&#xD;
13
+ &#xD;
14
+ Build Date: 2015-12-21</notes>
15
+ <authors><author><name>Numerno</name><user>muhammedv</user><email>muhammedv@gmail.com</email></author></authors>
16
+ <date>2016-04-20</date>
17
+ <time>16:56:41</time>
18
+ <contents><target name="magelocal"><dir><dir name="Numerno"><dir name="Visilabs"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="BasketCEP.php" hash="8a9d83bc39c0ff44fb334a75226e153d"/><file name="Cart.php" hash="7891049a656eca6fb3d5aead6bf6d0ca"/><file name="Customer.php" hash="1ea302a267d174b05270b841f069fe70"/><file name="Order.php" hash="88ad089eb1b60d9f317381c442a5430b"/><file name="Product.php" hash="1d2215ee6aeadf0e5b8d3bd338675e0b"/><dir name="Renderer"><file name="CountOut.php" hash="ef926d60e83bbefa4a0f8b2cd24ea655"/><file name="CustomerAttributes.php" hash="fdfbd2c22f5721c8161e89dcad6d503e"/><file name="OrderAttributes.php" hash="b99663970855d53d163e2d66cc919f10"/><file name="QuoteAttributes.php" hash="31f391256088326dbb74817cbf4e5c6a"/><file name="VisibleProductAttributes.php" hash="513676ddb01fb2a45dd266d8429a543d"/></dir></dir></dir></dir></dir></dir><file name="Global.php" hash="b50263307028e77069e68b91314fb54a"/><file name="Tagging.php" hash="56a28e5df9942aa5763c12742bb16100"/></dir><dir name="Helper"><file name="Data.php" hash="123d2b2bfadadb1ed1fa1f322602d6e0"/></dir><dir name="Model"><file name="Observer.php" hash="46a4fac800ab06acc8dbf2156193ec16"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Attributes.php" hash="8b413e257324f60059ca2f1ae726416c"/><file name="Cache.php" hash="084bda496487098eb0acd64fd08f4fd5"/></dir><dir name="Source"><file name="Attribute.php" hash="bf271ef3acf8e20b0f49ac318ba24135"/><file name="Cid.php" hash="5b3dac17dc669f1c5eafa56c05b0eff2"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f10b28bb7dba924fa1d3096f217c00fb"/><file name="config.xml" hash="5b5c146bb8da3e26eafafecac84f471d"/><file name="system.xml" hash="c0a6b25e2559a77367178431ddfe5c73"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Numerno_Visilabs.xml" hash="11ee0c79022f644282ebec56183071be"/></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="visilabs.xml" hash="2e3cf416b1357a67ffc94f5e9d3b88e3"/></dir><dir name="template"><dir name="visilabs"><file name="global.phtml" hash="3263a5b34ff073d13c333c8950732c72"/><file name="tagging.phtml" hash="8d9071c3f4ba6f05df6737a90d468569"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="visilabs"><file name="visilabs_logo.png" hash="8710ce7d462e1772c7fefc3804a7786c"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="tr_TR"><file name="Numerno_Visilabs.csv" hash="d7f049a08eb3b358d97151491d39838d"/></dir><dir name="en_US"><file name="Numerno_Visilabs.csv" hash="f466beb4c19c8d4788f994086ca3ce42"/></dir></dir></target></contents>
19
+ <compatible/>
20
+ <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
21
+ </package>
skin/adminhtml/default/default/images/visilabs/visilabs_logo.png ADDED
Binary file