Com_Reevoo - Version 0.1.1

Version Notes

This extension is a package for reevoo configuration on Magento platform.

Download this release

Release Info

Developer Farhan Islam
Extension Com_Reevoo
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

Files changed (38) hide show
  1. app/code/local/EComHut/Reevoo/Block/Customerexperience.php +51 -51
  2. app/code/local/EComHut/Reevoo/Block/Info.php +37 -37
  3. app/code/local/EComHut/Reevoo/Block/Overallserviceratingbadge.php +42 -42
  4. app/code/local/EComHut/Reevoo/Block/Productfeedbtn.php +47 -47
  5. app/code/local/EComHut/Reevoo/Block/Purchasefeedbtn.php +47 -47
  6. app/code/local/EComHut/Reevoo/Block/Review.php +44 -44
  7. app/code/local/EComHut/Reevoo/Block/Standard.php +25 -25
  8. app/code/local/EComHut/Reevoo/Block/Tracking.php +95 -95
  9. app/code/local/EComHut/Reevoo/Block/Widget/Customerexperience.php +25 -25
  10. app/code/local/EComHut/Reevoo/Block/Widget/Overallserviceratingbadge.php +25 -25
  11. app/code/local/EComHut/Reevoo/Block/Widget/Standard.php +25 -25
  12. app/code/local/EComHut/Reevoo/Helper/Api.php +123 -123
  13. app/code/local/EComHut/Reevoo/Helper/Data.php +377 -377
  14. app/code/local/EComHut/Reevoo/Helper/Ftp.php +194 -194
  15. app/code/local/EComHut/Reevoo/Helper/Producthelper.php +248 -248
  16. app/code/local/EComHut/Reevoo/Helper/Purchasehelper.php +430 -430
  17. app/code/local/EComHut/Reevoo/Helper/Tracking.php +62 -62
  18. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Product/Cron.php +70 -70
  19. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Purchaser/Cron.php +69 -69
  20. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Checkbox.php +42 -42
  21. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Attributeslist.php +55 -55
  22. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badges.php +42 -42
  23. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badgeslocation.php +42 -42
  24. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Textattributeslist.php +55 -55
  25. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Values.php +42 -42
  26. app/code/local/EComHut/Reevoo/Model/Cron.php +65 -65
  27. app/code/local/EComHut/Reevoo/Model/Data.php +144 -144
  28. app/code/local/EComHut/Reevoo/Model/Observer.php +55 -55
  29. app/code/local/EComHut/Reevoo/Model/Resource/Mysql4/Setup.php +25 -25
  30. app/code/local/EComHut/Reevoo/controllers/IndexController.php +132 -132
  31. app/code/local/EComHut/Reevoo/etc/system.xml +541 -541
  32. app/code/local/EComHut/Reevoo/sql/reevoo_setup/mysql4-install-0.0.1.php +62 -62
  33. app/design/adminhtml/default/default/layout/reevoo.xml +7 -7
  34. app/design/frontend/base/default/template/reevoo/review_list.phtml +1 -2
  35. app/design/frontend/rwd/default/template/reevoo/review_list.phtml +1 -2
  36. lib/Reevoo/reevoo_mark_http_client.php +2 -2
  37. package.xml +4 -4
  38. skin/adminhtml/default/default/reevoo.css +0 -1
app/code/local/EComHut/Reevoo/Block/Customerexperience.php CHANGED
@@ -1,51 +1,51 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Customerexperience extends Mage_Core_Block_Template {
24
- /*
25
- * Checks Reevoo Status
26
- * @return boolean
27
- */
28
-
29
- public function getStatus() {
30
- try {
31
- return Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore());
32
- } catch (Exception $e) {
33
- Mage::logException($e);
34
- }
35
- }
36
-
37
- /*
38
- * Retrieves reevoo API object
39
- * @return object of Reevoo api.
40
- */
41
-
42
- public function getExperience() {
43
- try {
44
- $_reevoo = Mage::helper('reevoo/api');
45
- return $_reevoo->getReevooApi();
46
- } catch (Exception $e) {
47
- Mage::logException($e);
48
- }
49
- }
50
-
51
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Customerexperience extends Mage_Core_Block_Template {
24
+ /*
25
+ * Checks Reevoo Status
26
+ * @return boolean
27
+ */
28
+
29
+ public function getStatus() {
30
+ try {
31
+ return Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore());
32
+ } catch (Exception $e) {
33
+ Mage::logException($e);
34
+ }
35
+ }
36
+
37
+ /*
38
+ * Retrieves reevoo API object
39
+ * @return object of Reevoo api.
40
+ */
41
+
42
+ public function getExperience() {
43
+ try {
44
+ $_reevoo = Mage::helper('reevoo/api');
45
+ return $_reevoo->getReevooApi();
46
+ } catch (Exception $e) {
47
+ Mage::logException($e);
48
+ }
49
+ }
50
+
51
+ }
app/code/local/EComHut/Reevoo/Block/Info.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Info extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
24
-
25
- public function render(Varien_Data_Form_Element_Abstract $element) {
26
- $html = $this->_getHeaderHtml($element);
27
- $html.= $this->_getFieldHtml($element);
28
- $html .= $this->_getFooterHtml($element);
29
- return $html;
30
- }
31
-
32
- protected function _getFieldHtml($fieldset) {
33
- $content = 'This module is developed by <a href="http://innovadeltech.com" target="_blank">Innovadel Technologies Limited</a>.';
34
- return $content;
35
- }
36
-
37
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Info extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
24
+
25
+ public function render(Varien_Data_Form_Element_Abstract $element) {
26
+ $html = $this->_getHeaderHtml($element);
27
+ $html.= $this->_getFieldHtml($element);
28
+ $html .= $this->_getFooterHtml($element);
29
+ return $html;
30
+ }
31
+
32
+ protected function _getFieldHtml($fieldset) {
33
+ $content = 'This module is developed by <a href="http://innovadeltech.com" target="_blank">Innovadel Technologies Limited</a>.';
34
+ return $content;
35
+ }
36
+
37
+ }
app/code/local/EComHut/Reevoo/Block/Overallserviceratingbadge.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Overallserviceratingbadge extends Mage_Core_Block_Template {
24
-
25
- public function getStatus() {
26
- try {
27
- return Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore());
28
- } catch (Exception $e) {
29
- Mage::logException($e);
30
- }
31
- }
32
-
33
- public function getExperience() {
34
- try {
35
- $_reevoo = Mage::helper('reevoo/api');
36
- return $_reevoo->getReevooApi();
37
- } catch (Exception $e) {
38
- Mage::logException($e);
39
- }
40
- }
41
-
42
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Overallserviceratingbadge extends Mage_Core_Block_Template {
24
+
25
+ public function getStatus() {
26
+ try {
27
+ return Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore());
28
+ } catch (Exception $e) {
29
+ Mage::logException($e);
30
+ }
31
+ }
32
+
33
+ public function getExperience() {
34
+ try {
35
+ $_reevoo = Mage::helper('reevoo/api');
36
+ return $_reevoo->getReevooApi();
37
+ } catch (Exception $e) {
38
+ Mage::logException($e);
39
+ }
40
+ }
41
+
42
+ }
app/code/local/EComHut/Reevoo/Block/Productfeedbtn.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Productfeedbtn extends Mage_Adminhtml_Block_System_Config_Form_Field {
24
-
25
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
26
- $this->setElement($element);
27
- if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) { // store level
28
- $store_id = Mage::getModel('core/store')->load($code)->getId();
29
- } elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) { // website level
30
- $website_id = Mage::getModel('core/website')->load($code)->getId();
31
- $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
32
- } else {
33
- $store_id = 1;
34
- }
35
- $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/products') . "?1&store=" . $store_id;
36
-
37
- $html = $this->getLayout()->createBlock('adminhtml/widget_button')
38
- ->setType('button')
39
- ->setClass('scalable')
40
- ->setLabel('Generate Products Feed')
41
- ->setOnClick("window.open('$url', '_blank', 'toolbar=no, location=no, status=no,menubar=no, scrollbars=no, resizable=no, width=500, height=200').focus();")
42
- ->toHtml();
43
-
44
- return $html;
45
- }
46
-
47
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Productfeedbtn extends Mage_Adminhtml_Block_System_Config_Form_Field {
24
+
25
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
26
+ $this->setElement($element);
27
+ if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) { // store level
28
+ $store_id = Mage::getModel('core/store')->load($code)->getId();
29
+ } elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) { // website level
30
+ $website_id = Mage::getModel('core/website')->load($code)->getId();
31
+ $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
32
+ } else {
33
+ $store_id = 1;
34
+ }
35
+ $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/products') . "?1&store=" . $store_id;
36
+
37
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
38
+ ->setType('button')
39
+ ->setClass('scalable')
40
+ ->setLabel('Generate Products Feed')
41
+ ->setOnClick("window.open('$url', '_blank', 'toolbar=no, location=no, status=no,menubar=no, scrollbars=no, resizable=no, width=500, height=200').focus();")
42
+ ->toHtml();
43
+
44
+ return $html;
45
+ }
46
+
47
+ }
app/code/local/EComHut/Reevoo/Block/Purchasefeedbtn.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Purchasefeedbtn extends Mage_Adminhtml_Block_System_Config_Form_Field {
24
-
25
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
26
- $this->setElement($element);
27
- if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) { // store level
28
- $store_id = Mage::getModel('core/store')->load($code)->getId();
29
- } elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) { // website level
30
- $website_id = Mage::getModel('core/website')->load($code)->getId();
31
- $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
32
- } else {
33
- $store_id = 1;
34
- }
35
- $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/purchases') . "?1&store=" . $store_id;
36
-
37
- $html = $this->getLayout()->createBlock('adminhtml/widget_button')
38
- ->setType('button')
39
- ->setClass('scalable')
40
- ->setLabel('Generate Purchase Feed')
41
- ->setOnClick("window.open('$url', '_blank', 'toolbar=no, location=no, status=no,menubar=no, scrollbars=no, resizable=no, width=500, height=200').focus();")
42
- ->toHtml();
43
-
44
- return $html;
45
- }
46
-
47
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Purchasefeedbtn extends Mage_Adminhtml_Block_System_Config_Form_Field {
24
+
25
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
26
+ $this->setElement($element);
27
+ if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) { // store level
28
+ $store_id = Mage::getModel('core/store')->load($code)->getId();
29
+ } elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) { // website level
30
+ $website_id = Mage::getModel('core/website')->load($code)->getId();
31
+ $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
32
+ } else {
33
+ $store_id = 1;
34
+ }
35
+ $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/purchases') . "?1&store=" . $store_id;
36
+
37
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
38
+ ->setType('button')
39
+ ->setClass('scalable')
40
+ ->setLabel('Generate Purchase Feed')
41
+ ->setOnClick("window.open('$url', '_blank', 'toolbar=no, location=no, status=no,menubar=no, scrollbars=no, resizable=no, width=500, height=200').focus();")
42
+ ->toHtml();
43
+
44
+ return $html;
45
+ }
46
+
47
+ }
app/code/local/EComHut/Reevoo/Block/Review.php CHANGED
@@ -1,44 +1,44 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Review extends Mage_Review_Block_Helper {
24
- /*
25
- * Checks if extension is enabled than adds short summy phtml file.
26
- * @param array $args All possible arguments for Mage_Review_Block_Helper
27
- * @return value of inquired configuration.
28
- */
29
-
30
- public function __construct(array $args = array()) {
31
- try {
32
- if (Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore())) {
33
- $this->_availableTemplates = array(
34
- 'default' => 'reevoo/summary.phtml',
35
- 'short' => 'reevoo/summary_short.phtml'
36
- );
37
- }
38
- } catch (Exception $e) {
39
- Mage::logException($e);
40
- }
41
- parent::__construct($args);
42
- }
43
-
44
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Review extends Mage_Review_Block_Helper {
24
+ /*
25
+ * Checks if extension is enabled than adds short summy phtml file.
26
+ * @param array $args All possible arguments for Mage_Review_Block_Helper
27
+ * @return value of inquired configuration.
28
+ */
29
+
30
+ public function __construct(array $args = array()) {
31
+ try {
32
+ if (Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore())) {
33
+ $this->_availableTemplates = array(
34
+ 'default' => 'reevoo/summary.phtml',
35
+ 'short' => 'reevoo/summary_short.phtml'
36
+ );
37
+ }
38
+ } catch (Exception $e) {
39
+ Mage::logException($e);
40
+ }
41
+ parent::__construct($args);
42
+ }
43
+
44
+ }
app/code/local/EComHut/Reevoo/Block/Standard.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Standard extends Mage_Core_Block_Template {
24
-
25
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Standard extends Mage_Core_Block_Template {
24
+
25
+ }
app/code/local/EComHut/Reevoo/Block/Tracking.php CHANGED
@@ -1,95 +1,95 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Tracking extends Mage_Core_Block_Template {
24
-
25
- public function getStatus() {
26
- try {
27
- return Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore());
28
- } catch (Exception $e) {
29
- Mage::logException($e);
30
- }
31
- }
32
-
33
- public function getExperience() {
34
- try {
35
- $_reevoo = Mage::helper('reevoo/api');
36
- if ($_reevoo->getStatus() === false) {
37
- return false;
38
- }
39
- return $_reevoo->getReevooApi();
40
- } catch (Exception $e) {
41
- Mage::logException($e);
42
- }
43
- }
44
-
45
- /*
46
- * Returns executes purchase tracking on final event.
47
- * @return null.
48
- */
49
-
50
- public function _getTrackingPurchase() {
51
- try {
52
- $orderIds = $this->getOrderData();
53
- if (empty($orderIds) || !is_array($orderIds)) {
54
- return;
55
- }
56
- $collection = Mage::getResourceModel('sales/order_collection')
57
- ->addFieldToFilter('entity_id', array('in' => $orderIds));
58
-
59
- $_reevoo = Mage::helper('reevoo/api');
60
- if ($_reevoo->getStatus() === false) {
61
- return false;
62
- }
63
- $reevooMark = $_reevoo->getReevooApi();
64
- $sku = array();
65
- $total = '';
66
- foreach ($collection as $order) {
67
- $total = $order->getBaseGrandTotal();
68
- foreach ($order->getAllVisibleItems() as $item) {
69
- $sku[] = $item->getSku();
70
- }
71
- }
72
- $reevooMark->purchaseTrackingEvent(array("skus" => implode(',', $sku), "value" => $total));
73
- } catch (Exception $e) {
74
- Mage::logException($e);
75
- }
76
- }
77
-
78
- public function _getPropensityTracking($sku = false, $trackingMessage = 'Product Page') {
79
- try {
80
- $_reevoo = Mage::helper('reevoo/api');
81
- if ($_reevoo->getStatus() === false) {
82
- return false;
83
- }
84
- $reevooMark = $_reevoo->getReevooApi();
85
- if ($sku !== false) {
86
- $reevooMark->propensityToBuyTrackingEvent(array("action" => $trackingMessage, "sku" => $sku));
87
- } else {
88
- $reevooMark->propensityToBuyTrackingEvent(array("action" => $trackingMessage));
89
- }
90
- } catch (Exception $e) {
91
- Mage::logException($e);
92
- }
93
- }
94
-
95
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Tracking extends Mage_Core_Block_Template {
24
+
25
+ public function getStatus() {
26
+ try {
27
+ return Mage::getStoreConfig('reevoo_setup/reevoo_status/status', Mage::app()->getStore());
28
+ } catch (Exception $e) {
29
+ Mage::logException($e);
30
+ }
31
+ }
32
+
33
+ public function getExperience() {
34
+ try {
35
+ $_reevoo = Mage::helper('reevoo/api');
36
+ if ($_reevoo->getStatus() === false) {
37
+ return false;
38
+ }
39
+ return $_reevoo->getReevooApi();
40
+ } catch (Exception $e) {
41
+ Mage::logException($e);
42
+ }
43
+ }
44
+
45
+ /*
46
+ * Returns executes purchase tracking on final event.
47
+ * @return null.
48
+ */
49
+
50
+ public function _getTrackingPurchase() {
51
+ try {
52
+ $orderIds = $this->getOrderData();
53
+ if (empty($orderIds) || !is_array($orderIds)) {
54
+ return;
55
+ }
56
+ $collection = Mage::getResourceModel('sales/order_collection')
57
+ ->addFieldToFilter('entity_id', array('in' => $orderIds));
58
+
59
+ $_reevoo = Mage::helper('reevoo/api');
60
+ if ($_reevoo->getStatus() === false) {
61
+ return false;
62
+ }
63
+ $reevooMark = $_reevoo->getReevooApi();
64
+ $sku = array();
65
+ $total = '';
66
+ foreach ($collection as $order) {
67
+ $total = $order->getBaseGrandTotal();
68
+ foreach ($order->getAllVisibleItems() as $item) {
69
+ $sku[] = $item->getSku();
70
+ }
71
+ }
72
+ $reevooMark->purchaseTrackingEvent(array("skus" => implode(',', $sku), "value" => $total));
73
+ } catch (Exception $e) {
74
+ Mage::logException($e);
75
+ }
76
+ }
77
+
78
+ public function _getPropensityTracking($sku = false, $trackingMessage = 'Product Page') {
79
+ try {
80
+ $_reevoo = Mage::helper('reevoo/api');
81
+ if ($_reevoo->getStatus() === false) {
82
+ return false;
83
+ }
84
+ $reevooMark = $_reevoo->getReevooApi();
85
+ if ($sku !== false) {
86
+ $reevooMark->propensityToBuyTrackingEvent(array("action" => $trackingMessage, "sku" => $sku));
87
+ } else {
88
+ $reevooMark->propensityToBuyTrackingEvent(array("action" => $trackingMessage));
89
+ }
90
+ } catch (Exception $e) {
91
+ Mage::logException($e);
92
+ }
93
+ }
94
+
95
+ }
app/code/local/EComHut/Reevoo/Block/Widget/Customerexperience.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Widget_Customerexperience extends EComHut_Reevoo_Block_Customerexperience implements Mage_Widget_Block_Interface {
24
-
25
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Widget_Customerexperience extends EComHut_Reevoo_Block_Customerexperience implements Mage_Widget_Block_Interface {
24
+
25
+ }
app/code/local/EComHut/Reevoo/Block/Widget/Overallserviceratingbadge.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Widget_Overallserviceratingbadge extends EComHut_Reevoo_Block_Customerexperience implements Mage_Widget_Block_Interface {
24
-
25
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Widget_Overallserviceratingbadge extends EComHut_Reevoo_Block_Customerexperience implements Mage_Widget_Block_Interface {
24
+
25
+ }
app/code/local/EComHut/Reevoo/Block/Widget/Standard.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Block_Widget_Standard extends EComHut_Reevoo_Block_Standard implements Mage_Widget_Block_Interface {
24
-
25
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Block_Widget_Standard extends EComHut_Reevoo_Block_Standard implements Mage_Widget_Block_Interface {
24
+
25
+ }
app/code/local/EComHut/Reevoo/Helper/Api.php CHANGED
@@ -1,123 +1,123 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Helper_Api extends Mage_Core_Helper_Abstract {
24
- /*
25
- * Initializes class ReevooMark and returns the class as object.
26
- * @param string $trkrefs (optional) tracking reference.
27
- * @param string $cache_path (optional) path for cache.
28
- * @return Class object for ReevooMark;
29
- */
30
-
31
- private $_resource;
32
-
33
- public function getReevooApi($trkrefs = '', $cache_path = '') {
34
- try {
35
- if ($this->getStatus() === false) {
36
- return false;
37
- }
38
- /**
39
- if (isset($this->_resource) && is_a($this->_resource, 'ReevooMark')) {
40
- return $this->_resource;
41
- }
42
- /* */
43
- if (strlen($trkrefs) < 1) {
44
- $trkrefs = $this->getValue('tracking_reference'); //Mage::getStoreConfig('reevoo_setup/reevoo_status/tracking_reference');
45
- }
46
- if (strlen($cache_path) < 1) {
47
- $cache_path = Mage::getBaseDir('cache');
48
- }
49
- require_once(Mage::getBaseDir('lib') . DS . "Reevoo" . DS . "reevoo_mark.php");
50
- return $this->_resource = new ReevooMark($trkrefs, $cache_path);
51
- } catch (Exception $e) {
52
- Mage::logException($e);
53
- }
54
- }
55
-
56
- const CONFIG_PATH = 'reevoo_setup/reevoo_status/';
57
-
58
- /*
59
- * Returns full status of API (after verifying extension status
60
- * @return true or false based on admin setting.
61
- */
62
-
63
- function getStatus() {
64
- try {
65
- $reevoo_status = $this->getValue('status');
66
- if ($reevoo_status) {
67
- return true;
68
- }
69
- return false;
70
- } catch (Exception $e) {
71
- Mage::logException($e);
72
- }
73
- }
74
-
75
- /*
76
- * Returns configuration value.
77
- * @param string $req value name to acquire the configuration value.
78
- * @param string $custom parent reference if its not related to API.
79
- * @return value of inquired configuration.
80
- */
81
-
82
- function getValue($req, $custom = false) {
83
- try {
84
- if ($custom === false) {
85
- $custom = self::CONFIG_PATH;
86
- }
87
- return Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
88
- } catch (Exception $e) {
89
- Mage::logException($e);
90
- }
91
- }
92
-
93
- /*
94
- * Returns configuration value from multiselect field.
95
- * @param string $req value name to acquire the configuration value.
96
- * @param string $custom parent reference if its not related to API.
97
- * @param string $questioned i.e. which one to check.
98
- * @return value of inquired configuration.
99
- */
100
-
101
- function getMultiSelectValue($req, $custom = false, $questioned = false) {
102
- try {
103
- if ($custom === false) {
104
- $custom = self::CONFIG_PATH;
105
- }
106
- $value = Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
107
- if (strlen($value) > 0) {
108
- $value = explode(",", $value);
109
- }
110
- if (is_array($value) && count($value) > 0) {
111
- foreach ($value as $output) {
112
- if ($output == $questioned) {
113
- return true;
114
- }
115
- }
116
- }
117
- return false;
118
- } catch (Exception $e) {
119
- Mage::logException($e);
120
- }
121
- }
122
-
123
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Helper_Api extends Mage_Core_Helper_Abstract {
24
+ /*
25
+ * Initializes class ReevooMark and returns the class as object.
26
+ * @param string $trkrefs (optional) tracking reference.
27
+ * @param string $cache_path (optional) path for cache.
28
+ * @return Class object for ReevooMark;
29
+ */
30
+
31
+ private $_resource;
32
+
33
+ public function getReevooApi($trkrefs = '', $cache_path = '') {
34
+ try {
35
+ if ($this->getStatus() === false) {
36
+ return false;
37
+ }
38
+ /**
39
+ if (isset($this->_resource) && is_a($this->_resource, 'ReevooMark')) {
40
+ return $this->_resource;
41
+ }
42
+ /* */
43
+ if (strlen($trkrefs) < 1) {
44
+ $trkrefs = $this->getValue('tracking_reference'); //Mage::getStoreConfig('reevoo_setup/reevoo_status/tracking_reference');
45
+ }
46
+ if (strlen($cache_path) < 1) {
47
+ $cache_path = Mage::getBaseDir('cache');
48
+ }
49
+ require_once(Mage::getBaseDir('lib') . DS . "Reevoo" . DS . "reevoo_mark.php");
50
+ return $this->_resource = new ReevooMark($trkrefs, $cache_path);
51
+ } catch (Exception $e) {
52
+ Mage::logException($e);
53
+ }
54
+ }
55
+
56
+ const CONFIG_PATH = 'reevoo_setup/reevoo_status/';
57
+
58
+ /*
59
+ * Returns full status of API (after verifying extension status
60
+ * @return true or false based on admin setting.
61
+ */
62
+
63
+ function getStatus() {
64
+ try {
65
+ $reevoo_status = $this->getValue('status');
66
+ if ($reevoo_status) {
67
+ return true;
68
+ }
69
+ return false;
70
+ } catch (Exception $e) {
71
+ Mage::logException($e);
72
+ }
73
+ }
74
+
75
+ /*
76
+ * Returns configuration value.
77
+ * @param string $req value name to acquire the configuration value.
78
+ * @param string $custom parent reference if its not related to API.
79
+ * @return value of inquired configuration.
80
+ */
81
+
82
+ function getValue($req, $custom = false) {
83
+ try {
84
+ if ($custom === false) {
85
+ $custom = self::CONFIG_PATH;
86
+ }
87
+ return Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
88
+ } catch (Exception $e) {
89
+ Mage::logException($e);
90
+ }
91
+ }
92
+
93
+ /*
94
+ * Returns configuration value from multiselect field.
95
+ * @param string $req value name to acquire the configuration value.
96
+ * @param string $custom parent reference if its not related to API.
97
+ * @param string $questioned i.e. which one to check.
98
+ * @return value of inquired configuration.
99
+ */
100
+
101
+ function getMultiSelectValue($req, $custom = false, $questioned = false) {
102
+ try {
103
+ if ($custom === false) {
104
+ $custom = self::CONFIG_PATH;
105
+ }
106
+ $value = Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
107
+ if (strlen($value) > 0) {
108
+ $value = explode(",", $value);
109
+ }
110
+ if (is_array($value) && count($value) > 0) {
111
+ foreach ($value as $output) {
112
+ if ($output == $questioned) {
113
+ return true;
114
+ }
115
+ }
116
+ }
117
+ return false;
118
+ } catch (Exception $e) {
119
+ Mage::logException($e);
120
+ }
121
+ }
122
+
123
+ }
app/code/local/EComHut/Reevoo/Helper/Data.php CHANGED
@@ -1,377 +1,377 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Helper_Data extends Mage_Core_Helper_Abstract {
24
-
25
- private $_productslist;
26
- private $_attributes;
27
-
28
- /*
29
- * Returns Products collections
30
- * @return $_productCollection
31
- */
32
-
33
- private function _getProducts() {
34
- try {
35
- if (!Mage::getStoreConfig('reevoo_setup/reevoo_status/status')) {
36
- return false;
37
- }
38
- if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) { // store level
39
- $store_id = Mage::getModel('core/store')->load($code)->getId();
40
- } elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) { // website level
41
- $website_id = Mage::getModel('core/website')->load($code)->getId();
42
- $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
43
- } else { // default level
44
- $store_id = Mage::app()->getRequest()->getParam('store', 1);
45
- }
46
- $_productCollection = Mage::getModel('catalog/product')->getCollection()->setStoreId($store_id)
47
- ->addAttributeToSelect('*');
48
- if (Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_delta')) {
49
- $to = date('Y-m-d H:i:s');
50
- $lastTime = strtotime(Mage::getModel('reevoo/data')->getLastProductFeedDate());
51
- $from = date('Y-m-d H:i:s', $lastTime);
52
- $_productCollection->addAttributeToFilter('updated_at', array('from' => $from, 'to' => $to));
53
- }
54
- $_productCollection->addFinalPrice()->getSelect();
55
-
56
- Mage::getModel('review/review')->appendSummary($_productCollection);
57
- if ($_productCollection->count()):
58
- return $this->_processProducts($_productCollection);
59
- endif;
60
- } catch (Exception $e) {
61
- Mage::logException($e);
62
- }
63
- }
64
-
65
- /*
66
- * Processes product collection for fixing the product relationship.
67
- * @param object $_productCollection object of product collection list.
68
- * @return Finalized and prepared collection of orders.
69
- */
70
-
71
- private function _processProducts($_productCollection) {
72
- $i = 1;
73
- try {
74
- if (count($_productCollection) > 0) {
75
- $ddata[0] = array_merge($this->getAttributes(), Mage::helper('reevoo/producthelper')->extraIndexes());
76
- ksort($ddata[0]);
77
- $ddata[0] = array_change_key_case($ddata[0], CASE_UPPER);
78
- foreach ($_productCollection as $product) {
79
- $ddata[$i] = $this->_fixAttibuteComplication($product, $i);
80
- $i++;
81
- }
82
- return $ddata;
83
- }
84
- } catch (Exception $e) {
85
- Mage::logException($e);
86
- }
87
- }
88
-
89
- /*
90
- * Fixes attribute complications from individual products. Also sorts limited attributes for final data.
91
- * @param object $product (pass by reference) Individual Product object from product collection.
92
- * @return Corrected attributes associative array with products.
93
- */
94
-
95
- private function _fixAttibuteComplication(&$product) {
96
- try {
97
- $ddata = $product->getData();
98
- unset($ddata['stock_item']);
99
- unset($ddata['media_gallery']);
100
- unset($ddata['group_price']);
101
- unset($ddata['tier_price']);
102
- if (isset($ddata['rating_summary'])) {
103
- foreach ($product->getRatingSummary()->getData() as $k => $r) {
104
- $ddata['rating_summary_' . $k] = $r;
105
- }
106
- unset($ddata['rating_summary']);
107
- }
108
-
109
- if (isset($ddata['stock_item'])) {
110
- foreach ($product->getStockItem()->getData() as $k => $st) {
111
- $ddata[$k] = $st;
112
- }
113
- }
114
- if (strlen((string) Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_defaultimage')) > 1) {
115
- if (isset($ddata[Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_defaultimage')])) {
116
- $ddata['IMAGE_URL'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $ddata[Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_defaultimage')];
117
- }
118
- } else {
119
- if (isset($ddata['image'])) {
120
- $ddata['IMAGE_URL'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();
121
- }
122
- }
123
- $ddata['PRODUCT_CATEGORY'] = $product->getCategoryIds();
124
- if (count($ddata['PRODUCT_CATEGORY'])) {
125
- $ddata['PRODUCT_CATEGORY'] = $this->_getParentCategoires($ddata['PRODUCT_CATEGORY']);
126
- } else {
127
- $ddata['PRODUCT_CATEGORY'] = '';
128
- }
129
- $ddata = array_change_key_case($ddata, CASE_UPPER);
130
- return $ddata;
131
- } catch (Exception $e) {
132
- Mage::logException($e);
133
- }
134
- }
135
-
136
- /*
137
- * Processes and fixes categories by passing individual category to loop.
138
- * @param array $ids ID array of categories list.
139
- * @param string $glue glue for merging/ differenciate a full index of category.
140
- * @return Prepared categories list/names as string.
141
- */
142
-
143
- private function _getParentCategoires($ids, $glue = ' | ') {
144
- $finalName = '';
145
- try {
146
- if (is_array($ids)) {
147
- foreach ($ids as $cats) {
148
- //$cat = $this->_getCatName($cats);
149
- $paths = Mage::getModel('catalog/category')->load($cats)->getPath();
150
- $catsAll = explode('/', $paths);
151
- $finalName .= $this->_getCategoryNameProcessed($catsAll) . $glue;
152
- }
153
- return substr($finalName, 0, -3);
154
- } else {
155
- return (string) Mage::getModel('catalog/category')->load($ids)->getName();
156
- }
157
- } catch (Exception $e) {
158
- Mage::logException($e);
159
- }
160
- }
161
-
162
- /*
163
- * Returns prepared category names including parent categories (i.e. pipe signed attributes.)
164
- * @param string $debug (optional) if true, will return all of the collection data for debugging purposes..
165
- * @return Finalized and prepared collection of orders.
166
- */
167
-
168
- private function _getCategoryNameProcessed($cats, $embedd = ' > ') {
169
- try {
170
- if (is_array($cats) && count($cats) > 0) {
171
- $rootid = Mage::app()->getStore()->getRootCategoryId();
172
- $data = '';
173
- foreach ($cats as $ids) {
174
- if ($ids != $rootid) {
175
- $name = Mage::getModel('catalog/category')->load($ids)->getName();
176
- if (strlen(trim($name)) > 1) { // This is to avoid empty names added to category name
177
- $data .= $name . $embedd;
178
- }
179
- }
180
- }
181
- return substr($data, 0, -3);
182
- } else {
183
- return (string) Mage::getModel('catalog/category')->load($cats)->getName();
184
- }
185
- } catch (Exception $e) {
186
- Mage::logException($e);
187
- }
188
- }
189
-
190
- /*
191
- * Returns finalized and prepared purchase collection of purchases.
192
- * @return Finalized and prepared collection of purchase feed.
193
- */
194
-
195
- public function getPurchases() {
196
- try {
197
- $_helper = Mage::helper('reevoo/purchasehelper');
198
- return $_helper->getPurchases();
199
- } catch (Exception $e) {
200
- Mage::logException($e);
201
- }
202
- }
203
-
204
- /*
205
- * Fetches all product attributes (including system/ product).
206
- * @return List of fetched attributes.
207
- */
208
-
209
- public function getAttributes() {
210
-
211
- if (isset($this->_attributes) && is_array($this->_attributes)) {
212
- return $this->_attributes;
213
- }
214
-
215
- try {
216
- $attributes = Mage::getModel('catalog/product')->getAttributes();
217
- $attributeArray = array();
218
-
219
- foreach ($attributes as $a) {
220
- foreach ($a->getEntityType()->getAttributeCodes() as $attributeName) {
221
- $attributeArray[$attributeName] = $attributeName;
222
- }
223
- break;
224
- }
225
- ksort($attributeArray);
226
- return $this->_attributes = $attributeArray;
227
- } catch (Exception $e) {
228
- Mage::logException($e);
229
- }
230
- }
231
-
232
- /*
233
- * Returns finalized and prepared products collection.
234
- * @return Finalized and prepared associative array with collection of products.
235
- */
236
-
237
- public function getProducts() {
238
- try {
239
- if (!Mage::getStoreConfig('reevoo_setup/reevoo_status/status')) {
240
- return false;
241
- }
242
- if (isset($this->_productslist) && count($this->_productslist) > 0) {
243
- return $this->_productslist;
244
- }
245
- $products = $this->_getProducts();
246
- $data = $this->processParents($products); // Going to add parents.
247
-
248
- $_productHelper = Mage::helper('reevoo/producthelper');
249
- $this->_productslist = $_productHelper->removeAttributes($_productHelper->fixindexes($data));
250
- return $this->_productslist;
251
- } catch (Exception $e) {
252
- Mage::logException($e);
253
- }
254
- }
255
-
256
- /*
257
- * Adds parent products if there is any.
258
- * @param array $data products array
259
- * @returns array with added parent products into it.
260
- */
261
-
262
- public function processParents($data) {
263
- try {
264
- $finalData = array();
265
- if (count($data) > 0) {
266
- $_helper = Mage::helper('reevoo/producthelper'); //checkIfParentExists();
267
- foreach ($data as $key => $value) {
268
- $parent = $_helper->checkIfParentExists(@$value['ENTITY_ID']);
269
- if ($parent !== false) {
270
- $finalData[$key] = $this->mergeParents($data[$key], $this->_fixAttibuteComplication($parent), $data[0]);
271
- //$finalData[$key]['MASTER_PRODUCT'] = $this->_fixAttibuteComplication($parent);
272
- } else {
273
- $finalData[$key] = $value;
274
- $finalData[$key]['MASTER_PRODUCT_ID'] = $value['SKU'];
275
- }
276
- }
277
- }
278
- return $finalData;
279
- } catch (Exception $e) {
280
- Mage::logException($e);
281
- }
282
- }
283
-
284
- /*
285
- * Relates and merge parent products.
286
- * @param array $mainProduct main product which is going to be merged in parent.
287
- * @param array $parent parent product
288
- * @param array $attributes product attributes list (to fill empty attributes)
289
- * @return Finalized and prepared product collection.
290
- */
291
-
292
- public function mergeParents($mainProduct, $parent, $attributes) {
293
- try {
294
- $_helper = Mage::helper('reevoo/producthelper');
295
- $finalData = array();
296
- $mainProduct = $_helper->confirmIndexes($mainProduct, $attributes);
297
- $parent = $_helper->confirmIndexes($parent, $attributes);
298
- foreach ($mainProduct as $key => $value) {
299
- if (strlen($value) < 1) {
300
- $mainProduct[$key] = $parent[$key];
301
- }
302
- $finalData = $mainProduct;
303
- }
304
- $finalData['MASTER_PRODUCT_ID'] = $parent['SKU'];
305
- return $finalData;
306
- } catch (Exception $e) {
307
- Mage::logException($e);
308
- }
309
- }
310
-
311
- /*
312
- * Returns full folder and file name of prepared csv file.
313
- * @param array $data associative product data array for csv preparation.
314
- * @param string $filename Filename we want to create with csv data.
315
- * @return system folder and file path of csv file.
316
- */
317
-
318
- public function saveProductsCsv($data, $filename = '') {
319
- try {
320
- if (strlen($filename) < 1) {
321
- $dt = date('Ymd_Gi');
322
- $filename = "productexportfeed_" . $dt . ".csv";
323
- }
324
- $folder = Mage::getBaseDir('var') . DS . 'Revoo_Feeds';
325
- try {
326
- if (!is_dir($folder)) {
327
- mkdir($folder, 0755, true);
328
- }
329
- Mage::helper('reevoo/producthelper')->generateCsv($folder . DS . $filename, $data);
330
- return $folder . DS . $filename;
331
- } catch (Exception $e) {
332
- Mage::logException($e);
333
- }
334
- } catch (Exception $e) {
335
- Mage::logException($e);
336
- }
337
- }
338
-
339
- /*
340
- * returns purchase orders associative array.
341
- * @param boolean $debug (optional) if true, will return all of the collection data for debugging purposes..
342
- * @return Finalized and prepared associated array with collection of orders.
343
- */
344
-
345
- public function getPurchaseOrders($debug = false) {
346
- try {
347
- return Mage::helper('reevoo/purchasehelper')->getPurchases($debug);
348
- } catch (Exception $e) {
349
- Mage::logException($e);
350
- }
351
- }
352
-
353
- /*
354
- * Returns full folder and file name of prepared csv file.
355
- * @param array $data associative product data array for csv preparation.
356
- * @param string $filename Filename we want to create with csv data.
357
- * @return system folder and file path of csv file.
358
- */
359
-
360
- public function savePurchaseOrdersCsv($data, $filename = '') {
361
- if (strlen($filename) < 1) {
362
- $dt = date('Ymd_Gi');
363
- $filename = "purchaserexportfeed_" . $dt . ".csv";
364
- }
365
- $folder = Mage::getBaseDir('var') . DS . 'Revoo_Feeds';
366
- try {
367
- if (!is_dir($folder)) {
368
- mkdir($folder, 0755, true);
369
- }
370
- Mage::helper('reevoo/producthelper')->generateCsv($folder . DS . $filename, $data, false);
371
- return $folder . DS . $filename;
372
- } catch (Exception $e) {
373
- Mage::logException($e);
374
- }
375
- }
376
-
377
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Helper_Data extends Mage_Core_Helper_Abstract {
24
+
25
+ private $_productslist;
26
+ private $_attributes;
27
+
28
+ /*
29
+ * Returns Products collections
30
+ * @return $_productCollection
31
+ */
32
+
33
+ private function _getProducts() {
34
+ try {
35
+ if (!Mage::getStoreConfig('reevoo_setup/reevoo_status/status')) {
36
+ return false;
37
+ }
38
+ if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) { // store level
39
+ $store_id = Mage::getModel('core/store')->load($code)->getId();
40
+ } elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) { // website level
41
+ $website_id = Mage::getModel('core/website')->load($code)->getId();
42
+ $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
43
+ } else { // default level
44
+ $store_id = Mage::app()->getRequest()->getParam('store', 1);
45
+ }
46
+ $_productCollection = Mage::getModel('catalog/product')->getCollection()->setStoreId($store_id)
47
+ ->addAttributeToSelect('*');
48
+ if (Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_delta')) {
49
+ $to = date('Y-m-d H:i:s');
50
+ $lastTime = strtotime(Mage::getModel('reevoo/data')->getLastProductFeedDate());
51
+ $from = date('Y-m-d H:i:s', $lastTime);
52
+ $_productCollection->addAttributeToFilter('updated_at', array('from' => $from, 'to' => $to));
53
+ }
54
+ $_productCollection->addFinalPrice()->getSelect();
55
+
56
+ Mage::getModel('review/review')->appendSummary($_productCollection);
57
+ if ($_productCollection->count()):
58
+ return $this->_processProducts($_productCollection);
59
+ endif;
60
+ } catch (Exception $e) {
61
+ Mage::logException($e);
62
+ }
63
+ }
64
+
65
+ /*
66
+ * Processes product collection for fixing the product relationship.
67
+ * @param object $_productCollection object of product collection list.
68
+ * @return Finalized and prepared collection of orders.
69
+ */
70
+
71
+ private function _processProducts($_productCollection) {
72
+ $i = 1;
73
+ try {
74
+ if (count($_productCollection) > 0) {
75
+ $ddata[0] = array_merge($this->getAttributes(), Mage::helper('reevoo/producthelper')->extraIndexes());
76
+ ksort($ddata[0]);
77
+ $ddata[0] = array_change_key_case($ddata[0], CASE_UPPER);
78
+ foreach ($_productCollection as $product) {
79
+ $ddata[$i] = $this->_fixAttibuteComplication($product, $i);
80
+ $i++;
81
+ }
82
+ return $ddata;
83
+ }
84
+ } catch (Exception $e) {
85
+ Mage::logException($e);
86
+ }
87
+ }
88
+
89
+ /*
90
+ * Fixes attribute complications from individual products. Also sorts limited attributes for final data.
91
+ * @param object $product (pass by reference) Individual Product object from product collection.
92
+ * @return Corrected attributes associative array with products.
93
+ */
94
+
95
+ private function _fixAttibuteComplication(&$product) {
96
+ try {
97
+ $ddata = $product->getData();
98
+ unset($ddata['stock_item']);
99
+ unset($ddata['media_gallery']);
100
+ unset($ddata['group_price']);
101
+ unset($ddata['tier_price']);
102
+ if (isset($ddata['rating_summary'])) {
103
+ foreach ($product->getRatingSummary()->getData() as $k => $r) {
104
+ $ddata['rating_summary_' . $k] = $r;
105
+ }
106
+ unset($ddata['rating_summary']);
107
+ }
108
+
109
+ if (isset($ddata['stock_item'])) {
110
+ foreach ($product->getStockItem()->getData() as $k => $st) {
111
+ $ddata[$k] = $st;
112
+ }
113
+ }
114
+ if (strlen((string) Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_defaultimage')) > 1) {
115
+ if (isset($ddata[Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_defaultimage')])) {
116
+ $ddata['IMAGE_URL'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $ddata[Mage::getStoreConfig('reevoo_setup/reevoo_ftp/productfeed_defaultimage')];
117
+ }
118
+ } else {
119
+ if (isset($ddata['image'])) {
120
+ $ddata['IMAGE_URL'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();
121
+ }
122
+ }
123
+ $ddata['PRODUCT_CATEGORY'] = $product->getCategoryIds();
124
+ if (count($ddata['PRODUCT_CATEGORY'])) {
125
+ $ddata['PRODUCT_CATEGORY'] = $this->_getParentCategoires($ddata['PRODUCT_CATEGORY']);
126
+ } else {
127
+ $ddata['PRODUCT_CATEGORY'] = '';
128
+ }
129
+ $ddata = array_change_key_case($ddata, CASE_UPPER);
130
+ return $ddata;
131
+ } catch (Exception $e) {
132
+ Mage::logException($e);
133
+ }
134
+ }
135
+
136
+ /*
137
+ * Processes and fixes categories by passing individual category to loop.
138
+ * @param array $ids ID array of categories list.
139
+ * @param string $glue glue for merging/ differenciate a full index of category.
140
+ * @return Prepared categories list/names as string.
141
+ */
142
+
143
+ private function _getParentCategoires($ids, $glue = ' | ') {
144
+ $finalName = '';
145
+ try {
146
+ if (is_array($ids)) {
147
+ foreach ($ids as $cats) {
148
+ //$cat = $this->_getCatName($cats);
149
+ $paths = Mage::getModel('catalog/category')->load($cats)->getPath();
150
+ $catsAll = explode('/', $paths);
151
+ $finalName .= $this->_getCategoryNameProcessed($catsAll) . $glue;
152
+ }
153
+ return substr($finalName, 0, -3);
154
+ } else {
155
+ return (string) Mage::getModel('catalog/category')->load($ids)->getName();
156
+ }
157
+ } catch (Exception $e) {
158
+ Mage::logException($e);
159
+ }
160
+ }
161
+
162
+ /*
163
+ * Returns prepared category names including parent categories (i.e. pipe signed attributes.)
164
+ * @param string $debug (optional) if true, will return all of the collection data for debugging purposes..
165
+ * @return Finalized and prepared collection of orders.
166
+ */
167
+
168
+ private function _getCategoryNameProcessed($cats, $embedd = ' > ') {
169
+ try {
170
+ if (is_array($cats) && count($cats) > 0) {
171
+ $rootid = Mage::app()->getStore()->getRootCategoryId();
172
+ $data = '';
173
+ foreach ($cats as $ids) {
174
+ if ($ids != $rootid) {
175
+ $name = Mage::getModel('catalog/category')->load($ids)->getName();
176
+ if (strlen(trim($name)) > 1) { // This is to avoid empty names added to category name
177
+ $data .= $name . $embedd;
178
+ }
179
+ }
180
+ }
181
+ return substr($data, 0, -3);
182
+ } else {
183
+ return (string) Mage::getModel('catalog/category')->load($cats)->getName();
184
+ }
185
+ } catch (Exception $e) {
186
+ Mage::logException($e);
187
+ }
188
+ }
189
+
190
+ /*
191
+ * Returns finalized and prepared purchase collection of purchases.
192
+ * @return Finalized and prepared collection of purchase feed.
193
+ */
194
+
195
+ public function getPurchases() {
196
+ try {
197
+ $_helper = Mage::helper('reevoo/purchasehelper');
198
+ return $_helper->getPurchases();
199
+ } catch (Exception $e) {
200
+ Mage::logException($e);
201
+ }
202
+ }
203
+
204
+ /*
205
+ * Fetches all product attributes (including system/ product).
206
+ * @return List of fetched attributes.
207
+ */
208
+
209
+ public function getAttributes() {
210
+
211
+ if (isset($this->_attributes) && is_array($this->_attributes)) {
212
+ return $this->_attributes;
213
+ }
214
+
215
+ try {
216
+ $attributes = Mage::getModel('catalog/product')->getAttributes();
217
+ $attributeArray = array();
218
+
219
+ foreach ($attributes as $a) {
220
+ foreach ($a->getEntityType()->getAttributeCodes() as $attributeName) {
221
+ $attributeArray[$attributeName] = $attributeName;
222
+ }
223
+ break;
224
+ }
225
+ ksort($attributeArray);
226
+ return $this->_attributes = $attributeArray;
227
+ } catch (Exception $e) {
228
+ Mage::logException($e);
229
+ }
230
+ }
231
+
232
+ /*
233
+ * Returns finalized and prepared products collection.
234
+ * @return Finalized and prepared associative array with collection of products.
235
+ */
236
+
237
+ public function getProducts() {
238
+ try {
239
+ if (!Mage::getStoreConfig('reevoo_setup/reevoo_status/status')) {
240
+ return false;
241
+ }
242
+ if (isset($this->_productslist) && count($this->_productslist) > 0) {
243
+ return $this->_productslist;
244
+ }
245
+ $products = $this->_getProducts();
246
+ $data = $this->processParents($products); // Going to add parents.
247
+
248
+ $_productHelper = Mage::helper('reevoo/producthelper');
249
+ $this->_productslist = $_productHelper->removeAttributes($_productHelper->fixindexes($data));
250
+ return $this->_productslist;
251
+ } catch (Exception $e) {
252
+ Mage::logException($e);
253
+ }
254
+ }
255
+
256
+ /*
257
+ * Adds parent products if there is any.
258
+ * @param array $data products array
259
+ * @returns array with added parent products into it.
260
+ */
261
+
262
+ public function processParents($data) {
263
+ try {
264
+ $finalData = array();
265
+ if (count($data) > 0) {
266
+ $_helper = Mage::helper('reevoo/producthelper'); //checkIfParentExists();
267
+ foreach ($data as $key => $value) {
268
+ $parent = $_helper->checkIfParentExists(@$value['ENTITY_ID']);
269
+ if ($parent !== false) {
270
+ $finalData[$key] = $this->mergeParents($data[$key], $this->_fixAttibuteComplication($parent), $data[0]);
271
+ //$finalData[$key]['MASTER_PRODUCT'] = $this->_fixAttibuteComplication($parent);
272
+ } else {
273
+ $finalData[$key] = $value;
274
+ $finalData[$key]['MASTER_PRODUCT_ID'] = $value['SKU'];
275
+ }
276
+ }
277
+ }
278
+ return $finalData;
279
+ } catch (Exception $e) {
280
+ Mage::logException($e);
281
+ }
282
+ }
283
+
284
+ /*
285
+ * Relates and merge parent products.
286
+ * @param array $mainProduct main product which is going to be merged in parent.
287
+ * @param array $parent parent product
288
+ * @param array $attributes product attributes list (to fill empty attributes)
289
+ * @return Finalized and prepared product collection.
290
+ */
291
+
292
+ public function mergeParents($mainProduct, $parent, $attributes) {
293
+ try {
294
+ $_helper = Mage::helper('reevoo/producthelper');
295
+ $finalData = array();
296
+ $mainProduct = $_helper->confirmIndexes($mainProduct, $attributes);
297
+ $parent = $_helper->confirmIndexes($parent, $attributes);
298
+ foreach ($mainProduct as $key => $value) {
299
+ if (strlen($value) < 1) {
300
+ $mainProduct[$key] = $parent[$key];
301
+ }
302
+ $finalData = $mainProduct;
303
+ }
304
+ $finalData['MASTER_PRODUCT_ID'] = $parent['SKU'];
305
+ return $finalData;
306
+ } catch (Exception $e) {
307
+ Mage::logException($e);
308
+ }
309
+ }
310
+
311
+ /*
312
+ * Returns full folder and file name of prepared csv file.
313
+ * @param array $data associative product data array for csv preparation.
314
+ * @param string $filename Filename we want to create with csv data.
315
+ * @return system folder and file path of csv file.
316
+ */
317
+
318
+ public function saveProductsCsv($data, $filename = '') {
319
+ try {
320
+ if (strlen($filename) < 1) {
321
+ $dt = date('Ymd_Gi');
322
+ $filename = "productexportfeed_" . $dt . ".csv";
323
+ }
324
+ $folder = Mage::getBaseDir('var') . DS . 'Revoo_Feeds';
325
+ try {
326
+ if (!is_dir($folder)) {
327
+ mkdir($folder, 0755, true);
328
+ }
329
+ Mage::helper('reevoo/producthelper')->generateCsv($folder . DS . $filename, $data);
330
+ return $folder . DS . $filename;
331
+ } catch (Exception $e) {
332
+ Mage::logException($e);
333
+ }
334
+ } catch (Exception $e) {
335
+ Mage::logException($e);
336
+ }
337
+ }
338
+
339
+ /*
340
+ * returns purchase orders associative array.
341
+ * @param boolean $debug (optional) if true, will return all of the collection data for debugging purposes..
342
+ * @return Finalized and prepared associated array with collection of orders.
343
+ */
344
+
345
+ public function getPurchaseOrders($debug = false) {
346
+ try {
347
+ return Mage::helper('reevoo/purchasehelper')->getPurchases($debug);
348
+ } catch (Exception $e) {
349
+ Mage::logException($e);
350
+ }
351
+ }
352
+
353
+ /*
354
+ * Returns full folder and file name of prepared csv file.
355
+ * @param array $data associative product data array for csv preparation.
356
+ * @param string $filename Filename we want to create with csv data.
357
+ * @return system folder and file path of csv file.
358
+ */
359
+
360
+ public function savePurchaseOrdersCsv($data, $filename = '') {
361
+ if (strlen($filename) < 1) {
362
+ $dt = date('Ymd_Gi');
363
+ $filename = "purchaserexportfeed_" . $dt . ".csv";
364
+ }
365
+ $folder = Mage::getBaseDir('var') . DS . 'Revoo_Feeds';
366
+ try {
367
+ if (!is_dir($folder)) {
368
+ mkdir($folder, 0755, true);
369
+ }
370
+ Mage::helper('reevoo/producthelper')->generateCsv($folder . DS . $filename, $data, false);
371
+ return $folder . DS . $filename;
372
+ } catch (Exception $e) {
373
+ Mage::logException($e);
374
+ }
375
+ }
376
+
377
+ }
app/code/local/EComHut/Reevoo/Helper/Ftp.php CHANGED
@@ -1,194 +1,194 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Helper_Ftp extends Mage_Core_Helper_Abstract {
24
-
25
- const CONFIG_PATH = 'reevoo_setup/reevoo_ftp/';
26
-
27
- public $ftp_status;
28
- public $filename;
29
-
30
- /*
31
- * Returns full status of FTP (after verifying extension status
32
- * @return true or false based on admin setting.
33
- */
34
-
35
- function getStatus() {
36
- try {
37
- $reevoo_status = $this->getValue('status', 'reevoo_setup/reevoo_status/');
38
- $ftp_status = $this->getValue('ftp_status');
39
- if ($reevoo_status && $ftp_status) {
40
- return true;
41
- }
42
- return false;
43
- } catch (Exception $e) {
44
- Mage::logException($e);
45
- }
46
- }
47
-
48
- /*
49
- * Returns configuration value.
50
- * @param string $req value name to acquire the configuration value.
51
- * @param string $custom parent reference if its not related to ftp.
52
- * @return value of inquired configuration.
53
- */
54
-
55
- function getValue($req, $custom = false) {
56
- try {
57
- if ($custom === false) {
58
- $custom = self::CONFIG_PATH;
59
- }
60
- return Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
61
- } catch (Exception $e) {
62
- Mage::logException($e);
63
- }
64
- }
65
-
66
- /*
67
- * Inquire for database and decides which ftp method to choose for FTP.
68
- * @param string $filePath path to file which is expected to be uploaded in ftp connection.
69
- * @return Null/ status of transfer.
70
- */
71
-
72
- function setTransfer($filePath) {
73
- try {
74
- $this->ftp_status = false;
75
- if ($this->getStatus() === false) {
76
- return false;
77
- }
78
- if (!file_exists($filePath)) {
79
- return false; // we escape and do not upload the file if there is no content present.
80
- }
81
- $this->filename = $filePath;
82
- if ($this->getValue('ftp_type') == 'sftp') {
83
- $status = $this->setSftpTransfer($filePath);
84
- } elseif ($this->getValue('ftp_type') == 'ftp') {
85
- $status = $this->setFtpTransfer($filePath);
86
- }
87
- if ($status) {
88
- $this->deleteFileAfterTransfer($this->filename); // Delete the filer in alternative way.
89
- }
90
- return $this->ftp_status = $status;
91
- } catch (Exception $e) {
92
- Mage::logException($e);
93
- }
94
- }
95
-
96
- /*
97
- * Executes FTP transfer.
98
- * @param string $filePath path to file which is expected to be uploaded to server.
99
- * @return Null/ Status of transfer.
100
- */
101
-
102
- function setFtpTransfer($filePath) {
103
- $myhost = $this->getValue('ftp_host');
104
- $port = !$this->getValue('ftp_port') ? 21 : $this->getValue('ftp_port');
105
- $myuser = $this->getValue('ftp_user');
106
- $mypass = $this->getValue('ftp_pass');
107
- $uploadPath = $this->getFtpPath();
108
- $path_parts = pathinfo($filePath);
109
- $uploadName = $uploadPath . $path_parts['basename'];
110
-
111
- try {
112
- $ch = curl_init();
113
- $fp = fopen($filePath, 'r');
114
- curl_setopt($ch, CURLOPT_URL, 'ftp://' . $myhost . ':' . $port . '/' . $uploadName);
115
- curl_setopt($ch, CURLOPT_USERPWD, "$myuser:$mypass");
116
- curl_setopt($ch, CURLOPT_FTP_CREATE_MISSING_DIRS, true); // Create directory.
117
- curl_setopt($ch, CURLOPT_FTP_USE_EPSV, true); // Passive
118
- curl_setopt($ch, CURLOPT_UPLOAD, 1);
119
- curl_setopt($ch, CURLOPT_INFILE, $fp);
120
- curl_setopt($ch, CURLOPT_INFILESIZE, filesize($filePath));
121
- curl_exec($ch);
122
- $error_no = curl_errno($ch);
123
- curl_close($ch);
124
- if ($error_no !== 0) {
125
- Mage::log('File upload error no. ' . $error_no);
126
- return false;
127
- }
128
- return $this->ftp_status = true;
129
- } catch (Exception $e) {
130
- Mage::log($e->getMessage(), Zend_Log::ERR);
131
- }
132
- }
133
-
134
- /*
135
- * Exectutes SFTP transfer.
136
- * @param string $filePath path for file which requires upload
137
- * @return Null/ Status of transfer.
138
- */
139
-
140
- function setSftpTransfer($filePath) {
141
- $myhost = $this->getValue('ftp_host');
142
- $port = !$this->getValue('ftp_port') ? 22 : $this->getValue('ftp_port');
143
- $myuser = $this->getValue('ftp_user');
144
- $mypass = $this->getValue('ftp_pass');
145
- $uploadPath = $this->getFtpPath();
146
- $error = false;
147
- try {
148
- set_include_path(get_include_path() . PATH_SEPARATOR . Mage::getBaseDir('lib') . DS . "phpseclib" . DS);
149
- require_once(Mage::getBaseDir('lib') . DS . "phpseclib" . DS . "Net" . DS . "SFTP.php");
150
- $sftp = new Net_SFTP($myhost, $port, 90);
151
- if (!$sftp->login($myuser, $mypass)) {
152
- Mage::log('SFTP Login Incorrect.');
153
- return false; // escape rest else.
154
- }
155
- $path_parts = pathinfo($filePath);
156
- if (!$sftp->chdir($uploadPath)) {
157
- $sftp->mkdir($uploadPath);
158
- }
159
- $uploadName = $uploadPath . $path_parts['basename'];
160
- $sftp->put($uploadName, $filePath, NET_SFTP_LOCAL_FILE);
161
- return $this->ftp_status = true;
162
- } catch (Exception $e) {
163
- Mage::logException($e);
164
- }
165
- }
166
-
167
- /*
168
- * Processes FTP/SFTP Path as configured in database.
169
- * @return finalized ftp part with trailing slash in the end.
170
- */
171
-
172
- function getFtpPath() {
173
- $uploadPath = $this->getValue('ftp_path');
174
- if (substr("$uploadPath", -1) == "/") { // returns last string.
175
- return $uploadPath;
176
- }
177
- return $uploadPath . "/";
178
- }
179
-
180
- /*
181
- * Delete file from server once file is uploaded.
182
- * @return Null.
183
- */
184
-
185
- function deleteFileAfterTransfer($file) {
186
- $_helper = Mage::getModel('reevoo/data');
187
- if (unlink($file)) {
188
- $_helper->saveLog('cron_log', 'deleteFileAfterTransfer', "Unlink file successful: " . $file);
189
- } else {
190
- $_helper->saveLog('cron_log', 'deleteFileAfterTransfer', "Unlink file permission denied: " . $file);
191
- }
192
- }
193
-
194
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Helper_Ftp extends Mage_Core_Helper_Abstract {
24
+
25
+ const CONFIG_PATH = 'reevoo_setup/reevoo_ftp/';
26
+
27
+ public $ftp_status;
28
+ public $filename;
29
+
30
+ /*
31
+ * Returns full status of FTP (after verifying extension status
32
+ * @return true or false based on admin setting.
33
+ */
34
+
35
+ function getStatus() {
36
+ try {
37
+ $reevoo_status = $this->getValue('status', 'reevoo_setup/reevoo_status/');
38
+ $ftp_status = $this->getValue('ftp_status');
39
+ if ($reevoo_status && $ftp_status) {
40
+ return true;
41
+ }
42
+ return false;
43
+ } catch (Exception $e) {
44
+ Mage::logException($e);
45
+ }
46
+ }
47
+
48
+ /*
49
+ * Returns configuration value.
50
+ * @param string $req value name to acquire the configuration value.
51
+ * @param string $custom parent reference if its not related to ftp.
52
+ * @return value of inquired configuration.
53
+ */
54
+
55
+ function getValue($req, $custom = false) {
56
+ try {
57
+ if ($custom === false) {
58
+ $custom = self::CONFIG_PATH;
59
+ }
60
+ return Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
61
+ } catch (Exception $e) {
62
+ Mage::logException($e);
63
+ }
64
+ }
65
+
66
+ /*
67
+ * Inquire for database and decides which ftp method to choose for FTP.
68
+ * @param string $filePath path to file which is expected to be uploaded in ftp connection.
69
+ * @return Null/ status of transfer.
70
+ */
71
+
72
+ function setTransfer($filePath) {
73
+ try {
74
+ $this->ftp_status = false;
75
+ if ($this->getStatus() === false) {
76
+ return false;
77
+ }
78
+ if (!file_exists($filePath)) {
79
+ return false; // we escape and do not upload the file if there is no content present.
80
+ }
81
+ $this->filename = $filePath;
82
+ if ($this->getValue('ftp_type') == 'sftp') {
83
+ $status = $this->setSftpTransfer($filePath);
84
+ } elseif ($this->getValue('ftp_type') == 'ftp') {
85
+ $status = $this->setFtpTransfer($filePath);
86
+ }
87
+ if ($status) {
88
+ $this->deleteFileAfterTransfer($this->filename); // Delete the filer in alternative way.
89
+ }
90
+ return $this->ftp_status = $status;
91
+ } catch (Exception $e) {
92
+ Mage::logException($e);
93
+ }
94
+ }
95
+
96
+ /*
97
+ * Executes FTP transfer.
98
+ * @param string $filePath path to file which is expected to be uploaded to server.
99
+ * @return Null/ Status of transfer.
100
+ */
101
+
102
+ function setFtpTransfer($filePath) {
103
+ $myhost = $this->getValue('ftp_host');
104
+ $port = !$this->getValue('ftp_port') ? 21 : $this->getValue('ftp_port');
105
+ $myuser = $this->getValue('ftp_user');
106
+ $mypass = $this->getValue('ftp_pass');
107
+ $uploadPath = $this->getFtpPath();
108
+ $path_parts = pathinfo($filePath);
109
+ $uploadName = $uploadPath . $path_parts['basename'];
110
+
111
+ try {
112
+ $ch = curl_init();
113
+ $fp = fopen($filePath, 'r');
114
+ curl_setopt($ch, CURLOPT_URL, 'ftp://' . $myhost . ':' . $port . '/' . $uploadName);
115
+ curl_setopt($ch, CURLOPT_USERPWD, "$myuser:$mypass");
116
+ curl_setopt($ch, CURLOPT_FTP_CREATE_MISSING_DIRS, true); // Create directory.
117
+ curl_setopt($ch, CURLOPT_FTP_USE_EPSV, true); // Passive
118
+ curl_setopt($ch, CURLOPT_UPLOAD, 1);
119
+ curl_setopt($ch, CURLOPT_INFILE, $fp);
120
+ curl_setopt($ch, CURLOPT_INFILESIZE, filesize($filePath));
121
+ curl_exec($ch);
122
+ $error_no = curl_errno($ch);
123
+ curl_close($ch);
124
+ if ($error_no !== 0) {
125
+ Mage::log('File upload error no. ' . $error_no);
126
+ return false;
127
+ }
128
+ return $this->ftp_status = true;
129
+ } catch (Exception $e) {
130
+ Mage::log($e->getMessage(), Zend_Log::ERR);
131
+ }
132
+ }
133
+
134
+ /*
135
+ * Exectutes SFTP transfer.
136
+ * @param string $filePath path for file which requires upload
137
+ * @return Null/ Status of transfer.
138
+ */
139
+
140
+ function setSftpTransfer($filePath) {
141
+ $myhost = $this->getValue('ftp_host');
142
+ $port = !$this->getValue('ftp_port') ? 22 : $this->getValue('ftp_port');
143
+ $myuser = $this->getValue('ftp_user');
144
+ $mypass = $this->getValue('ftp_pass');
145
+ $uploadPath = $this->getFtpPath();
146
+ $error = false;
147
+ try {
148
+ set_include_path(get_include_path() . PATH_SEPARATOR . Mage::getBaseDir('lib') . DS . "phpseclib" . DS);
149
+ require_once(Mage::getBaseDir('lib') . DS . "phpseclib" . DS . "Net" . DS . "SFTP.php");
150
+ $sftp = new Net_SFTP($myhost, $port, 90);
151
+ if (!$sftp->login($myuser, $mypass)) {
152
+ Mage::log('SFTP Login Incorrect.');
153
+ return false; // escape rest else.
154
+ }
155
+ $path_parts = pathinfo($filePath);
156
+ if (!$sftp->chdir($uploadPath)) {
157
+ $sftp->mkdir($uploadPath);
158
+ }
159
+ $uploadName = $uploadPath . $path_parts['basename'];
160
+ $sftp->put($uploadName, $filePath, NET_SFTP_LOCAL_FILE);
161
+ return $this->ftp_status = true;
162
+ } catch (Exception $e) {
163
+ Mage::logException($e);
164
+ }
165
+ }
166
+
167
+ /*
168
+ * Processes FTP/SFTP Path as configured in database.
169
+ * @return finalized ftp part with trailing slash in the end.
170
+ */
171
+
172
+ function getFtpPath() {
173
+ $uploadPath = $this->getValue('ftp_path');
174
+ if (substr("$uploadPath", -1) == "/") { // returns last string.
175
+ return $uploadPath;
176
+ }
177
+ return $uploadPath . "/";
178
+ }
179
+
180
+ /*
181
+ * Delete file from server once file is uploaded.
182
+ * @return Null.
183
+ */
184
+
185
+ function deleteFileAfterTransfer($file) {
186
+ $_helper = Mage::getModel('reevoo/data');
187
+ if (unlink($file)) {
188
+ $_helper->saveLog('cron_log', 'deleteFileAfterTransfer', "Unlink file successful: " . $file);
189
+ } else {
190
+ $_helper->saveLog('cron_log', 'deleteFileAfterTransfer', "Unlink file permission denied: " . $file);
191
+ }
192
+ }
193
+
194
+ }
app/code/local/EComHut/Reevoo/Helper/Producthelper.php CHANGED
@@ -1,248 +1,248 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Helper_Producthelper extends Mage_Core_Helper_Abstract {
24
- /*
25
- * Returns CSV as string.
26
- * @param array $assocDataArray associative array of expected CSV data.
27
- * @param array $createHeader to select indexes as header of csv. Default off.
28
- * @return CSV as a string.
29
- */
30
-
31
- function stringCsv($assocDataArray, $createHeader = false) {
32
- try {
33
- $data = '';
34
- if (isset($assocDataArray['0'])) {
35
- $fp = fopen("php://output", 'w');
36
- if ($createHeader) {
37
- fputcsv($fp, array_keys($assocDataArray['0']));
38
- }
39
- foreach ($assocDataArray AS $values) {
40
- fputcsv($fp, $values);
41
- }
42
- $data += stream_get_contents($fp);
43
- fclose($fp);
44
- return $data;
45
- }
46
- } catch (Exception $e) {
47
- Mage::logException($e);
48
- }
49
- }
50
-
51
- /*
52
- * Creates CSV at specified path.
53
- * @param array $fileName Where the file is expected to be. Full path can also be used.
54
- * @param array $assocDataArray To create CSV based on.
55
- * @return null.
56
- */
57
-
58
- function generateCsv($fileName, $assocDataArray, $headers = true) {
59
- try {
60
- if (is_array($assocDataArray) && count($assocDataArray) > 0):
61
- $fp = fopen($fileName, 'w');
62
- if ($headers) {
63
- $headers = array_keys($assocDataArray[0]); // custom header
64
- unset($assocDataArray[0]);
65
- fputcsv($fp, $headers); // custom header
66
- }
67
- foreach ($assocDataArray as $fields) {
68
-
69
- fputcsv($fp, $fields);
70
- }
71
- fclose($fp);
72
- endif;
73
- } catch (Exception $e) {
74
- Mage::logException($e);
75
- }
76
- }
77
-
78
- /*
79
- * Removes un-needed attributes per defined in extraIndexes function().
80
- * @param array $from associative array of product collection.
81
- * @return only matching attributes from the defined attributes list in extraIndexes() function.
82
- */
83
-
84
- function removeAttributes($from) {
85
- try {
86
- $attr = $this->extraIndexes();
87
- $data = array();
88
-
89
- if (count($from) > 0) {
90
- foreach ($from as $key => $value) {
91
- if (is_array($value)) {
92
- $data[$key] = $this->confirmIndexes($value, $attr);
93
- }
94
- }
95
- }
96
- return $this->sortByAttributes($data, $attr);
97
- } catch (Exception $e) {
98
- Mage::logException($e);
99
- }
100
- }
101
-
102
- /*
103
- * Sort product collection attributes
104
- * @param array $from which requires sorting.
105
- * @param array $attr attributes list. Usually a reference to extraIndexes function is sufficient.
106
- * @return Sorted array of attributes.
107
- */
108
-
109
- function sortByAttributes($from, $attr) {
110
- try {
111
- $data = array();
112
- $i = 0;
113
- foreach ($attr as $possible) {
114
-
115
- $x = 0;
116
- foreach ($from as $key => $value) {
117
- if (is_array($value)) {
118
- $data[$key][$possible] = $from[$key][$possible];
119
- }
120
- $x++;
121
- }
122
- $i++;
123
- }
124
- return $data;
125
- } catch (Exception $e) {
126
- Mage::logException($e);
127
- }
128
- }
129
-
130
- /*
131
- * Fixes any un expected index. Fixes sorting issues too.
132
- * @param array $orgdata data which is going to be fixed
133
- * @return Fixed data.
134
- */
135
-
136
- function fixindexes($orgdata, $remove = false) {
137
- try {
138
- $data = array();
139
- if (count($orgdata) > 0) {
140
- foreach ($orgdata as $key => $value) {
141
- if (!is_array($value)) {
142
- if (!$remove) {
143
- $data[$key] = $value;
144
- }
145
- } else {
146
- $data[$key] = $this->confirmIndexes($value, $orgdata[0]);
147
- }
148
- }
149
- }
150
- return $data;
151
- } catch (Exception $e) {
152
- Mage::logException($e);
153
- }
154
- }
155
-
156
- /*
157
- * Checks each indexe in 2 different arrays and fixes ind from the available.
158
- * @param array $ind Parameter index which is going to be fixed
159
- * @param array $available Default or available attributes list
160
- * @return Leaves only confirmed indexes in $ind based on $available.
161
- */
162
-
163
- function confirmIndexes($ind, $available) {
164
- try {
165
- $available = array_change_key_case($available, CASE_UPPER);
166
- $ind = array_change_key_case($ind, CASE_UPPER);
167
- foreach ($available as $k => $v) {
168
- if (!isset($ind[$k])) {
169
- $ind[$k] = '';
170
- }
171
- }
172
- foreach ($ind as $key => $value) { // This loop is to remove any non-existing indexes (from the list of available array) from the data array.
173
- if (!isset($available[$key])) {
174
- unset($ind[$key]);
175
- }
176
- }
177
-
178
- return $ind;
179
- } catch (Exception $e) {
180
- Mage::logException($e);
181
- }
182
- }
183
-
184
- /*
185
- * Finds parent of products from id and returns model of product if it does.
186
- * @param string $id Parameter id of product which is expected to have parent.
187
- * @return Parent product object else false.
188
- */
189
-
190
- function checkIfParentExists($id) {
191
- try {
192
- $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($id);
193
- if (!$parentIds)
194
- $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($id);
195
- if (isset($parentIds[0])) {
196
- return Mage::getModel('catalog/product')->load($parentIds[0]);
197
- }
198
- return false; // Sorry no parent exists.
199
- } catch (Exception $e) {
200
- Mage::logException($e);
201
- }
202
- }
203
-
204
- /*
205
- * Returns extra indexes.
206
- * @return Returns extra indexes.
207
- */
208
-
209
- function extraIndexes() {
210
- $data = array();
211
- $data['SKU'] = 'SKU';
212
- $data['MASTER_PRODUCT_ID'] = 'MASTER_PRODUCT_ID';
213
- $data['NAME'] = 'NAME';
214
- $data['IMAGE_URL'] = 'IMAGE_URL';
215
- $data['PRODUCT_CATEGORY'] = 'PRODUCT_CATEGORY';
216
- $data['DESCRIPTION'] = 'DESCRIPTION';
217
- $data['MPN'] = 'MPN';
218
- $data['EAN'] = 'EAN';
219
- $data['MODEL'] = 'MODEL';
220
- $data['MANUFACTURER'] = 'MANUFACTURER';
221
- return $data;
222
- }
223
-
224
- /*
225
- * Returns uppercased indexes recursive.
226
- * $param array $arr array which needs to be uppercased recursively.
227
- * @return Returns extra indexes.
228
- */
229
-
230
- public function arrayKeyChangeCase($arr) {
231
- try {
232
- $final = array();
233
- if (is_array($arr) && count($arr) > 0) {
234
- foreach ($arr as $key => $val) {
235
- if (is_array($val)) {
236
- $final[strtoupper($key)] = $this->arrayKeyChangeCase($val);
237
- } else {
238
- $final[strtoupper($key)] = $val;
239
- }
240
- }
241
- }
242
- return $final;
243
- } catch (Exception $e) {
244
- Mage::logException($e);
245
- }
246
- }
247
-
248
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Helper_Producthelper extends Mage_Core_Helper_Abstract {
24
+ /*
25
+ * Returns CSV as string.
26
+ * @param array $assocDataArray associative array of expected CSV data.
27
+ * @param array $createHeader to select indexes as header of csv. Default off.
28
+ * @return CSV as a string.
29
+ */
30
+
31
+ function stringCsv($assocDataArray, $createHeader = false) {
32
+ try {
33
+ $data = '';
34
+ if (isset($assocDataArray['0'])) {
35
+ $fp = fopen("php://output", 'w');
36
+ if ($createHeader) {
37
+ fputcsv($fp, array_keys($assocDataArray['0']));
38
+ }
39
+ foreach ($assocDataArray AS $values) {
40
+ fputcsv($fp, $values);
41
+ }
42
+ $data += stream_get_contents($fp);
43
+ fclose($fp);
44
+ return $data;
45
+ }
46
+ } catch (Exception $e) {
47
+ Mage::logException($e);
48
+ }
49
+ }
50
+
51
+ /*
52
+ * Creates CSV at specified path.
53
+ * @param array $fileName Where the file is expected to be. Full path can also be used.
54
+ * @param array $assocDataArray To create CSV based on.
55
+ * @return null.
56
+ */
57
+
58
+ function generateCsv($fileName, $assocDataArray, $headers = true) {
59
+ try {
60
+ if (is_array($assocDataArray) && count($assocDataArray) > 0):
61
+ $fp = fopen($fileName, 'w');
62
+ if ($headers) {
63
+ $headers = array_keys($assocDataArray[0]); // custom header
64
+ unset($assocDataArray[0]);
65
+ fputcsv($fp, $headers); // custom header
66
+ }
67
+ foreach ($assocDataArray as $fields) {
68
+
69
+ fputcsv($fp, $fields);
70
+ }
71
+ fclose($fp);
72
+ endif;
73
+ } catch (Exception $e) {
74
+ Mage::logException($e);
75
+ }
76
+ }
77
+
78
+ /*
79
+ * Removes un-needed attributes per defined in extraIndexes function().
80
+ * @param array $from associative array of product collection.
81
+ * @return only matching attributes from the defined attributes list in extraIndexes() function.
82
+ */
83
+
84
+ function removeAttributes($from) {
85
+ try {
86
+ $attr = $this->extraIndexes();
87
+ $data = array();
88
+
89
+ if (count($from) > 0) {
90
+ foreach ($from as $key => $value) {
91
+ if (is_array($value)) {
92
+ $data[$key] = $this->confirmIndexes($value, $attr);
93
+ }
94
+ }
95
+ }
96
+ return $this->sortByAttributes($data, $attr);
97
+ } catch (Exception $e) {
98
+ Mage::logException($e);
99
+ }
100
+ }
101
+
102
+ /*
103
+ * Sort product collection attributes
104
+ * @param array $from which requires sorting.
105
+ * @param array $attr attributes list. Usually a reference to extraIndexes function is sufficient.
106
+ * @return Sorted array of attributes.
107
+ */
108
+
109
+ function sortByAttributes($from, $attr) {
110
+ try {
111
+ $data = array();
112
+ $i = 0;
113
+ foreach ($attr as $possible) {
114
+
115
+ $x = 0;
116
+ foreach ($from as $key => $value) {
117
+ if (is_array($value)) {
118
+ $data[$key][$possible] = $from[$key][$possible];
119
+ }
120
+ $x++;
121
+ }
122
+ $i++;
123
+ }
124
+ return $data;
125
+ } catch (Exception $e) {
126
+ Mage::logException($e);
127
+ }
128
+ }
129
+
130
+ /*
131
+ * Fixes any un expected index. Fixes sorting issues too.
132
+ * @param array $orgdata data which is going to be fixed
133
+ * @return Fixed data.
134
+ */
135
+
136
+ function fixindexes($orgdata, $remove = false) {
137
+ try {
138
+ $data = array();
139
+ if (count($orgdata) > 0) {
140
+ foreach ($orgdata as $key => $value) {
141
+ if (!is_array($value)) {
142
+ if (!$remove) {
143
+ $data[$key] = $value;
144
+ }
145
+ } else {
146
+ $data[$key] = $this->confirmIndexes($value, $orgdata[0]);
147
+ }
148
+ }
149
+ }
150
+ return $data;
151
+ } catch (Exception $e) {
152
+ Mage::logException($e);
153
+ }
154
+ }
155
+
156
+ /*
157
+ * Checks each indexe in 2 different arrays and fixes ind from the available.
158
+ * @param array $ind Parameter index which is going to be fixed
159
+ * @param array $available Default or available attributes list
160
+ * @return Leaves only confirmed indexes in $ind based on $available.
161
+ */
162
+
163
+ function confirmIndexes($ind, $available) {
164
+ try {
165
+ $available = array_change_key_case($available, CASE_UPPER);
166
+ $ind = array_change_key_case($ind, CASE_UPPER);
167
+ foreach ($available as $k => $v) {
168
+ if (!isset($ind[$k])) {
169
+ $ind[$k] = '';
170
+ }
171
+ }
172
+ foreach ($ind as $key => $value) { // This loop is to remove any non-existing indexes (from the list of available array) from the data array.
173
+ if (!isset($available[$key])) {
174
+ unset($ind[$key]);
175
+ }
176
+ }
177
+
178
+ return $ind;
179
+ } catch (Exception $e) {
180
+ Mage::logException($e);
181
+ }
182
+ }
183
+
184
+ /*
185
+ * Finds parent of products from id and returns model of product if it does.
186
+ * @param string $id Parameter id of product which is expected to have parent.
187
+ * @return Parent product object else false.
188
+ */
189
+
190
+ function checkIfParentExists($id) {
191
+ try {
192
+ $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($id);
193
+ if (!$parentIds)
194
+ $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($id);
195
+ if (isset($parentIds[0])) {
196
+ return Mage::getModel('catalog/product')->load($parentIds[0]);
197
+ }
198
+ return false; // Sorry no parent exists.
199
+ } catch (Exception $e) {
200
+ Mage::logException($e);
201
+ }
202
+ }
203
+
204
+ /*
205
+ * Returns extra indexes.
206
+ * @return Returns extra indexes.
207
+ */
208
+
209
+ function extraIndexes() {
210
+ $data = array();
211
+ $data['SKU'] = 'SKU';
212
+ $data['MASTER_PRODUCT_ID'] = 'MASTER_PRODUCT_ID';
213
+ $data['NAME'] = 'NAME';
214
+ $data['IMAGE_URL'] = 'IMAGE_URL';
215
+ $data['PRODUCT_CATEGORY'] = 'PRODUCT_CATEGORY';
216
+ $data['DESCRIPTION'] = 'DESCRIPTION';
217
+ $data['MPN'] = 'MPN';
218
+ $data['EAN'] = 'EAN';
219
+ $data['MODEL'] = 'MODEL';
220
+ $data['MANUFACTURER'] = 'MANUFACTURER';
221
+ return $data;
222
+ }
223
+
224
+ /*
225
+ * Returns uppercased indexes recursive.
226
+ * $param array $arr array which needs to be uppercased recursively.
227
+ * @return Returns extra indexes.
228
+ */
229
+
230
+ public function arrayKeyChangeCase($arr) {
231
+ try {
232
+ $final = array();
233
+ if (is_array($arr) && count($arr) > 0) {
234
+ foreach ($arr as $key => $val) {
235
+ if (is_array($val)) {
236
+ $final[strtoupper($key)] = $this->arrayKeyChangeCase($val);
237
+ } else {
238
+ $final[strtoupper($key)] = $val;
239
+ }
240
+ }
241
+ }
242
+ return $final;
243
+ } catch (Exception $e) {
244
+ Mage::logException($e);
245
+ }
246
+ }
247
+
248
+ }
app/code/local/EComHut/Reevoo/Helper/Purchasehelper.php CHANGED
@@ -1,430 +1,430 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Helper_Purchasehelper extends Mage_Core_Helper_Abstract {
24
- /*
25
- * Fetch Purchase Collection.
26
- * @return Collection of Orders etc..
27
- */
28
-
29
- public function getPurchaseCollection() {
30
- try {
31
- if (!Mage::getStoreConfig('reevoo_setup/reevoo_status/status')) {
32
- return false;
33
- }
34
-
35
- $order_items = Mage::getResourceModel('sales/order_item_collection')->addAttributeToSelect('*')->distinct(TRUE);
36
- if (Mage::getStoreConfig('reevoo_setup/reevoo_ftp/purchasefeed_delta')) {
37
- $to = date('Y-m-d H:i:s');
38
- $lastTime = strtotime(Mage::getModel('reevoo/data')->getLastPurchaseFeedDate());
39
- $from = date('Y-m-d H:i:s', $lastTime);
40
- $order_items->addAttributeToFilter('updated_at', array('from' => $from, 'to' => $to));
41
- }
42
- $order_items->load();
43
-
44
- return $order_items;
45
- } catch (Exceptions $e) {
46
- Mage::logException($e);
47
- }
48
- }
49
-
50
- /*
51
- * Returns finalized and prepared purchase collection for CSV purposes.
52
- * @param boolean $debug (optional) if true, will return all of the collection data for debugging purposes..
53
- * @return Finalized and prepared collection of orders.
54
- */
55
-
56
- public function getPurchases($debug = false) { // Main function for purchases.
57
- try {
58
- $order_items = $this->getPurchaseCollection();
59
- $orders = array();
60
- $check = array();
61
- foreach ($order_items as $data) {
62
- $tmp = $data->getData();
63
- $order = Mage::getModel('sales/order')->load($tmp['order_id']);
64
- $shipments = $order->getShipmentsCollection()->getData();
65
- $basic = $order->getData();
66
- if (isset($check[$basic['entity_id']]) && $check[$basic['entity_id']]) {
67
- continue;
68
- }
69
- if (is_array($shipments) && count($shipments) > 0) {
70
- $x = array('basicDetails' => $order->getData(), 'productsOrder' => array(), 'shippingAddress' => $order->getShippingAddress()->getData(), 'billingAddress' => $order->getBillingAddress()->getData(), 'shipmentCollection' => $shipments);
71
- $y = $x;
72
- foreach ($order->getAllItems() as $odr) {
73
- $y['productsOrder'][] = $odr->getData();
74
- }
75
- $orders[] = $y;
76
- }
77
- $check[$basic['entity_id']] = true;
78
- }
79
- if ($debug) {
80
- return $orders;
81
- //return $this->sortPurchases($orders, $debug);
82
- }
83
- return $this->_fixIndexes($this->sortPurchases($orders));
84
- } catch (Exception $e) {
85
- Mage::logException($e);
86
- }
87
- }
88
-
89
- /*
90
- * Helper to fix the collection received from getPurchases()
91
- * @param array $order collection which requires fixes.
92
- * @return semi improved version of collection.
93
- */
94
-
95
- public function sortPurchases($order, $debug = false) {
96
- try {
97
- $output = array();
98
- if (is_array($order) && count($order) > 0) {
99
- foreach ($order as $key => $value) {
100
- $output[$key] = $this->_sortPurchasesLevel2($value, $debug);
101
- }
102
- }
103
- return $output;
104
- } catch (Exception $e) {
105
- Mage::logException($e);
106
- }
107
- }
108
-
109
- /*
110
- * Helper to help the helper @sortPurchases() function
111
- * @param array $order individual order from sortPurchases collection
112
- * @return semi improved version of individual order.
113
- */
114
-
115
- private function _sortPurchasesLevel2($order, $debug = false) {
116
- $data['EMAIL'] = $this->_getBaseAttribute($order, 'customer_email');
117
- $data['FIRST_NAME'] = $this->_getShippingAttribute($order, 'firstname');
118
- $data['SKU'] = '';
119
- $multiply['SKU'] = $this->_getProductAttribute($order, 'sku');
120
- $data['MASTER_PRODUCT_SKU'] = '';
121
- $multiply['MASTER_PRODUCT_SKU'] = $this->_getProductsParentSku($multiply['SKU']);
122
- $data['PURCHASE_DATE'] = $this->_getBaseAttribute($order, 'created_at');
123
- $data['DELIVERY_DATE'] = $this->_getShipmentAttributes($order, 'created_at');
124
- if (is_array($data['DELIVERY_DATE']) && count($data['DELIVERY_DATE']) > 1) {
125
- $data['DELIVERY_DATE'] = $data['DELIVERY_DATE'][0];
126
- }
127
- $data['SHIPPING_STATUS'] = ucwords($this->_getBaseAttribute($order, 'status'));
128
- $data['PRICE'] = '';
129
- $multiply['PRICE'] = $this->_getProductAttribute($order, 'price_incl_tax');
130
- $data['ORDER_REF'] = $this->_getBaseAttribute($order, 'increment_id');
131
- $data['CUSTOMER_REF'] = $this->_getBaseAttribute($order, 'customer_id');
132
- $data['CURRENCY'] = $this->_getBaseAttribute($order, 'base_currency_code');
133
- $data['SHIPPING_POSTCODE1'] = $this->_getShippingAttribute($order, 'postcode');
134
-
135
- $extraAddresses = $this->_getCustomerAddressById($this->_getShipmentAttributes($order, 'shipping_address_id'));
136
-
137
- $data['SHIPPING_POSTCODE2'] = isset($extraAddresses[1]['postcode']) ? $extraAddresses[1]['postcode'] : ''; //$this->_getShippingAttribute($order, 'postcode');
138
- $data['SHIPPING_POSTCODE3'] = isset($extraAddresses[2]['postcode']) ? $extraAddresses[2]['postcode'] : ''; //$this->_getShippingAttribute($order, 'postcode');
139
- $data['SHIPPING_COUNTRY1'] = $this->_getShippingAttribute($order, 'country_id');
140
- $data['SHIPPING_COUNTRY2'] = isset($extraAddresses[1]['country_id']) ? $extraAddresses[1]['country_id'] : ''; //$this->_getShippingAttribute($order, 'country_id');
141
- $data['SHIPPING_COUNTRY3'] = isset($extraAddresses[2]['country_id']) ? $extraAddresses[2]['country_id'] : ''; //$this->_getShippingAttribute($order, 'country_id');
142
- $data['BILLING_POSTCODE'] = $this->_getBillingAttribute($order, 'postcode');
143
- $data['BILLING_COUNTRY'] = $this->_getBillingAttribute($order, 'country_id');
144
- $data['PICK_UP_STORE'] = ''; // We don't know any such attribute
145
- $multiply['TYPE'] = $this->_getProductAttribute($order, 'product_type');
146
- return $this->_multiplydetails($data, $order, $multiply, $debug);
147
- }
148
-
149
- /*
150
- * Helper for fetching address by shipping
151
- * @param array $data array of addresseses to be fetched for.
152
- * @return shipping and country array.
153
- */
154
-
155
- private function _getCustomerAddressById($id) {
156
- $arr = array();
157
- if (is_array($id)) {
158
- foreach ($id as $v) {
159
- $tmp = Mage::getModel('sales/order_address')->load($v)->getData();
160
- $arr[] = array('postcode' => $tmp['postcode'], 'country_id' => $tmp['country_id']);
161
- }
162
- return $arr;
163
- }
164
- $tmp = Mage::getModel('sales/order_address')->load($id)->getData();
165
- return array('postcode' => $tmp['postcode'], 'country_id' => $tmp['country_id']);
166
- }
167
-
168
- /*
169
- * Helper for fixing indexes
170
- * @param array $data array semi finalized data. Merges the indexes
171
- * @return finalized order collection.
172
- */
173
-
174
- private function _fixIndexes($data) {
175
- try {
176
- $output = array();
177
- $i = 1;
178
- foreach ($data as $value) {
179
-
180
- foreach ($value as $v) {
181
- $output[0] = array_keys($v);
182
- $output[$i] = $v;
183
- $i++;
184
- }
185
- }
186
- return $output;
187
- } catch (Exception $e) {
188
- Mage::logException($e);
189
- }
190
- }
191
-
192
- /*
193
- * Helper fixer for merging uneeded data for smoother actions.
194
- * @param array $order individual order
195
- * @param array $sec Original collection of individual order details.
196
- * @param array $multiply The array which needs to be added/ fixed.
197
- * @return array of order detail based on each product stuff.
198
- */
199
-
200
- private function _multiplydetails($order, $sec = false, $multiply, $debug = false) {
201
- try {
202
- $d = array();
203
- $d['products'] = array_keys($multiply['SKU']);
204
-
205
- $productMultiply = $this->_sortKeysOrder($d['products'], $multiply);
206
-
207
- $output = array();
208
-
209
- $i = 0;
210
- //$output[$i] = $order;
211
-
212
- $configurables = array();
213
-
214
- if (count($productMultiply) > 0) {
215
- foreach ($productMultiply as $val) {
216
- if ($val['TYPE'] == 'configurable') {
217
- $configurables[$order['ORDER_REF']][$val['SKU']] = $val['PRICE'];
218
- } else {
219
- $output[$i] = $order;
220
- $output[$i]['SKU'] = $val['SKU'];
221
- $output[$i]['MASTER_PRODUCT_SKU'] = $val['MASTER_PRODUCT_SKU'];
222
- $output[$i]['PRICE'] = $val['PRICE'];
223
- unset($output[$i]['TYPE']);
224
- $i++;
225
- }
226
- }
227
- }
228
- if ($debug) {
229
- $final = $this->_mergeMasterProductsPrices($output, $configurables);
230
- return array('final' => $final, 'output' => $output);
231
- }
232
- return $this->_mergeMasterProductsPrices($output, $configurables);
233
- } catch (Exception $e) {
234
- Mage::logException($e);
235
- }
236
- }
237
-
238
- /*
239
- * Helper fixer for merging MasterProducts, their prices and so on.
240
- * @param array $order individual order
241
- * @param array $conf configuration array like array('order_ref'=>array('sku'=>12)) wher 12 is price and its only applicable for configurable products.
242
- * @return array of order detail based on each product stuff.
243
- */
244
-
245
- private function _mergeMasterProductsPrices($data, $conf) {
246
- try {
247
- $output = array();
248
- foreach ($data as $k => $v) {
249
- $output[$k] = $v;
250
- if ($v['MASTER_PRODUCT_SKU'] !== $v['SKU']) {
251
- $output[$k]['PRICE'] = (int) @$conf[$v['ORDER_REF']][$v['MASTER_PRODUCT_SKU']] + (int) @$v['PRICE'];
252
- }
253
- if ((int) @$output[$k]['PRICE'] < 1) {
254
- $output[$k]['PRICE'] = (int) $conf[$v['ORDER_REF']][$v['SKU']];
255
- }
256
- }
257
- return $output;
258
- } catch (Exception $ex) {
259
- Mage::logException($ex);
260
- }
261
- }
262
-
263
- /*
264
- * Helper to sort the key order of array. Relates to other functionalities.
265
- * @param array $data of semi managed from _multiplydetails
266
- * @param array $multiply data array of extra indexes of each product.
267
- * @return Improved version of sorted array.
268
- */
269
-
270
- private function _sortKeysOrder($data, $multiply) {
271
- try {
272
- $output = $data;
273
-
274
- foreach ($data as $key => $val) {
275
- unset($output[$key]);
276
- $output[$val]['SKU'] = $multiply['SKU'][$val];
277
- $output[$val]['MASTER_PRODUCT_SKU'] = $multiply['MASTER_PRODUCT_SKU'][$val];
278
- $output[$val]['PRICE'] = @$multiply['PRICE'][$val];
279
- $output[$val]['TYPE'] = $multiply['TYPE'][$val];
280
- }
281
- return $output;
282
- } catch (Exception $e) {
283
- Mage::logException($e);
284
- }
285
- }
286
-
287
- /*
288
- * Finds base attribute easily.
289
- * @param array $order individual order array.
290
- * @param string $attr name of key to be searched for.
291
- * @return Order basic attribute.
292
- */
293
-
294
- private function _getBaseAttribute($order, $attr) {
295
- try {
296
- if (is_array($order) && isset($order['basicDetails'][$attr])) {
297
- return $order['basicDetails'][$attr];
298
- }
299
- } catch (Exception $e) {
300
- Mage::logException($e);
301
- }
302
- }
303
-
304
- /*
305
- * Finds Product attribute easily.
306
- * @param array $order individual order array.
307
- * @param string $attr name of key to be searched for.
308
- * @return Order product attribute(s).
309
- */
310
-
311
- private function _getProductAttribute($order, $attr) {
312
- try {
313
- $data = array();
314
- if (is_array($order) && count($order['productsOrder']) > 0) {
315
- foreach ($order['productsOrder'] as $value) {
316
- if (isset($value[$attr])) {
317
- $data[$value['product_id']] = $value[$attr];
318
- }
319
- }
320
- return $data;
321
- }
322
- return '';
323
- } catch (Exception $e) {
324
- Mage::logException($e);
325
- }
326
- }
327
-
328
- /*
329
- * Finds shipping attribute easily.
330
- * @param array $order individual order array.
331
- * @param string $attr name of key to be searched for.
332
- * @return Order shipping attribute.
333
- */
334
-
335
- private function _getShippingAttribute($order, $attr) {
336
- try {
337
- if (is_array($order) && isset($order['shippingAddress'][$attr])) {
338
- return $order['shippingAddress'][$attr];
339
- }
340
- } catch (Exception $e) {
341
- Mage::logException($e);
342
- }
343
- }
344
-
345
- /*
346
- * Finds billing attribute easily.
347
- * @param array $order individual order array.
348
- * @param string $attr name of key to be searched for.
349
- * @return Order billing attribute.
350
- */
351
-
352
- private function _getBillingAttribute($order, $attr) {
353
- try {
354
- if (is_array($order) && isset($order['billingAddress'][$attr])) {
355
- return $order['billingAddress'][$attr];
356
- }
357
- } catch (Exception $e) {
358
- Mage::logException($e);
359
- }
360
- }
361
-
362
- /*
363
- * Finds Shipment attribute easily.
364
- * @param array $order individual order array.
365
- * @param string $attr name of key to be searched for.
366
- * @return Order shipment attribute(s).
367
- */
368
-
369
- private function _getShipmentAttributes($order, $attr) {
370
- try {
371
- $data = array();
372
- $i = 0;
373
- if (is_array($order) && count($order['shipmentCollection']) > 0) {
374
- foreach ($order['shipmentCollection'] as $value) {
375
- if (isset($value[$attr])) {
376
- $data[$i] = $value[$attr];
377
- $i++;
378
- }
379
- }
380
- if ($i == 1) {
381
- return $data[0];
382
- }
383
- return $data;
384
- }
385
- return '';
386
- } catch (Exception $e) {
387
- Mage::logException($e);
388
- }
389
- }
390
-
391
- /*
392
- * Fetches all parent products attribute.
393
- * @param array $list ids of the products whom parent is required.
394
- * @return Parent Product in full or false based on data.
395
- */
396
-
397
- private function _getProductsParentSku($list) {
398
- try {
399
- $data = array();
400
- if (is_array($list) && count($list) > 0) {
401
- foreach ($list as $key => $value) {
402
- $data[$key] = $this->_getParentProductSku($key, $value);
403
- }
404
- }
405
- return $data;
406
- } catch (Exception $e) {
407
- Mage::logException($e);
408
- }
409
- }
410
-
411
- /*
412
- * Fetches all parent products attribute.
413
- * @param string $list id of the product whom parent is required.
414
- * @return Parent Product in full or false based on data.
415
- */
416
-
417
- private function _getParentProductSku($itemId, $itemSku) {
418
- try {
419
- $_helper = Mage::helper('reevoo/producthelper');
420
- $parent = $_helper->checkIfParentExists($itemId);
421
- if (!$parent) {
422
- return $itemSku;
423
- }
424
- return $parent['sku'];
425
- } catch (Exception $e) {
426
- Mage::logException($e);
427
- }
428
- }
429
-
430
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Helper_Purchasehelper extends Mage_Core_Helper_Abstract {
24
+ /*
25
+ * Fetch Purchase Collection.
26
+ * @return Collection of Orders etc..
27
+ */
28
+
29
+ public function getPurchaseCollection() {
30
+ try {
31
+ if (!Mage::getStoreConfig('reevoo_setup/reevoo_status/status')) {
32
+ return false;
33
+ }
34
+
35
+ $order_items = Mage::getResourceModel('sales/order_item_collection')->addAttributeToSelect('*')->distinct(TRUE);
36
+ if (Mage::getStoreConfig('reevoo_setup/reevoo_ftp/purchasefeed_delta')) {
37
+ $to = date('Y-m-d H:i:s');
38
+ $lastTime = strtotime(Mage::getModel('reevoo/data')->getLastPurchaseFeedDate());
39
+ $from = date('Y-m-d H:i:s', $lastTime);
40
+ $order_items->addAttributeToFilter('updated_at', array('from' => $from, 'to' => $to));
41
+ }
42
+ $order_items->load();
43
+
44
+ return $order_items;
45
+ } catch (Exceptions $e) {
46
+ Mage::logException($e);
47
+ }
48
+ }
49
+
50
+ /*
51
+ * Returns finalized and prepared purchase collection for CSV purposes.
52
+ * @param boolean $debug (optional) if true, will return all of the collection data for debugging purposes..
53
+ * @return Finalized and prepared collection of orders.
54
+ */
55
+
56
+ public function getPurchases($debug = false) { // Main function for purchases.
57
+ try {
58
+ $order_items = $this->getPurchaseCollection();
59
+ $orders = array();
60
+ $check = array();
61
+ foreach ($order_items as $data) {
62
+ $tmp = $data->getData();
63
+ $order = Mage::getModel('sales/order')->load($tmp['order_id']);
64
+ $shipments = $order->getShipmentsCollection()->getData();
65
+ $basic = $order->getData();
66
+ if (isset($check[$basic['entity_id']]) && $check[$basic['entity_id']]) {
67
+ continue;
68
+ }
69
+ if (is_array($shipments) && count($shipments) > 0) {
70
+ $x = array('basicDetails' => $order->getData(), 'productsOrder' => array(), 'shippingAddress' => $order->getShippingAddress()->getData(), 'billingAddress' => $order->getBillingAddress()->getData(), 'shipmentCollection' => $shipments);
71
+ $y = $x;
72
+ foreach ($order->getAllItems() as $odr) {
73
+ $y['productsOrder'][] = $odr->getData();
74
+ }
75
+ $orders[] = $y;
76
+ }
77
+ $check[$basic['entity_id']] = true;
78
+ }
79
+ if ($debug) {
80
+ return $orders;
81
+ //return $this->sortPurchases($orders, $debug);
82
+ }
83
+ return $this->_fixIndexes($this->sortPurchases($orders));
84
+ } catch (Exception $e) {
85
+ Mage::logException($e);
86
+ }
87
+ }
88
+
89
+ /*
90
+ * Helper to fix the collection received from getPurchases()
91
+ * @param array $order collection which requires fixes.
92
+ * @return semi improved version of collection.
93
+ */
94
+
95
+ public function sortPurchases($order, $debug = false) {
96
+ try {
97
+ $output = array();
98
+ if (is_array($order) && count($order) > 0) {
99
+ foreach ($order as $key => $value) {
100
+ $output[$key] = $this->_sortPurchasesLevel2($value, $debug);
101
+ }
102
+ }
103
+ return $output;
104
+ } catch (Exception $e) {
105
+ Mage::logException($e);
106
+ }
107
+ }
108
+
109
+ /*
110
+ * Helper to help the helper @sortPurchases() function
111
+ * @param array $order individual order from sortPurchases collection
112
+ * @return semi improved version of individual order.
113
+ */
114
+
115
+ private function _sortPurchasesLevel2($order, $debug = false) {
116
+ $data['EMAIL'] = $this->_getBaseAttribute($order, 'customer_email');
117
+ $data['FIRST_NAME'] = $this->_getShippingAttribute($order, 'firstname');
118
+ $data['SKU'] = '';
119
+ $multiply['SKU'] = $this->_getProductAttribute($order, 'sku');
120
+ $data['MASTER_PRODUCT_SKU'] = '';
121
+ $multiply['MASTER_PRODUCT_SKU'] = $this->_getProductsParentSku($multiply['SKU']);
122
+ $data['PURCHASE_DATE'] = $this->_getBaseAttribute($order, 'created_at');
123
+ $data['DELIVERY_DATE'] = $this->_getShipmentAttributes($order, 'created_at');
124
+ if (is_array($data['DELIVERY_DATE']) && count($data['DELIVERY_DATE']) > 1) {
125
+ $data['DELIVERY_DATE'] = $data['DELIVERY_DATE'][0];
126
+ }
127
+ $data['SHIPPING_STATUS'] = ucwords($this->_getBaseAttribute($order, 'status'));
128
+ $data['PRICE'] = '';
129
+ $multiply['PRICE'] = $this->_getProductAttribute($order, 'price_incl_tax');
130
+ $data['ORDER_REF'] = $this->_getBaseAttribute($order, 'increment_id');
131
+ $data['CUSTOMER_REF'] = $this->_getBaseAttribute($order, 'customer_id');
132
+ $data['CURRENCY'] = $this->_getBaseAttribute($order, 'base_currency_code');
133
+ $data['SHIPPING_POSTCODE1'] = $this->_getShippingAttribute($order, 'postcode');
134
+
135
+ $extraAddresses = $this->_getCustomerAddressById($this->_getShipmentAttributes($order, 'shipping_address_id'));
136
+
137
+ $data['SHIPPING_POSTCODE2'] = isset($extraAddresses[1]['postcode']) ? $extraAddresses[1]['postcode'] : ''; //$this->_getShippingAttribute($order, 'postcode');
138
+ $data['SHIPPING_POSTCODE3'] = isset($extraAddresses[2]['postcode']) ? $extraAddresses[2]['postcode'] : ''; //$this->_getShippingAttribute($order, 'postcode');
139
+ $data['SHIPPING_COUNTRY1'] = $this->_getShippingAttribute($order, 'country_id');
140
+ $data['SHIPPING_COUNTRY2'] = isset($extraAddresses[1]['country_id']) ? $extraAddresses[1]['country_id'] : ''; //$this->_getShippingAttribute($order, 'country_id');
141
+ $data['SHIPPING_COUNTRY3'] = isset($extraAddresses[2]['country_id']) ? $extraAddresses[2]['country_id'] : ''; //$this->_getShippingAttribute($order, 'country_id');
142
+ $data['BILLING_POSTCODE'] = $this->_getBillingAttribute($order, 'postcode');
143
+ $data['BILLING_COUNTRY'] = $this->_getBillingAttribute($order, 'country_id');
144
+ $data['PICK_UP_STORE'] = ''; // We don't know any such attribute
145
+ $multiply['TYPE'] = $this->_getProductAttribute($order, 'product_type');
146
+ return $this->_multiplydetails($data, $order, $multiply, $debug);
147
+ }
148
+
149
+ /*
150
+ * Helper for fetching address by shipping
151
+ * @param array $data array of addresseses to be fetched for.
152
+ * @return shipping and country array.
153
+ */
154
+
155
+ private function _getCustomerAddressById($id) {
156
+ $arr = array();
157
+ if (is_array($id)) {
158
+ foreach ($id as $v) {
159
+ $tmp = Mage::getModel('sales/order_address')->load($v)->getData();
160
+ $arr[] = array('postcode' => $tmp['postcode'], 'country_id' => $tmp['country_id']);
161
+ }
162
+ return $arr;
163
+ }
164
+ $tmp = Mage::getModel('sales/order_address')->load($id)->getData();
165
+ return array('postcode' => $tmp['postcode'], 'country_id' => $tmp['country_id']);
166
+ }
167
+
168
+ /*
169
+ * Helper for fixing indexes
170
+ * @param array $data array semi finalized data. Merges the indexes
171
+ * @return finalized order collection.
172
+ */
173
+
174
+ private function _fixIndexes($data) {
175
+ try {
176
+ $output = array();
177
+ $i = 1;
178
+ foreach ($data as $value) {
179
+
180
+ foreach ($value as $v) {
181
+ $output[0] = array_keys($v);
182
+ $output[$i] = $v;
183
+ $i++;
184
+ }
185
+ }
186
+ return $output;
187
+ } catch (Exception $e) {
188
+ Mage::logException($e);
189
+ }
190
+ }
191
+
192
+ /*
193
+ * Helper fixer for merging uneeded data for smoother actions.
194
+ * @param array $order individual order
195
+ * @param array $sec Original collection of individual order details.
196
+ * @param array $multiply The array which needs to be added/ fixed.
197
+ * @return array of order detail based on each product stuff.
198
+ */
199
+
200
+ private function _multiplydetails($order, $sec = false, $multiply, $debug = false) {
201
+ try {
202
+ $d = array();
203
+ $d['products'] = array_keys($multiply['SKU']);
204
+
205
+ $productMultiply = $this->_sortKeysOrder($d['products'], $multiply);
206
+
207
+ $output = array();
208
+
209
+ $i = 0;
210
+ //$output[$i] = $order;
211
+
212
+ $configurables = array();
213
+
214
+ if (count($productMultiply) > 0) {
215
+ foreach ($productMultiply as $val) {
216
+ if ($val['TYPE'] == 'configurable') {
217
+ $configurables[$order['ORDER_REF']][$val['SKU']] = $val['PRICE'];
218
+ } else {
219
+ $output[$i] = $order;
220
+ $output[$i]['SKU'] = $val['SKU'];
221
+ $output[$i]['MASTER_PRODUCT_SKU'] = $val['MASTER_PRODUCT_SKU'];
222
+ $output[$i]['PRICE'] = $val['PRICE'];
223
+ unset($output[$i]['TYPE']);
224
+ $i++;
225
+ }
226
+ }
227
+ }
228
+ if ($debug) {
229
+ $final = $this->_mergeMasterProductsPrices($output, $configurables);
230
+ return array('final' => $final, 'output' => $output);
231
+ }
232
+ return $this->_mergeMasterProductsPrices($output, $configurables);
233
+ } catch (Exception $e) {
234
+ Mage::logException($e);
235
+ }
236
+ }
237
+
238
+ /*
239
+ * Helper fixer for merging MasterProducts, their prices and so on.
240
+ * @param array $order individual order
241
+ * @param array $conf configuration array like array('order_ref'=>array('sku'=>12)) wher 12 is price and its only applicable for configurable products.
242
+ * @return array of order detail based on each product stuff.
243
+ */
244
+
245
+ private function _mergeMasterProductsPrices($data, $conf) {
246
+ try {
247
+ $output = array();
248
+ foreach ($data as $k => $v) {
249
+ $output[$k] = $v;
250
+ if ($v['MASTER_PRODUCT_SKU'] !== $v['SKU']) {
251
+ $output[$k]['PRICE'] = (int) @$conf[$v['ORDER_REF']][$v['MASTER_PRODUCT_SKU']] + (int) @$v['PRICE'];
252
+ }
253
+ if ((int) @$output[$k]['PRICE'] < 1) {
254
+ $output[$k]['PRICE'] = (int) $conf[$v['ORDER_REF']][$v['SKU']];
255
+ }
256
+ }
257
+ return $output;
258
+ } catch (Exception $ex) {
259
+ Mage::logException($ex);
260
+ }
261
+ }
262
+
263
+ /*
264
+ * Helper to sort the key order of array. Relates to other functionalities.
265
+ * @param array $data of semi managed from _multiplydetails
266
+ * @param array $multiply data array of extra indexes of each product.
267
+ * @return Improved version of sorted array.
268
+ */
269
+
270
+ private function _sortKeysOrder($data, $multiply) {
271
+ try {
272
+ $output = $data;
273
+
274
+ foreach ($data as $key => $val) {
275
+ unset($output[$key]);
276
+ $output[$val]['SKU'] = $multiply['SKU'][$val];
277
+ $output[$val]['MASTER_PRODUCT_SKU'] = $multiply['MASTER_PRODUCT_SKU'][$val];
278
+ $output[$val]['PRICE'] = @$multiply['PRICE'][$val];
279
+ $output[$val]['TYPE'] = $multiply['TYPE'][$val];
280
+ }
281
+ return $output;
282
+ } catch (Exception $e) {
283
+ Mage::logException($e);
284
+ }
285
+ }
286
+
287
+ /*
288
+ * Finds base attribute easily.
289
+ * @param array $order individual order array.
290
+ * @param string $attr name of key to be searched for.
291
+ * @return Order basic attribute.
292
+ */
293
+
294
+ private function _getBaseAttribute($order, $attr) {
295
+ try {
296
+ if (is_array($order) && isset($order['basicDetails'][$attr])) {
297
+ return $order['basicDetails'][$attr];
298
+ }
299
+ } catch (Exception $e) {
300
+ Mage::logException($e);
301
+ }
302
+ }
303
+
304
+ /*
305
+ * Finds Product attribute easily.
306
+ * @param array $order individual order array.
307
+ * @param string $attr name of key to be searched for.
308
+ * @return Order product attribute(s).
309
+ */
310
+
311
+ private function _getProductAttribute($order, $attr) {
312
+ try {
313
+ $data = array();
314
+ if (is_array($order) && count($order['productsOrder']) > 0) {
315
+ foreach ($order['productsOrder'] as $value) {
316
+ if (isset($value[$attr])) {
317
+ $data[$value['product_id']] = $value[$attr];
318
+ }
319
+ }
320
+ return $data;
321
+ }
322
+ return '';
323
+ } catch (Exception $e) {
324
+ Mage::logException($e);
325
+ }
326
+ }
327
+
328
+ /*
329
+ * Finds shipping attribute easily.
330
+ * @param array $order individual order array.
331
+ * @param string $attr name of key to be searched for.
332
+ * @return Order shipping attribute.
333
+ */
334
+
335
+ private function _getShippingAttribute($order, $attr) {
336
+ try {
337
+ if (is_array($order) && isset($order['shippingAddress'][$attr])) {
338
+ return $order['shippingAddress'][$attr];
339
+ }
340
+ } catch (Exception $e) {
341
+ Mage::logException($e);
342
+ }
343
+ }
344
+
345
+ /*
346
+ * Finds billing attribute easily.
347
+ * @param array $order individual order array.
348
+ * @param string $attr name of key to be searched for.
349
+ * @return Order billing attribute.
350
+ */
351
+
352
+ private function _getBillingAttribute($order, $attr) {
353
+ try {
354
+ if (is_array($order) && isset($order['billingAddress'][$attr])) {
355
+ return $order['billingAddress'][$attr];
356
+ }
357
+ } catch (Exception $e) {
358
+ Mage::logException($e);
359
+ }
360
+ }
361
+
362
+ /*
363
+ * Finds Shipment attribute easily.
364
+ * @param array $order individual order array.
365
+ * @param string $attr name of key to be searched for.
366
+ * @return Order shipment attribute(s).
367
+ */
368
+
369
+ private function _getShipmentAttributes($order, $attr) {
370
+ try {
371
+ $data = array();
372
+ $i = 0;
373
+ if (is_array($order) && count($order['shipmentCollection']) > 0) {
374
+ foreach ($order['shipmentCollection'] as $value) {
375
+ if (isset($value[$attr])) {
376
+ $data[$i] = $value[$attr];
377
+ $i++;
378
+ }
379
+ }
380
+ if ($i == 1) {
381
+ return $data[0];
382
+ }
383
+ return $data;
384
+ }
385
+ return '';
386
+ } catch (Exception $e) {
387
+ Mage::logException($e);
388
+ }
389
+ }
390
+
391
+ /*
392
+ * Fetches all parent products attribute.
393
+ * @param array $list ids of the products whom parent is required.
394
+ * @return Parent Product in full or false based on data.
395
+ */
396
+
397
+ private function _getProductsParentSku($list) {
398
+ try {
399
+ $data = array();
400
+ if (is_array($list) && count($list) > 0) {
401
+ foreach ($list as $key => $value) {
402
+ $data[$key] = $this->_getParentProductSku($key, $value);
403
+ }
404
+ }
405
+ return $data;
406
+ } catch (Exception $e) {
407
+ Mage::logException($e);
408
+ }
409
+ }
410
+
411
+ /*
412
+ * Fetches all parent products attribute.
413
+ * @param string $list id of the product whom parent is required.
414
+ * @return Parent Product in full or false based on data.
415
+ */
416
+
417
+ private function _getParentProductSku($itemId, $itemSku) {
418
+ try {
419
+ $_helper = Mage::helper('reevoo/producthelper');
420
+ $parent = $_helper->checkIfParentExists($itemId);
421
+ if (!$parent) {
422
+ return $itemSku;
423
+ }
424
+ return $parent['sku'];
425
+ } catch (Exception $e) {
426
+ Mage::logException($e);
427
+ }
428
+ }
429
+
430
+ }
app/code/local/EComHut/Reevoo/Helper/Tracking.php CHANGED
@@ -1,62 +1,62 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Helper_Tracking extends Mage_Core_Helper_Abstract {
24
- /*
25
- * Returns configuration value.
26
- * @param string $req value name to acquire the configuration value.
27
- * @param string $custom parent reference if its not related to API.
28
- * @return value of inquired configuration.
29
- */
30
-
31
- const CONFIG_PATH = 'reevoo_setup/reevoo_tracking/';
32
-
33
- function getValue($req, $custom = false) {
34
- try {
35
- if ($custom === false) {
36
- $custom = self::CONFIG_PATH;
37
- }
38
- return Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
39
- } catch (Exception $e) {
40
- Mage::logException($e);
41
- }
42
- }
43
-
44
- /*
45
- * Returns full status of Tracking (after verifying extension status
46
- * @return true or false based on admin setting.
47
- */
48
-
49
- function getStatus($st = 'tracking_status') {
50
- try {
51
- $reevoo_status = $this->getValue('status', 'reevoo_setup/reevoo_status/');
52
- $widget_status = $this->getValue($st);
53
- if ($reevoo_status && $widget_status) {
54
- return true;
55
- }
56
- return false;
57
- } catch (Exception $e) {
58
- Mage::logException($e);
59
- }
60
- }
61
-
62
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Helper_Tracking extends Mage_Core_Helper_Abstract {
24
+ /*
25
+ * Returns configuration value.
26
+ * @param string $req value name to acquire the configuration value.
27
+ * @param string $custom parent reference if its not related to API.
28
+ * @return value of inquired configuration.
29
+ */
30
+
31
+ const CONFIG_PATH = 'reevoo_setup/reevoo_tracking/';
32
+
33
+ function getValue($req, $custom = false) {
34
+ try {
35
+ if ($custom === false) {
36
+ $custom = self::CONFIG_PATH;
37
+ }
38
+ return Mage::getStoreConfig($custom . $req, Mage::app()->getStore());
39
+ } catch (Exception $e) {
40
+ Mage::logException($e);
41
+ }
42
+ }
43
+
44
+ /*
45
+ * Returns full status of Tracking (after verifying extension status
46
+ * @return true or false based on admin setting.
47
+ */
48
+
49
+ function getStatus($st = 'tracking_status') {
50
+ try {
51
+ $reevoo_status = $this->getValue('status', 'reevoo_setup/reevoo_status/');
52
+ $widget_status = $this->getValue($st);
53
+ if ($reevoo_status && $widget_status) {
54
+ return true;
55
+ }
56
+ return false;
57
+ } catch (Exception $e) {
58
+ Mage::logException($e);
59
+ }
60
+ }
61
+
62
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Product/Cron.php CHANGED
@@ -1,70 +1,70 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Backend_Product_Cron extends Mage_Core_Model_Config_Data {
24
-
25
- const CRON_STRING_PATH = 'crontab/jobs/reevoo_productfeed_cron/schedule/cron_expr';
26
- const CRON_MODEL_PATH = 'crontab/jobs/reevoo_productfeed_cron/run/model';
27
-
28
- /*
29
- * Process Cron Job time calculation
30
- * @return null.
31
- */
32
-
33
- protected function _afterSave() {
34
- $time = $this->getData('groups/reevoo_productfeed/fields/time/value');
35
- $frequncy = $this->getData('groups/reevoo_productfeed/frequency/value');
36
-
37
- $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY;
38
- $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY;
39
- $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY;
40
-
41
- $cronDayOfWeek = date('N');
42
-
43
- $cronExprArray = array(
44
- intval($time[1]), # Minute
45
- intval($time[0]), # Hour
46
- ($frequncy == $frequencyMonthly) ? '1' : '*', # Day of the Month
47
- '*', # Month of the Year
48
- ($frequncy == $frequencyWeekly) ? '1' : '*', # Day of the Week
49
- );
50
-
51
- $cronExprString = join(' ', $cronExprArray);
52
-
53
- try {
54
- Mage::getModel('core/config_data')
55
- ->load(self::CRON_STRING_PATH, 'path')
56
- ->setValue($cronExprString)
57
- ->setPath(self::CRON_STRING_PATH)
58
- ->save();
59
-
60
- Mage::getModel('core/config_data')
61
- ->load(self::CRON_MODEL_PATH, 'path')
62
- ->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH))
63
- ->setPath(self::CRON_MODEL_PATH)
64
- ->save();
65
- } catch (Exception $e) {
66
- throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
67
- }
68
- }
69
-
70
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Backend_Product_Cron extends Mage_Core_Model_Config_Data {
24
+
25
+ const CRON_STRING_PATH = 'crontab/jobs/reevoo_productfeed_cron/schedule/cron_expr';
26
+ const CRON_MODEL_PATH = 'crontab/jobs/reevoo_productfeed_cron/run/model';
27
+
28
+ /*
29
+ * Process Cron Job time calculation
30
+ * @return null.
31
+ */
32
+
33
+ protected function _afterSave() {
34
+ $time = $this->getData('groups/reevoo_productfeed/fields/time/value');
35
+ $frequncy = $this->getData('groups/reevoo_productfeed/frequency/value');
36
+
37
+ $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY;
38
+ $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY;
39
+ $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY;
40
+
41
+ $cronDayOfWeek = date('N');
42
+
43
+ $cronExprArray = array(
44
+ intval($time[1]), # Minute
45
+ intval($time[0]), # Hour
46
+ ($frequncy == $frequencyMonthly) ? '1' : '*', # Day of the Month
47
+ '*', # Month of the Year
48
+ ($frequncy == $frequencyWeekly) ? '1' : '*', # Day of the Week
49
+ );
50
+
51
+ $cronExprString = join(' ', $cronExprArray);
52
+
53
+ try {
54
+ Mage::getModel('core/config_data')
55
+ ->load(self::CRON_STRING_PATH, 'path')
56
+ ->setValue($cronExprString)
57
+ ->setPath(self::CRON_STRING_PATH)
58
+ ->save();
59
+
60
+ Mage::getModel('core/config_data')
61
+ ->load(self::CRON_MODEL_PATH, 'path')
62
+ ->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH))
63
+ ->setPath(self::CRON_MODEL_PATH)
64
+ ->save();
65
+ } catch (Exception $e) {
66
+ throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
67
+ }
68
+ }
69
+
70
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Purchaser/Cron.php CHANGED
@@ -1,69 +1,69 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Backend_Purchaser_Cron extends Mage_Core_Model_Config_Data {
24
-
25
- const CRON_STRING_PATH = 'crontab/jobs/reevoo_purchaserfeed_cron/schedule/cron_expr';
26
- const CRON_MODEL_PATH = 'crontab/jobs/reevoo_purchaserfeed_cron/run/model';
27
-
28
- /*
29
- * Processes Dynamic Cronjob setup.
30
- * @return Null
31
- */
32
-
33
- protected function _afterSave() {
34
- $time = $this->getData('groups/reevoo_purchaserfeed/fields/time/value');
35
- $frequncy = $this->getData('groups/reevoo_purchaserfeed/frequency/value');
36
-
37
- $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY;
38
- $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY;
39
- $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY;
40
-
41
- $cronDayOfWeek = date('N');
42
-
43
- $cronExprArray = array(
44
- intval($time[1]), # Minute
45
- intval($time[0]), # Hour
46
- ($frequncy == $frequencyMonthly) ? '1' : '*', # Day of the Month
47
- '*', # Month of the Year
48
- ($frequncy == $frequencyWeekly) ? '1' : '*', # Day of the Week
49
- );
50
-
51
- $cronExprString = join(' ', $cronExprArray);
52
-
53
- try {
54
- Mage::getModel('core/config_data')
55
- ->load(self::CRON_STRING_PATH, 'path')
56
- ->setValue($cronExprString)
57
- ->setPath(self::CRON_STRING_PATH)
58
- ->save();
59
- Mage::getModel('core/config_data')
60
- ->load(self::CRON_MODEL_PATH, 'path')
61
- ->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH))
62
- ->setPath(self::CRON_MODEL_PATH)
63
- ->save();
64
- } catch (Exception $e) {
65
- throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
66
- }
67
- }
68
-
69
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Backend_Purchaser_Cron extends Mage_Core_Model_Config_Data {
24
+
25
+ const CRON_STRING_PATH = 'crontab/jobs/reevoo_purchaserfeed_cron/schedule/cron_expr';
26
+ const CRON_MODEL_PATH = 'crontab/jobs/reevoo_purchaserfeed_cron/run/model';
27
+
28
+ /*
29
+ * Processes Dynamic Cronjob setup.
30
+ * @return Null
31
+ */
32
+
33
+ protected function _afterSave() {
34
+ $time = $this->getData('groups/reevoo_purchaserfeed/fields/time/value');
35
+ $frequncy = $this->getData('groups/reevoo_purchaserfeed/frequency/value');
36
+
37
+ $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY;
38
+ $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY;
39
+ $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY;
40
+
41
+ $cronDayOfWeek = date('N');
42
+
43
+ $cronExprArray = array(
44
+ intval($time[1]), # Minute
45
+ intval($time[0]), # Hour
46
+ ($frequncy == $frequencyMonthly) ? '1' : '*', # Day of the Month
47
+ '*', # Month of the Year
48
+ ($frequncy == $frequencyWeekly) ? '1' : '*', # Day of the Week
49
+ );
50
+
51
+ $cronExprString = join(' ', $cronExprArray);
52
+
53
+ try {
54
+ Mage::getModel('core/config_data')
55
+ ->load(self::CRON_STRING_PATH, 'path')
56
+ ->setValue($cronExprString)
57
+ ->setPath(self::CRON_STRING_PATH)
58
+ ->save();
59
+ Mage::getModel('core/config_data')
60
+ ->load(self::CRON_MODEL_PATH, 'path')
61
+ ->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH))
62
+ ->setPath(self::CRON_MODEL_PATH)
63
+ ->save();
64
+ } catch (Exception $e) {
65
+ throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
66
+ }
67
+ }
68
+
69
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Checkbox.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Checkbox extends Mage_Core_Model_Config_Data {
24
- /*
25
- * Attribute type checkbox.
26
- * @return array of true or false values.
27
- */
28
-
29
- public function toOptionArray() {
30
- return array(
31
- array(
32
- 'value' => '0',
33
- 'label' => 'Disable',
34
- ),
35
- array(
36
- 'value' => '1',
37
- 'label' => 'Enable',
38
- )
39
- );
40
- }
41
-
42
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Checkbox extends Mage_Core_Model_Config_Data {
24
+ /*
25
+ * Attribute type checkbox.
26
+ * @return array of true or false values.
27
+ */
28
+
29
+ public function toOptionArray() {
30
+ return array(
31
+ array(
32
+ 'value' => '0',
33
+ 'label' => 'Disable',
34
+ ),
35
+ array(
36
+ 'value' => '1',
37
+ 'label' => 'Enable',
38
+ )
39
+ );
40
+ }
41
+
42
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Attributeslist.php CHANGED
@@ -1,55 +1,55 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Attributeslist extends Mage_Core_Model_Config_Data {
24
- /*
25
- * Product Attributes type media_image.
26
- * @return array of attributes list
27
- */
28
-
29
- public function toOptionArray() {
30
- return $this->__getAttributes();
31
- }
32
-
33
- /*
34
- * Product Attributes type media_image for SKU.
35
- * @return array of attributes list
36
- */
37
-
38
- private function __getAttributes() {
39
- $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
40
- ->addFieldToFilter('frontend_input', array('eq' => 'media_image')) // We filter to only select data type media_image
41
- ->getItems();
42
-
43
- $data = array();
44
- foreach ($attributes as $attribute) {
45
- if (strlen($attribute->getFrontendLabel()) > 0) {
46
- $data[] = array(
47
- 'value' => $attribute->getAttributecode(),
48
- 'label' => $attribute->getFrontendLabel()
49
- );
50
- }
51
- }
52
- return $data;
53
- }
54
-
55
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Attributeslist extends Mage_Core_Model_Config_Data {
24
+ /*
25
+ * Product Attributes type media_image.
26
+ * @return array of attributes list
27
+ */
28
+
29
+ public function toOptionArray() {
30
+ return $this->__getAttributes();
31
+ }
32
+
33
+ /*
34
+ * Product Attributes type media_image for SKU.
35
+ * @return array of attributes list
36
+ */
37
+
38
+ private function __getAttributes() {
39
+ $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
40
+ ->addFieldToFilter('frontend_input', array('eq' => 'media_image')) // We filter to only select data type media_image
41
+ ->getItems();
42
+
43
+ $data = array();
44
+ foreach ($attributes as $attribute) {
45
+ if (strlen($attribute->getFrontendLabel()) > 0) {
46
+ $data[] = array(
47
+ 'value' => $attribute->getAttributecode(),
48
+ 'label' => $attribute->getFrontendLabel()
49
+ );
50
+ }
51
+ }
52
+ return $data;
53
+ }
54
+
55
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badges.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
-
24
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Badges extends Mage_Core_Model_Config_Data {
25
- /*
26
- * Dropdown Options for possible FTP options.
27
- * @return array of FTP options.
28
- */
29
- public function toOptionArray() {
30
- return array(
31
- array(
32
- 'value' => 'product_badge',
33
- 'label' => 'Product Badges',
34
- ),
35
- array(
36
- 'value' => 'owner_badge',
37
- 'label' => 'Ask an owner Badges',
38
- )
39
- );
40
- }
41
-
42
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+
24
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Badges extends Mage_Core_Model_Config_Data {
25
+ /*
26
+ * Dropdown Options for possible FTP options.
27
+ * @return array of FTP options.
28
+ */
29
+ public function toOptionArray() {
30
+ return array(
31
+ array(
32
+ 'value' => 'product_badge',
33
+ 'label' => 'Product Badges',
34
+ ),
35
+ array(
36
+ 'value' => 'owner_badge',
37
+ 'label' => 'Ask an owner Badges',
38
+ )
39
+ );
40
+ }
41
+
42
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badgeslocation.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
-
24
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Badgeslocation extends Mage_Core_Model_Config_Data {
25
- /*
26
- * Dropdown Options for possible FTP options.
27
- * @return array of FTP options.
28
- */
29
- public function toOptionArray() {
30
- return array(
31
- array(
32
- 'value' => 'listing_pages',
33
- 'label' => 'Listing Pages',
34
- ),
35
- array(
36
- 'value' => 'product_pages',
37
- 'label' => 'Product Pages',
38
- )
39
- );
40
- }
41
-
42
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+
24
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Badgeslocation extends Mage_Core_Model_Config_Data {
25
+ /*
26
+ * Dropdown Options for possible FTP options.
27
+ * @return array of FTP options.
28
+ */
29
+ public function toOptionArray() {
30
+ return array(
31
+ array(
32
+ 'value' => 'listing_pages',
33
+ 'label' => 'Listing Pages',
34
+ ),
35
+ array(
36
+ 'value' => 'product_pages',
37
+ 'label' => 'Product Pages',
38
+ )
39
+ );
40
+ }
41
+
42
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Textattributeslist.php CHANGED
@@ -1,55 +1,55 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Textattributeslist extends Mage_Core_Model_Config_Data {
24
- /*
25
- * Product Attributes type text for SKU.
26
- * @return array of attributes list
27
- */
28
-
29
- public function toOptionArray() {
30
- return $this->__getAttributes();
31
- }
32
-
33
- /*
34
- * Product Attributes type text for SKU.
35
- * @return array of attributes list
36
- */
37
-
38
- private function __getAttributes() {
39
- $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
40
- ->addFieldToFilter('frontend_input', array('eq' => 'text')) // We filter to only select data type to text so we can sure about this can an sku.
41
- ->getItems();
42
-
43
- $data = array();
44
- foreach ($attributes as $attribute) {
45
- if (strlen($attribute->getFrontendLabel()) > 0) {
46
- $data[] = array(
47
- 'value' => $attribute->getAttributecode(),
48
- 'label' => $attribute->getFrontendLabel()
49
- );
50
- }
51
- }
52
- return $data;
53
- }
54
-
55
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Textattributeslist extends Mage_Core_Model_Config_Data {
24
+ /*
25
+ * Product Attributes type text for SKU.
26
+ * @return array of attributes list
27
+ */
28
+
29
+ public function toOptionArray() {
30
+ return $this->__getAttributes();
31
+ }
32
+
33
+ /*
34
+ * Product Attributes type text for SKU.
35
+ * @return array of attributes list
36
+ */
37
+
38
+ private function __getAttributes() {
39
+ $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
40
+ ->addFieldToFilter('frontend_input', array('eq' => 'text')) // We filter to only select data type to text so we can sure about this can an sku.
41
+ ->getItems();
42
+
43
+ $data = array();
44
+ foreach ($attributes as $attribute) {
45
+ if (strlen($attribute->getFrontendLabel()) > 0) {
46
+ $data[] = array(
47
+ 'value' => $attribute->getAttributecode(),
48
+ 'label' => $attribute->getFrontendLabel()
49
+ );
50
+ }
51
+ }
52
+ return $data;
53
+ }
54
+
55
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Values.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
-
24
- class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Values extends Mage_Core_Model_Config_Data {
25
- /*
26
- * Dropdown Options for possible FTP options.
27
- * @return array of FTP options.
28
- */
29
- public function toOptionArray() {
30
- return array(
31
- array(
32
- 'value' => 'sftp',
33
- 'label' => 'SFTP',
34
- ),
35
- array(
36
- 'value' => 'ftp',
37
- 'label' => 'Active/Passive',
38
- )
39
- );
40
- }
41
-
42
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+
24
+ class EComHut_Reevoo_Model_Adminhtml_System_Config_Source_Dropdown_Values extends Mage_Core_Model_Config_Data {
25
+ /*
26
+ * Dropdown Options for possible FTP options.
27
+ * @return array of FTP options.
28
+ */
29
+ public function toOptionArray() {
30
+ return array(
31
+ array(
32
+ 'value' => 'sftp',
33
+ 'label' => 'SFTP',
34
+ ),
35
+ array(
36
+ 'value' => 'ftp',
37
+ 'label' => 'Active/Passive',
38
+ )
39
+ );
40
+ }
41
+
42
+ }
app/code/local/EComHut/Reevoo/Model/Cron.php CHANGED
@@ -1,65 +1,65 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Cron {
24
- /*
25
- * Initialization
26
- * @return NULL
27
- */
28
-
29
- protected function _construct() {
30
- $this->_init('reevoo/data');
31
- }
32
-
33
- /*
34
- * Processes Products Feed Collection.
35
- * @return CSV filename of the processed cron task.
36
- */
37
-
38
- function processProductsFeed() {
39
- try {
40
- $filename = Mage::getModel('reevoo/data')->cronProcessProducts();
41
- Mage::helper('reevoo/ftp')->setTransfer($filename);
42
- Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
43
- } catch (Exception $e) {
44
- Mage::logException($e);
45
- }
46
- return $this;
47
- }
48
-
49
- /*
50
- * Processes Purchase Feed Collection.
51
- * @return CSV of the processed cron task.
52
- */
53
-
54
- function processPurchaserFeed() {
55
- try {
56
- $filename = Mage::getModel('reevoo/data')->cronPurchaseOrders();
57
- Mage::helper('reevoo/ftp')->setTransfer($filename);
58
- Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
59
- } catch (Exception $ex) {
60
- Mage::logException($ex);
61
- }
62
- return $this;
63
- }
64
-
65
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Cron {
24
+ /*
25
+ * Initialization
26
+ * @return NULL
27
+ */
28
+
29
+ protected function _construct() {
30
+ $this->_init('reevoo/data');
31
+ }
32
+
33
+ /*
34
+ * Processes Products Feed Collection.
35
+ * @return CSV filename of the processed cron task.
36
+ */
37
+
38
+ function processProductsFeed() {
39
+ try {
40
+ $filename = Mage::getModel('reevoo/data')->cronProcessProducts();
41
+ Mage::helper('reevoo/ftp')->setTransfer($filename);
42
+ Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
43
+ } catch (Exception $e) {
44
+ Mage::logException($e);
45
+ }
46
+ return $this;
47
+ }
48
+
49
+ /*
50
+ * Processes Purchase Feed Collection.
51
+ * @return CSV of the processed cron task.
52
+ */
53
+
54
+ function processPurchaserFeed() {
55
+ try {
56
+ $filename = Mage::getModel('reevoo/data')->cronPurchaseOrders();
57
+ Mage::helper('reevoo/ftp')->setTransfer($filename);
58
+ Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
59
+ } catch (Exception $ex) {
60
+ Mage::logException($ex);
61
+ }
62
+ return $this;
63
+ }
64
+
65
+ }
app/code/local/EComHut/Reevoo/Model/Data.php CHANGED
@@ -1,144 +1,144 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Data extends Mage_Core_Model_Abstract {
24
- /*
25
- * Initializing constructor
26
- * @return Null
27
- */
28
-
29
- protected function _construct() {
30
- $this->_init('reevoo/data');
31
- }
32
-
33
- /*
34
- * Saves log into database.
35
- * @param string $type Type of the event log.
36
- * @param string $event Secret name of the event.
37
- * @param string $event_message Message to be saved in database.
38
- * @return Null
39
- */
40
-
41
- public function saveLog($type, $event, $event_message) {
42
- try {
43
- $resource = Mage::getSingleton('core/resource');
44
- $writeConnection = $resource->getConnection('core_write');
45
- $table = "ecomhut_logs";
46
- $tableName = Mage::getSingleton('core/resource')->getTableName($table);
47
- $sql = "INSERT INTO `$tableName` (`type`, `event`, `event_message`) VALUES ('{$type}', '{$event}', '{$event_message}')";
48
- $writeConnection->query($sql);
49
- } catch (Exception $e) {
50
- Mage::logException($e);
51
- }
52
- }
53
-
54
- /*
55
- * Main linked processor for processing products feed in cron.
56
- * @return Filename of the generated CSV.
57
- */
58
-
59
- public function cronProcessProducts() {
60
- try {
61
- $this->saveLog('cron_log', 'product_cronjob_start', 'Starting Cron for Products feed');
62
- $_helper = Mage::helper('reevoo');
63
- $data = $_helper->getProducts();
64
- $filename = $_helper->saveProductsCsv($data);
65
- $message = 'Processing done. Please verify from: ' . $filename . '. Time: ' . time();
66
- $this->saveLog('cron_log', 'product_cronjob_finished', $message);
67
- return $filename;
68
- } catch (Exception $e) {
69
- Mage::logException($e);
70
- }
71
- }
72
-
73
- /*
74
- * Main linked processor for purchase feed in cron.
75
- * @return filename of processed csv file.
76
- */
77
-
78
- public function cronPurchaseOrders() {
79
- try {
80
- $this->saveLog('cron_log', 'purchasefeed_cronjob_start', 'Starting Cron for Purchaseorders feed');
81
- $_helper = Mage::helper('reevoo');
82
- $data = $_helper->getPurchaseOrders();
83
- $filename = $_helper->savePurchaseOrdersCsv($data);
84
- $message = 'Processing done. Please verify from: ' . $filename . '. Time: ' . time();
85
- $this->saveLog('cron_log', 'purchasefeed_cronjob_finished', $message);
86
- return $filename; //generateCsv($fileName, $assocDataArray);
87
- } catch (Exception $ex) {
88
- Mage::logException($ex);
89
- }
90
- }
91
-
92
- /*
93
- * Returns last product feed cron time (used in delta cases)
94
- * @return timestap of last cron execution
95
- */
96
-
97
- public function getLastProductFeedDate() {
98
- try {
99
- $resource = Mage::getSingleton('core/resource');
100
- $readConnection = $resource->getConnection('core_read');
101
- $table = "ecomhut_logs";
102
- $tableName = Mage::getSingleton('core/resource')->getTableName($table);
103
- $sql = "SELECT timestamp(`event_time`) as `event_time` FROM `$tableName` WHERE `event` = 'product_cronjob_finished' ORDER BY `event_time` DESC LIMIT 1";
104
- return $readConnection->fetchOne($sql);
105
- } catch (Exception $ex) {
106
- Mage::logException($ex);
107
- }
108
- }
109
-
110
- /*
111
- * Returns last purchase feed cron time (used in delta cases)
112
- * @return timestap of last cron execution
113
- */
114
-
115
- public function getLastPurchaseFeedDate() {
116
- try {
117
- $resource = Mage::getSingleton('core/resource');
118
- $readConnection = $resource->getConnection('core_read');
119
- $table = "ecomhut_logs";
120
- $tableName = Mage::getSingleton('core/resource')->getTableName($table);
121
- $sql = "SELECT timestamp(`event_time`) as `event_time` FROM `$tableName` WHERE `event` = 'purchasefeed_cronjob_finished' ORDER BY `event_time` DESC LIMIT 1";
122
- return $readConnection->fetchOne($sql);
123
- } catch (Exception $ex) {
124
- Mage::logException($ex);
125
- }
126
- }
127
-
128
- /*
129
- * Operates dispatch operations. Will delete the csv file after uploading.
130
- * @return null;
131
- */
132
-
133
- public function __dispatchAfterUpload() {
134
- $_helper = Mage::getHelper('reevoo/ftp');
135
- if ($_helper->ftp_status) {
136
- if (unlink($_helper->filename)) {
137
- $this->saveLog('cron_log', '__dispatchAfterUpload', "Unlink file successful: " . $_helper->filename);
138
- } else {
139
- $this->saveLog('cron_log', '__dispatchAfterUpload', "Unlink file permission denied: " . $_helper->filename);
140
- }
141
- }
142
- }
143
-
144
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Data extends Mage_Core_Model_Abstract {
24
+ /*
25
+ * Initializing constructor
26
+ * @return Null
27
+ */
28
+
29
+ protected function _construct() {
30
+ $this->_init('reevoo/data');
31
+ }
32
+
33
+ /*
34
+ * Saves log into database.
35
+ * @param string $type Type of the event log.
36
+ * @param string $event Secret name of the event.
37
+ * @param string $event_message Message to be saved in database.
38
+ * @return Null
39
+ */
40
+
41
+ public function saveLog($type, $event, $event_message) {
42
+ try {
43
+ $resource = Mage::getSingleton('core/resource');
44
+ $writeConnection = $resource->getConnection('core_write');
45
+ $table = "ecomhut_logs";
46
+ $tableName = Mage::getSingleton('core/resource')->getTableName($table);
47
+ $sql = "INSERT INTO `$tableName` (`type`, `event`, `event_message`) VALUES ('{$type}', '{$event}', '{$event_message}')";
48
+ $writeConnection->query($sql);
49
+ } catch (Exception $e) {
50
+ Mage::logException($e);
51
+ }
52
+ }
53
+
54
+ /*
55
+ * Main linked processor for processing products feed in cron.
56
+ * @return Filename of the generated CSV.
57
+ */
58
+
59
+ public function cronProcessProducts() {
60
+ try {
61
+ $this->saveLog('cron_log', 'product_cronjob_start', 'Starting Cron for Products feed');
62
+ $_helper = Mage::helper('reevoo');
63
+ $data = $_helper->getProducts();
64
+ $filename = $_helper->saveProductsCsv($data);
65
+ $message = 'Processing done. Please verify from: ' . $filename . '. Time: ' . time();
66
+ $this->saveLog('cron_log', 'product_cronjob_finished', $message);
67
+ return $filename;
68
+ } catch (Exception $e) {
69
+ Mage::logException($e);
70
+ }
71
+ }
72
+
73
+ /*
74
+ * Main linked processor for purchase feed in cron.
75
+ * @return filename of processed csv file.
76
+ */
77
+
78
+ public function cronPurchaseOrders() {
79
+ try {
80
+ $this->saveLog('cron_log', 'purchasefeed_cronjob_start', 'Starting Cron for Purchaseorders feed');
81
+ $_helper = Mage::helper('reevoo');
82
+ $data = $_helper->getPurchaseOrders();
83
+ $filename = $_helper->savePurchaseOrdersCsv($data);
84
+ $message = 'Processing done. Please verify from: ' . $filename . '. Time: ' . time();
85
+ $this->saveLog('cron_log', 'purchasefeed_cronjob_finished', $message);
86
+ return $filename; //generateCsv($fileName, $assocDataArray);
87
+ } catch (Exception $ex) {
88
+ Mage::logException($ex);
89
+ }
90
+ }
91
+
92
+ /*
93
+ * Returns last product feed cron time (used in delta cases)
94
+ * @return timestap of last cron execution
95
+ */
96
+
97
+ public function getLastProductFeedDate() {
98
+ try {
99
+ $resource = Mage::getSingleton('core/resource');
100
+ $readConnection = $resource->getConnection('core_read');
101
+ $table = "ecomhut_logs";
102
+ $tableName = Mage::getSingleton('core/resource')->getTableName($table);
103
+ $sql = "SELECT timestamp(`event_time`) as `event_time` FROM `$tableName` WHERE `event` = 'product_cronjob_finished' ORDER BY `event_time` DESC LIMIT 1";
104
+ return $readConnection->fetchOne($sql);
105
+ } catch (Exception $ex) {
106
+ Mage::logException($ex);
107
+ }
108
+ }
109
+
110
+ /*
111
+ * Returns last purchase feed cron time (used in delta cases)
112
+ * @return timestap of last cron execution
113
+ */
114
+
115
+ public function getLastPurchaseFeedDate() {
116
+ try {
117
+ $resource = Mage::getSingleton('core/resource');
118
+ $readConnection = $resource->getConnection('core_read');
119
+ $table = "ecomhut_logs";
120
+ $tableName = Mage::getSingleton('core/resource')->getTableName($table);
121
+ $sql = "SELECT timestamp(`event_time`) as `event_time` FROM `$tableName` WHERE `event` = 'purchasefeed_cronjob_finished' ORDER BY `event_time` DESC LIMIT 1";
122
+ return $readConnection->fetchOne($sql);
123
+ } catch (Exception $ex) {
124
+ Mage::logException($ex);
125
+ }
126
+ }
127
+
128
+ /*
129
+ * Operates dispatch operations. Will delete the csv file after uploading.
130
+ * @return null;
131
+ */
132
+
133
+ public function __dispatchAfterUpload() {
134
+ $_helper = Mage::getHelper('reevoo/ftp');
135
+ if ($_helper->ftp_status) {
136
+ if (unlink($_helper->filename)) {
137
+ $this->saveLog('cron_log', '__dispatchAfterUpload', "Unlink file successful: " . $_helper->filename);
138
+ } else {
139
+ $this->saveLog('cron_log', '__dispatchAfterUpload', "Unlink file permission denied: " . $_helper->filename);
140
+ }
141
+ }
142
+ }
143
+
144
+ }
app/code/local/EComHut/Reevoo/Model/Observer.php CHANGED
@@ -1,55 +1,55 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Observer {
24
- /*
25
- * Receives Order completion as observer and enables layout to save data, and set some values
26
- * @param object $observer Object of Varien_Event_Observer
27
- * @return NULL.
28
- */
29
-
30
- public function setOrderTracking($observer) {
31
- $this->_setOrderTracking($observer);
32
- }
33
-
34
- /*
35
- * Receives Order completion as observer and enables layout to save data, and set some values
36
- * @param object $observer Object of Varien_Event_Observer
37
- * @return NULL.
38
- */
39
-
40
- private function _setOrderTracking(Varien_Event_Observer $observer) {
41
- Mage::getModel('reevoo/data')->saveLog('purchase_tracking', 'orde_tracking_event', 'Success');
42
- $orderIds = $observer->getEvent()->getOrderIds();
43
- if (empty($orderIds) || !is_array($orderIds)) {
44
- echo 'orders are not available in varient events.';
45
- return;
46
- }
47
- $block = Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('reevoo_header_elements');
48
- if ($block) {
49
- $block->setOrderData($orderIds);
50
- }else{
51
- echo 'block not found...!';
52
- }
53
- }
54
-
55
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Observer {
24
+ /*
25
+ * Receives Order completion as observer and enables layout to save data, and set some values
26
+ * @param object $observer Object of Varien_Event_Observer
27
+ * @return NULL.
28
+ */
29
+
30
+ public function setOrderTracking($observer) {
31
+ $this->_setOrderTracking($observer);
32
+ }
33
+
34
+ /*
35
+ * Receives Order completion as observer and enables layout to save data, and set some values
36
+ * @param object $observer Object of Varien_Event_Observer
37
+ * @return NULL.
38
+ */
39
+
40
+ private function _setOrderTracking(Varien_Event_Observer $observer) {
41
+ Mage::getModel('reevoo/data')->saveLog('purchase_tracking', 'orde_tracking_event', 'Success');
42
+ $orderIds = $observer->getEvent()->getOrderIds();
43
+ if (empty($orderIds) || !is_array($orderIds)) {
44
+ echo 'orders are not available in varient events.';
45
+ return;
46
+ }
47
+ $block = Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('reevoo_header_elements');
48
+ if ($block) {
49
+ $block->setOrderData($orderIds);
50
+ }else{
51
+ echo 'block not found...!';
52
+ }
53
+ }
54
+
55
+ }
app/code/local/EComHut/Reevoo/Model/Resource/Mysql4/Setup.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup {
24
-
25
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup {
24
+
25
+ }
app/code/local/EComHut/Reevoo/controllers/IndexController.php CHANGED
@@ -1,132 +1,132 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- class EComHut_Reevoo_IndexController extends Mage_Adminhtml_Controller_Action {
24
-
25
- public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) {
26
- error_reporting(0);
27
- parent::__construct($request, $response, $invokeArgs);
28
- }
29
-
30
- /*
31
- * @url reevoo/index/index
32
- * @return page basic view.
33
- */
34
-
35
- public function indexAction() {
36
- $this->loadLayout();
37
- $this->renderLayout();
38
- }
39
-
40
- /*
41
- * @url reevoo/index/products
42
- * @return Processes products cron manually.
43
- */
44
-
45
- public function productsAction() {
46
- $store_id = $this->getRequest()->getParams();
47
- $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/processproducts') . "?1&store=" . $store_id['store'];
48
- echo '<h3>Processing products feed.</h3>';
49
- echo '<p>Please wait while process is finished. Process can take longer depending on the catalog size.</p>';
50
- echo "<script>"
51
- . "window.location = '$url';"
52
- . "</script>";
53
- }
54
-
55
- /*
56
- * @url reevoo/index/processproducts
57
- * @return page with processing status.
58
- */
59
-
60
- public function processproductsAction() {
61
- try {
62
- $filename = Mage::getModel('reevoo/data')->cronProcessProducts();
63
- if (file_exists($filename)) {
64
-
65
- $path_parts = pathinfo($filename);
66
- $offerName = $path_parts['basename'];
67
-
68
- $message = 'Manual Processing Successful. Please verify from: ' . $filename . '. Time: ' . time();
69
- Mage::getModel('reevoo/data')->saveLog('cron_log', 'manual_cronjob_finished', $message);
70
-
71
- echo "<h3>Feed Processed Successfully.</h3>";
72
- if (Mage::helper('reevoo/ftp')->setTransfer($filename)) {
73
- echo '<p>Product feed file successfully uploaded to server.</p>';
74
- } else {
75
- echo '<p>Product feed generated and saved in: <b>' . $filename . '</b></p>';
76
- }
77
- Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
78
- } else {
79
- echo "<h3>Error in processing feed.</h3>";
80
- echo '<p>We are sorry, there are no products feed available or an configuration error occured.</p>';
81
- }
82
- } catch (Exception $e) {
83
- Mage::logException($e);
84
- }
85
- }
86
-
87
- /*
88
- * @url reevoo/index/purchase
89
- * @return Processes purchase cron job..
90
- */
91
-
92
- public function purchasesAction() {
93
- $store_id = $this->getRequest()->getParams();
94
- $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/processpurchases') . "?1&store=" . $store_id['store'];
95
- echo '<h3>Processing purchase feed.</h3>';
96
- echo '<p>Please wait while process is finished. Process can take longer depending on the number of purchases.</p>';
97
- echo "<script>"
98
- . "window.location = '$url';"
99
- . "</script>";
100
- }
101
-
102
- /*
103
- * @url reevoo/index/processpurchase
104
- * @return page with processing status.
105
- */
106
-
107
- public function processpurchasesAction() {
108
- try {
109
- $filename = Mage::getModel('reevoo/data')->cronPurchaseOrders();
110
-
111
- if (file_exists($filename)) {
112
- $path_parts = pathinfo($filename);
113
- $offerName = $path_parts['basename'];
114
- $message = 'Manual Processing Successful. Please verify from: ' . $filename . '. Time: ' . time();
115
- Mage::getModel('reevoo/data')->saveLog('cron_log', 'manual_cronjob_finished', $message);
116
-
117
- echo "<h3>Feed Processed Successfully.</h3>";
118
- if (Mage::helper('reevoo/ftp')->setTransfer($filename)) {
119
- echo '<p>Purchase feed successfully uploaded to server.</p>';
120
- } else {
121
- echo '<p>Purchase feed generated and saved in: <b>' . $filename . '</b></p>';
122
- }
123
- Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
124
- } else {
125
- echo 'We are sorry, there are no products feed available or an configuration error occured.';
126
- }
127
- } catch (Exception $e) {
128
- Mage::logException($e);
129
- }
130
- }
131
-
132
- }
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ class EComHut_Reevoo_IndexController extends Mage_Adminhtml_Controller_Action {
24
+
25
+ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) {
26
+ error_reporting(0);
27
+ parent::__construct($request, $response, $invokeArgs);
28
+ }
29
+
30
+ /*
31
+ * @url reevoo/index/index
32
+ * @return page basic view.
33
+ */
34
+
35
+ public function indexAction() {
36
+ $this->loadLayout();
37
+ $this->renderLayout();
38
+ }
39
+
40
+ /*
41
+ * @url reevoo/index/products
42
+ * @return Processes products cron manually.
43
+ */
44
+
45
+ public function productsAction() {
46
+ $store_id = $this->getRequest()->getParams();
47
+ $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/processproducts') . "?1&store=" . $store_id['store'];
48
+ echo '<h3>Processing products feed.</h3>';
49
+ echo '<p>Please wait while process is finished. Process can take longer depending on the catalog size.</p>';
50
+ echo "<script>"
51
+ . "window.location = '$url';"
52
+ . "</script>";
53
+ }
54
+
55
+ /*
56
+ * @url reevoo/index/processproducts
57
+ * @return page with processing status.
58
+ */
59
+
60
+ public function processproductsAction() {
61
+ try {
62
+ $filename = Mage::getModel('reevoo/data')->cronProcessProducts();
63
+ if (file_exists($filename)) {
64
+
65
+ $path_parts = pathinfo($filename);
66
+ $offerName = $path_parts['basename'];
67
+
68
+ $message = 'Manual Processing Successful. Please verify from: ' . $filename . '. Time: ' . time();
69
+ Mage::getModel('reevoo/data')->saveLog('cron_log', 'manual_cronjob_finished', $message);
70
+
71
+ echo "<h3>Feed Processed Successfully.</h3>";
72
+ if (Mage::helper('reevoo/ftp')->setTransfer($filename)) {
73
+ echo '<p>Product feed file successfully uploaded to server.</p>';
74
+ } else {
75
+ echo '<p>Product feed generated and saved in: <b>' . $filename . '</b></p>';
76
+ }
77
+ Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
78
+ } else {
79
+ echo "<h3>Error in processing feed.</h3>";
80
+ echo '<p>We are sorry, there are no products feed available or an configuration error occured.</p>';
81
+ }
82
+ } catch (Exception $e) {
83
+ Mage::logException($e);
84
+ }
85
+ }
86
+
87
+ /*
88
+ * @url reevoo/index/purchase
89
+ * @return Processes purchase cron job..
90
+ */
91
+
92
+ public function purchasesAction() {
93
+ $store_id = $this->getRequest()->getParams();
94
+ $url = Mage::getModel('adminhtml/url')->getUrl('reevoo/index/processpurchases') . "?1&store=" . $store_id['store'];
95
+ echo '<h3>Processing purchase feed.</h3>';
96
+ echo '<p>Please wait while process is finished. Process can take longer depending on the number of purchases.</p>';
97
+ echo "<script>"
98
+ . "window.location = '$url';"
99
+ . "</script>";
100
+ }
101
+
102
+ /*
103
+ * @url reevoo/index/processpurchase
104
+ * @return page with processing status.
105
+ */
106
+
107
+ public function processpurchasesAction() {
108
+ try {
109
+ $filename = Mage::getModel('reevoo/data')->cronPurchaseOrders();
110
+
111
+ if (file_exists($filename)) {
112
+ $path_parts = pathinfo($filename);
113
+ $offerName = $path_parts['basename'];
114
+ $message = 'Manual Processing Successful. Please verify from: ' . $filename . '. Time: ' . time();
115
+ Mage::getModel('reevoo/data')->saveLog('cron_log', 'manual_cronjob_finished', $message);
116
+
117
+ echo "<h3>Feed Processed Successfully.</h3>";
118
+ if (Mage::helper('reevoo/ftp')->setTransfer($filename)) {
119
+ echo '<p>Purchase feed successfully uploaded to server.</p>';
120
+ } else {
121
+ echo '<p>Purchase feed generated and saved in: <b>' . $filename . '</b></p>';
122
+ }
123
+ Mage::getModel('reevoo/data')->__dispatchAfterUpload(); // Will delete file after offering download
124
+ } else {
125
+ echo 'We are sorry, there are no products feed available or an configuration error occured.';
126
+ }
127
+ } catch (Exception $e) {
128
+ Mage::logException($e);
129
+ }
130
+ }
131
+
132
+ }
app/code/local/EComHut/Reevoo/etc/system.xml CHANGED
@@ -1,541 +1,541 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- -->
24
- <config>
25
- <tabs>
26
- <eComHut translate="label" module="reevoo">
27
- <label>Reevoo Configurations</label>
28
- <sort_order>12</sort_order>
29
- </eComHut>
30
- </tabs>
31
- <sections>
32
- <reevoo_setup translate="label" module="reevoo">
33
- <label>Reevoo Configurations</label>
34
- <tab>eComHut</tab>
35
- <frontend_type>text</frontend_type>
36
- <sort_order>500</sort_order>
37
- <show_in_default>1</show_in_default>
38
- <show_in_website>1</show_in_website>
39
- <show_in_store>1</show_in_store>
40
- <groups>
41
- <reevoo_status translate="label" module="reevoo">
42
- <label>Badges Configurations</label>
43
- <sort_order>1</sort_order>
44
- <show_in_default>1</show_in_default>
45
- <show_in_website>1</show_in_website>
46
- <show_in_store>1</show_in_store>
47
- <fields>
48
- <status translate="label">
49
- <label>Reevoo Extension Status</label>
50
- <frontend_type>select</frontend_type>
51
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
52
- <sort_order>50</sort_order>
53
- <show_in_default>1</show_in_default>
54
- <show_in_website>1</show_in_website>
55
- <show_in_store>1</show_in_store>
56
- </status>
57
- <tracking_reference translate="label, comment">
58
- <label>Reevoo Tracking Reference</label>
59
- <comment><![CDATA[Enter tracking reference from Reevoo.]]></comment>
60
- <frontend_type>text</frontend_type>
61
- <sort_order>54</sort_order>
62
- <show_in_default>1</show_in_default>
63
- <show_in_website>0</show_in_website>
64
- <show_in_store>0</show_in_store>
65
- <depends>
66
- <status>1</status>
67
- </depends>
68
- </tracking_reference>
69
- <embedded_reviews translate="label, comment">
70
- <label>Product Embedded Reviews</label>
71
- <comment><![CDATA[Enable/Disable Product Embedded Reviews]]></comment>
72
- <frontend_type>select</frontend_type>
73
- <source_model>adminhtml/system_config_source_yesno</source_model>
74
- <sort_order>55</sort_order>
75
- <show_in_default>1</show_in_default>
76
- <show_in_website>0</show_in_website>
77
- <show_in_store>0</show_in_store>
78
- <depends>
79
- <status>1</status>
80
- </depends>
81
- </embedded_reviews>
82
- <embedded_reviews_pagination translate="label, comment">
83
- <label>Product Embedded Reviews Pagination</label>
84
- <comment><![CDATA[Enable/Disable Pagination on Product Embedded Reviews]]></comment>
85
- <frontend_type>select</frontend_type>
86
- <source_model>adminhtml/system_config_source_yesno</source_model>
87
- <sort_order>56</sort_order>
88
- <show_in_default>1</show_in_default>
89
- <show_in_website>0</show_in_website>
90
- <show_in_store>0</show_in_store>
91
- <depends>
92
- <status>1</status>
93
- <embedded_reviews>1</embedded_reviews>
94
- </depends>
95
- </embedded_reviews_pagination>
96
- <embedded_reviews_count translate="label, comment">
97
- <label>Number of Embedded Reviews</label>
98
- <comment><![CDATA[Enter Number of embedded reviews to be shown on embedded reviews page.]]></comment>
99
- <frontend_type>text</frontend_type>
100
- <sort_order>57</sort_order>
101
- <show_in_default>1</show_in_default>
102
- <show_in_website>0</show_in_website>
103
- <show_in_store>0</show_in_store>
104
- <depends>
105
- <status>1</status>
106
- <embedded_reviews>1</embedded_reviews>
107
- </depends>
108
- </embedded_reviews_count>
109
- <default_sku translate="label, comment">
110
- <label>Default Product SKU</label>
111
- <comment><![CDATA[Select product attribute used as a Sku for ratings/reviews used by Reevoo.]]></comment>
112
- <frontend_type>select</frontend_type>
113
- <source_model>reevoo/adminhtml_system_config_source_dropdown_textattributeslist</source_model>
114
- <sort_order>58</sort_order>
115
- <show_in_default>1</show_in_default>
116
- <show_in_website>1</show_in_website>
117
- <show_in_store>0</show_in_store>
118
- <depends>
119
- <status>1</status>
120
- </depends>
121
- </default_sku>
122
- <locale translate="label, comment">
123
- <label>Reevoo Locale</label>
124
- <comment><![CDATA[Select site locale.]]></comment>
125
- <frontend_type>select</frontend_type>
126
- <source_model>adminhtml/system_config_source_locale</source_model>
127
- <sort_order>59</sort_order>
128
- <show_in_default>1</show_in_default>
129
- <show_in_website>1</show_in_website>
130
- <show_in_store>1</show_in_store>
131
- <depends>
132
- <status>1</status>
133
- </depends>
134
- </locale>
135
- <badges translate="label, comment">
136
- <label>Product/Conversation Badges</label>
137
- <comment><![CDATA[Select/Deselect to show/hide Product/Conversation badges. The selected will be displayed on pages chosen in Product/Conversation Badges Visibility. Tip: Ctrl + Click to multi-select values.]]></comment>
138
- <frontend_type>multiselect</frontend_type>
139
- <source_model>reevoo/adminhtml_system_config_source_dropdown_badges</source_model>
140
- <sort_order>60</sort_order>
141
- <show_in_default>1</show_in_default>
142
- <show_in_website>1</show_in_website>
143
- <show_in_store>0</show_in_store>
144
- <depends>
145
- <status>1</status>
146
- </depends>
147
- </badges>
148
- <badges_location translate="label, comment">
149
- <label>Product/Conversation Badges Visibility</label>
150
- <comment><![CDATA[Select/Deselect to choose the visibility of Product/Conversation badges on the listed pages. Tip: Click+Ctrl to multi-select values.]]></comment>
151
- <frontend_type>multiselect</frontend_type>
152
- <source_model>reevoo/adminhtml_system_config_source_dropdown_badgeslocation</source_model>
153
- <sort_order>61</sort_order>
154
- <show_in_default>1</show_in_default>
155
- <show_in_website>1</show_in_website>
156
- <show_in_store>0</show_in_store>
157
- <can_be_empty>1</can_be_empty>
158
- <depends>
159
- <status>1</status>
160
- </depends>
161
- </badges_location>
162
- <product_list_varient_for_badge translate="label, comment">
163
- <label>Product Badges Variant (Category Listing Page)</label>
164
- <comment><![CDATA[Enter varient name for Product Badge. It only applies to category listing page.]]></comment>
165
- <frontend_type>text</frontend_type>
166
- <sort_order>62</sort_order>
167
- <show_in_default>1</show_in_default>
168
- <show_in_website>0</show_in_website>
169
- <show_in_store>0</show_in_store>
170
- <can_be_empty>1</can_be_empty>
171
- <depends>
172
- <status>1</status>
173
- </depends>
174
- </product_list_varient_for_badge>
175
- <product_varient_for_badge translate="label, comment">
176
- <label>Product Badges Variant (Product Page)</label>
177
- <comment><![CDATA[Enter varient name for Product Badge. It only applies to Product Page...]]></comment>
178
- <frontend_type>text</frontend_type>
179
- <sort_order>63</sort_order>
180
- <show_in_default>1</show_in_default>
181
- <show_in_website>0</show_in_website>
182
- <show_in_store>0</show_in_store>
183
- <depends>
184
- <status>1</status>
185
- </depends>
186
- </product_varient_for_badge>
187
- <askanhonor_list_varient_for_badge translate="label, comment">
188
- <label>Conversation Badge Variant (Category Listing Page)</label>
189
- <comment><![CDATA[Enter variant name for Conversation (Ask an Owner) Badge. It only applies to category listing page.]]></comment>
190
- <frontend_type>text</frontend_type>
191
- <sort_order>64</sort_order>
192
- <show_in_default>1</show_in_default>
193
- <show_in_website>0</show_in_website>
194
- <show_in_store>0</show_in_store>
195
- <depends>
196
- <status>1</status>
197
- </depends>
198
- </askanhonor_list_varient_for_badge>
199
- <askanhonor_varient_for_badge translate="label, comment">
200
- <label>Conversation Badge Variant (Product Page)</label>
201
- <comment><![CDATA[Enter variant name for Conversation (Ask an Owner) Badge. It only applies to product page.]]></comment>
202
- <frontend_type>text</frontend_type>
203
- <sort_order>65</sort_order>
204
- <show_in_default>1</show_in_default>
205
- <show_in_website>0</show_in_website>
206
- <show_in_store>0</show_in_store>
207
- <depends>
208
- <status>1</status>
209
- </depends>
210
- </askanhonor_varient_for_badge>
211
- </fields>
212
- </reevoo_status>
213
- <reevoo_ftp translate="label" module="reevoo">
214
- <label>Feeds Configuration</label>
215
- <sort_order>2</sort_order>
216
- <show_in_default>1</show_in_default>
217
- <show_in_website>0</show_in_website>
218
- <show_in_store>0</show_in_store>
219
- <fields>
220
- <ftp_status translate="label, comment">
221
- <label>FTP Status</label>
222
- <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
223
- <frontend_type>select</frontend_type>
224
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
225
- <sort_order>1</sort_order>
226
- <show_in_default>1</show_in_default>
227
- <show_in_website>0</show_in_website>
228
- <show_in_store>0</show_in_store>
229
- </ftp_status>
230
- <ftp_type translate="label, comment">
231
- <label>FTP Mode</label>
232
- <comment><![CDATA[Select mode]]></comment>
233
- <frontend_type>select</frontend_type>
234
- <source_model>reevoo/adminhtml_system_config_source_dropdown_values</source_model>
235
- <sort_order>2</sort_order>
236
- <show_in_default>1</show_in_default>
237
- <show_in_website>0</show_in_website>
238
- <show_in_store>0</show_in_store>
239
- <depends>
240
- <ftp_status>1</ftp_status>
241
- </depends>
242
- </ftp_type>
243
- <ftp_host translate="label, comment">
244
- <label>FTP Host</label>
245
- <comment><![CDATA[Either IP or domain address.]]></comment>
246
- <frontend_type>text</frontend_type>
247
- <sort_order>3</sort_order>
248
- <show_in_default>1</show_in_default>
249
- <show_in_website>0</show_in_website>
250
- <show_in_store>0</show_in_store>
251
- <depends>
252
- <ftp_status>1</ftp_status>
253
- </depends>
254
- <validate>required-entry</validate>
255
- </ftp_host>
256
- <ftp_port translate="label, comment">
257
- <label>FTP Port</label>
258
- <comment><![CDATA[Port on server. If empty than default values for Passive/Active is 21 and for SFTP its 22.]]></comment>
259
- <frontend_type>text</frontend_type>
260
- <sort_order>4</sort_order>
261
- <show_in_default>1</show_in_default>
262
- <show_in_website>0</show_in_website>
263
- <show_in_store>0</show_in_store>
264
- <depends>
265
- <ftp_status>1</ftp_status>
266
- </depends>
267
- </ftp_port>
268
- <ftp_user translate="label, comment">
269
- <label>FTP Username</label>
270
- <comment><![CDATA[Username for FTP.]]></comment>
271
- <frontend_type>text</frontend_type>
272
- <sort_order>5</sort_order>
273
- <show_in_default>1</show_in_default>
274
- <show_in_website>0</show_in_website>
275
- <show_in_store>0</show_in_store>
276
- <depends>
277
- <ftp_status>1</ftp_status>
278
- </depends>
279
- <validate>required-entry</validate>
280
- </ftp_user>
281
- <ftp_pass translate="label, comment">
282
- <label>FTP Password</label>
283
- <comment><![CDATA[Password for FTP.]]></comment>
284
- <frontend_type>text</frontend_type>
285
- <sort_order>6</sort_order>
286
- <show_in_default>1</show_in_default>
287
- <show_in_website>0</show_in_website>
288
- <show_in_store>0</show_in_store>
289
- <depends>
290
- <ftp_status>1</ftp_status>
291
- </depends>
292
- <validate>required-entry</validate>
293
- </ftp_pass>
294
- <ftp_path translate="label, comment">
295
- <label>FTP Path</label>
296
- <comment><![CDATA[Path for FTP.]]></comment>
297
- <frontend_type>text</frontend_type>
298
- <sort_order>7</sort_order>
299
- <show_in_default>1</show_in_default>
300
- <show_in_website>0</show_in_website>
301
- <show_in_store>0</show_in_store>
302
- <depends>
303
- <ftp_status>1</ftp_status>
304
- </depends>
305
- <validate>required-entry</validate>
306
- </ftp_path>
307
- <productfeed_delta translate="label, comment">
308
- <label>Product Feed Delta</label>
309
- <comment><![CDATA[Export reevoo product field by delta.]]></comment>
310
- <frontend_type>select</frontend_type>
311
- <source_model>adminhtml/system_config_source_yesno</source_model>
312
- <sort_order>8</sort_order>
313
- <show_in_default>1</show_in_default>
314
- <show_in_website>0</show_in_website>
315
- <show_in_store>0</show_in_store>
316
- </productfeed_delta>
317
- <purchasefeed_delta translate="label, comment">
318
- <label>Purchase Feed Delta</label>
319
- <comment><![CDATA[Export reevoo purchase field by delta.]]></comment>
320
- <frontend_type>select</frontend_type>
321
- <source_model>adminhtml/system_config_source_yesno</source_model>
322
- <sort_order>9</sort_order>
323
- <show_in_default>1</show_in_default>
324
- <show_in_website>0</show_in_website>
325
- <show_in_store>0</show_in_store>
326
- </purchasefeed_delta>
327
- <productfeed_defaultimage translate="label, comment">
328
- <label>Default Product Image</label>
329
- <comment><![CDATA[Select default product image to be exported in Product Feed.]]></comment>
330
- <frontend_type>select</frontend_type>
331
- <source_model>reevoo/adminhtml_system_config_source_dropdown_attributeslist</source_model>
332
- <sort_order>10</sort_order>
333
- <show_in_default>1</show_in_default>
334
- <show_in_website>1</show_in_website>
335
- <show_in_store>0</show_in_store>
336
- <depends>
337
- <status>1</status>
338
- </depends>
339
- </productfeed_defaultimage>
340
- <run_prfeed translate="label">
341
- <label>Generate Product Feed</label>
342
- <frontend_type>button</frontend_type>
343
- <frontend_model>reevoo/productfeedbtn</frontend_model>
344
- <sort_order>11</sort_order>
345
- <show_in_default>1</show_in_default>
346
- <show_in_website>1</show_in_website>
347
- <show_in_store>1</show_in_store>
348
- <depends>
349
- <status>1</status>
350
- </depends>
351
- </run_prfeed>
352
- <run translate="label">
353
- <label>Generate Purchase Feed</label>
354
- <frontend_type>button</frontend_type>
355
- <frontend_model>reevoo/purchasefeedbtn</frontend_model>
356
- <sort_order>12</sort_order>
357
- <show_in_default>1</show_in_default>
358
- <show_in_website>1</show_in_website>
359
- <show_in_store>1</show_in_store>
360
- <depends>
361
- <status>1</status>
362
- </depends>
363
- </run>
364
- </fields>
365
- </reevoo_ftp>
366
- <reevoo_tracking translate="label" module="reevoo">
367
- <label>Tracking Configurations</label>
368
- <sort_order>3</sort_order>
369
- <show_in_default>1</show_in_default>
370
- <show_in_website>1</show_in_website>
371
- <show_in_store>0</show_in_store>
372
- <fields>
373
- <tracking_status translate="label, comment">
374
- <label>Tracking Status</label>
375
- <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
376
- <frontend_type>select</frontend_type>
377
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
378
- <sort_order>1</sort_order>
379
- <show_in_default>1</show_in_default>
380
- <show_in_website>0</show_in_website>
381
- <show_in_store>0</show_in_store>
382
- </tracking_status>
383
- <tracking_purchase translate="label, comment">
384
- <label>Purchase Tracking</label>
385
- <comment><![CDATA[Choose to track the purchases on the order confirmation page.]]></comment>
386
- <frontend_type>select</frontend_type>
387
- <source_model>adminhtml/system_config_source_yesno</source_model>
388
- <sort_order>3</sort_order>
389
- <show_in_default>1</show_in_default>
390
- <show_in_website>1</show_in_website>
391
- <show_in_store>0</show_in_store>
392
- <depends>
393
- <tracking_status>1</tracking_status>
394
- </depends>
395
- </tracking_purchase>
396
- <tracking_propensity translate="label, comment">
397
- <label>Propensity Tracking</label>
398
- <comment><![CDATA[To track the possible purchases for the merchants that do not offer online sales on their site thus enabling this will let them to include this tracking on any page on their site.]]></comment>
399
- <frontend_type>select</frontend_type>
400
- <source_model>adminhtml/system_config_source_yesno</source_model>
401
- <sort_order>4</sort_order>
402
- <show_in_default>1</show_in_default>
403
- <show_in_website>1</show_in_website>
404
- <show_in_store>0</show_in_store>
405
- <depends>
406
- <tracking_status>1</tracking_status>
407
- </depends>
408
- </tracking_propensity>
409
- </fields>
410
- </reevoo_tracking>
411
-
412
-
413
- </groups>
414
- </reevoo_setup>
415
- <reevoo translate="label" module="reevoo">
416
- <label>Reevoo Cronjob Configurations</label>
417
- <tab>eComHut</tab>
418
- <frontend_type>text</frontend_type>
419
- <sort_order>509</sort_order>
420
- <show_in_default>1</show_in_default>
421
- <show_in_website>1</show_in_website>
422
- <show_in_store>1</show_in_store>
423
- <groups>
424
- <reevoo_productfeed translate="label" module="reevoo">
425
- <label>Product Feed Cronjob</label>
426
- <sort_order>1</sort_order>
427
- <show_in_default>1</show_in_default>
428
- <show_in_website>1</show_in_website>
429
- <show_in_store>1</show_in_store>
430
- <fields>
431
- <status translate="label, comment">
432
- <label>Status</label>
433
- <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
434
- <frontend_type>select</frontend_type>
435
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
436
- <sort_order>1</sort_order>
437
- <show_in_default>1</show_in_default>
438
- <show_in_website>0</show_in_website>
439
- <show_in_store>0</show_in_store>
440
- </status>
441
- <!-- Cron job time -->
442
- <time translate="label">
443
- <label>Start Time</label>
444
- <frontend_type>time</frontend_type>
445
- <sort_order>200</sort_order>
446
- <show_in_default>1</show_in_default>
447
- <show_in_website>0</show_in_website>
448
- <show_in_store>0</show_in_store>
449
- <depends>
450
- <status>1</status>
451
- </depends>
452
- </time>
453
- <!--other fields here-->
454
- <frequency translate="label">
455
- <label>Frequency</label>
456
- <frontend_type>select</frontend_type>
457
- <source_model>adminhtml/system_config_source_cron_frequency</source_model>
458
- <!-- Custom backend model which saves cron configuration -->
459
- <backend_model>reevoo/adminhtml_system_config_backend_product_cron</backend_model>
460
- <sort_order>201</sort_order>
461
- <show_in_default>1</show_in_default>
462
- <show_in_website>0</show_in_website>
463
- <show_in_store>0</show_in_store>
464
- <comment>Job Frequency.</comment>
465
- <depends>
466
- <status>1</status>
467
- </depends>
468
- </frequency>
469
- </fields>
470
- </reevoo_productfeed>
471
- <reevoo_purchaserfeed translate="label" module="reevoo">
472
- <label>Purchaser Feed Cronjob</label>
473
- <sort_order>2</sort_order>
474
- <show_in_default>1</show_in_default>
475
- <show_in_website>1</show_in_website>
476
- <show_in_store>1</show_in_store>
477
- <fields>
478
- <status translate="label, comment">
479
- <label>Status</label>
480
- <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
481
- <frontend_type>select</frontend_type>
482
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
483
- <sort_order>1</sort_order>
484
- <show_in_default>1</show_in_default>
485
- <show_in_website>0</show_in_website>
486
- <show_in_store>0</show_in_store>
487
- </status>
488
- <time translate="label">
489
- <label>Start Time</label>
490
- <frontend_type>time</frontend_type>
491
- <sort_order>200</sort_order>
492
- <show_in_default>1</show_in_default>
493
- <show_in_website>0</show_in_website>
494
- <show_in_store>0</show_in_store>
495
- <depends>
496
- <status>1</status>
497
- </depends>
498
- </time>
499
- <!--other fields here-->
500
- <frequency translate="label">
501
- <label>Frequency</label>
502
- <frontend_type>select</frontend_type>
503
- <source_model>adminhtml/system_config_source_cron_frequency</source_model>
504
- <!-- Custom backend model which saves cron configuration -->
505
- <backend_model>reevoo/adminhtml_system_config_backend_purchaser_cron</backend_model>
506
- <sort_order>201</sort_order>
507
- <show_in_default>1</show_in_default>
508
- <show_in_website>0</show_in_website>
509
- <show_in_store>0</show_in_store>
510
- <comment>Job Frequency.</comment>
511
- <depends>
512
- <status>1</status>
513
- </depends>
514
- </frequency>
515
- <!-- Cron job time -->
516
- </fields>
517
- </reevoo_purchaserfeed>
518
- </groups>
519
- </reevoo>
520
- <reevoo_info translate="label" module="reevoo">
521
- <label>About Author</label>
522
- <tab>eComHut</tab>
523
- <frontend_type>text</frontend_type>
524
- <sort_order>510</sort_order>
525
- <show_in_default>1</show_in_default>
526
- <show_in_website>0</show_in_website>
527
- <show_in_store>0</show_in_store>
528
- <groups>
529
- <info translate="label">
530
- <label>Author Info</label>
531
- <frontend_type>text</frontend_type>
532
- <frontend_model>reevoo/info</frontend_model>
533
- <sort_order>50</sort_order>
534
- <show_in_default>1</show_in_default>
535
- <show_in_website>0</show_in_website>
536
- <show_in_store>0</show_in_store>
537
- </info>
538
- </groups>
539
- </reevoo_info>
540
- </sections>
541
- </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ -->
24
+ <config>
25
+ <tabs>
26
+ <eComHut translate="label" module="reevoo">
27
+ <label>Reevoo Configurations</label>
28
+ <sort_order>12</sort_order>
29
+ </eComHut>
30
+ </tabs>
31
+ <sections>
32
+ <reevoo_setup translate="label" module="reevoo">
33
+ <label>Reevoo Configurations</label>
34
+ <tab>eComHut</tab>
35
+ <frontend_type>text</frontend_type>
36
+ <sort_order>500</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ <groups>
41
+ <reevoo_status translate="label" module="reevoo">
42
+ <label>Badges Configurations</label>
43
+ <sort_order>1</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ <fields>
48
+ <status translate="label">
49
+ <label>Reevoo Extension Status</label>
50
+ <frontend_type>select</frontend_type>
51
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
52
+ <sort_order>50</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+ </status>
57
+ <tracking_reference translate="label, comment">
58
+ <label>Reevoo Tracking Reference</label>
59
+ <comment><![CDATA[Enter tracking reference from Reevoo.]]></comment>
60
+ <frontend_type>text</frontend_type>
61
+ <sort_order>54</sort_order>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>0</show_in_website>
64
+ <show_in_store>0</show_in_store>
65
+ <depends>
66
+ <status>1</status>
67
+ </depends>
68
+ </tracking_reference>
69
+ <embedded_reviews translate="label, comment">
70
+ <label>Product Embedded Reviews</label>
71
+ <comment><![CDATA[Enable/Disable Product Embedded Reviews]]></comment>
72
+ <frontend_type>select</frontend_type>
73
+ <source_model>adminhtml/system_config_source_yesno</source_model>
74
+ <sort_order>55</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>0</show_in_website>
77
+ <show_in_store>0</show_in_store>
78
+ <depends>
79
+ <status>1</status>
80
+ </depends>
81
+ </embedded_reviews>
82
+ <embedded_reviews_pagination translate="label, comment">
83
+ <label>Product Embedded Reviews Pagination</label>
84
+ <comment><![CDATA[Enable/Disable Pagination on Product Embedded Reviews]]></comment>
85
+ <frontend_type>select</frontend_type>
86
+ <source_model>adminhtml/system_config_source_yesno</source_model>
87
+ <sort_order>56</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>0</show_in_website>
90
+ <show_in_store>0</show_in_store>
91
+ <depends>
92
+ <status>1</status>
93
+ <embedded_reviews>1</embedded_reviews>
94
+ </depends>
95
+ </embedded_reviews_pagination>
96
+ <embedded_reviews_count translate="label, comment">
97
+ <label>Number of Embedded Reviews</label>
98
+ <comment><![CDATA[Enter Number of embedded reviews to be shown on embedded reviews page.]]></comment>
99
+ <frontend_type>text</frontend_type>
100
+ <sort_order>57</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>0</show_in_website>
103
+ <show_in_store>0</show_in_store>
104
+ <depends>
105
+ <status>1</status>
106
+ <embedded_reviews>1</embedded_reviews>
107
+ </depends>
108
+ </embedded_reviews_count>
109
+ <default_sku translate="label, comment">
110
+ <label>Default Product SKU</label>
111
+ <comment><![CDATA[Select product attribute used as a Sku for ratings/reviews used by Reevoo.]]></comment>
112
+ <frontend_type>select</frontend_type>
113
+ <source_model>reevoo/adminhtml_system_config_source_dropdown_textattributeslist</source_model>
114
+ <sort_order>58</sort_order>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
+ <show_in_store>0</show_in_store>
118
+ <depends>
119
+ <status>1</status>
120
+ </depends>
121
+ </default_sku>
122
+ <locale translate="label, comment">
123
+ <label>Reevoo Locale</label>
124
+ <comment><![CDATA[Select site locale.]]></comment>
125
+ <frontend_type>select</frontend_type>
126
+ <source_model>adminhtml/system_config_source_locale</source_model>
127
+ <sort_order>59</sort_order>
128
+ <show_in_default>1</show_in_default>
129
+ <show_in_website>1</show_in_website>
130
+ <show_in_store>1</show_in_store>
131
+ <depends>
132
+ <status>1</status>
133
+ </depends>
134
+ </locale>
135
+ <badges translate="label, comment">
136
+ <label>Product/Conversation Badges</label>
137
+ <comment><![CDATA[Select/Deselect to show/hide Product/Conversation badges. The selected will be displayed on pages chosen in Product/Conversation Badges Visibility. Tip: Ctrl + Click to multi-select values.]]></comment>
138
+ <frontend_type>multiselect</frontend_type>
139
+ <source_model>reevoo/adminhtml_system_config_source_dropdown_badges</source_model>
140
+ <sort_order>60</sort_order>
141
+ <show_in_default>1</show_in_default>
142
+ <show_in_website>1</show_in_website>
143
+ <show_in_store>0</show_in_store>
144
+ <depends>
145
+ <status>1</status>
146
+ </depends>
147
+ </badges>
148
+ <badges_location translate="label, comment">
149
+ <label>Product/Conversation Badges Visibility</label>
150
+ <comment><![CDATA[Select/Deselect to choose the visibility of Product/Conversation badges on the listed pages. Tip: Click+Ctrl to multi-select values.]]></comment>
151
+ <frontend_type>multiselect</frontend_type>
152
+ <source_model>reevoo/adminhtml_system_config_source_dropdown_badgeslocation</source_model>
153
+ <sort_order>61</sort_order>
154
+ <show_in_default>1</show_in_default>
155
+ <show_in_website>1</show_in_website>
156
+ <show_in_store>0</show_in_store>
157
+ <can_be_empty>1</can_be_empty>
158
+ <depends>
159
+ <status>1</status>
160
+ </depends>
161
+ </badges_location>
162
+ <product_list_varient_for_badge translate="label, comment">
163
+ <label>Product Badges Variant (Category Listing Page)</label>
164
+ <comment><![CDATA[Enter varient name for Product Badge. It only applies to category listing page.]]></comment>
165
+ <frontend_type>text</frontend_type>
166
+ <sort_order>62</sort_order>
167
+ <show_in_default>1</show_in_default>
168
+ <show_in_website>0</show_in_website>
169
+ <show_in_store>0</show_in_store>
170
+ <can_be_empty>1</can_be_empty>
171
+ <depends>
172
+ <status>1</status>
173
+ </depends>
174
+ </product_list_varient_for_badge>
175
+ <product_varient_for_badge translate="label, comment">
176
+ <label>Product Badges Variant (Product Page)</label>
177
+ <comment><![CDATA[Enter varient name for Product Badge. It only applies to Product Page...]]></comment>
178
+ <frontend_type>text</frontend_type>
179
+ <sort_order>63</sort_order>
180
+ <show_in_default>1</show_in_default>
181
+ <show_in_website>0</show_in_website>
182
+ <show_in_store>0</show_in_store>
183
+ <depends>
184
+ <status>1</status>
185
+ </depends>
186
+ </product_varient_for_badge>
187
+ <askanhonor_list_varient_for_badge translate="label, comment">
188
+ <label>Conversation Badge Variant (Category Listing Page)</label>
189
+ <comment><![CDATA[Enter variant name for Conversation (Ask an Owner) Badge. It only applies to category listing page.]]></comment>
190
+ <frontend_type>text</frontend_type>
191
+ <sort_order>64</sort_order>
192
+ <show_in_default>1</show_in_default>
193
+ <show_in_website>0</show_in_website>
194
+ <show_in_store>0</show_in_store>
195
+ <depends>
196
+ <status>1</status>
197
+ </depends>
198
+ </askanhonor_list_varient_for_badge>
199
+ <askanhonor_varient_for_badge translate="label, comment">
200
+ <label>Conversation Badge Variant (Product Page)</label>
201
+ <comment><![CDATA[Enter variant name for Conversation (Ask an Owner) Badge. It only applies to product page.]]></comment>
202
+ <frontend_type>text</frontend_type>
203
+ <sort_order>65</sort_order>
204
+ <show_in_default>1</show_in_default>
205
+ <show_in_website>0</show_in_website>
206
+ <show_in_store>0</show_in_store>
207
+ <depends>
208
+ <status>1</status>
209
+ </depends>
210
+ </askanhonor_varient_for_badge>
211
+ </fields>
212
+ </reevoo_status>
213
+ <reevoo_ftp translate="label" module="reevoo">
214
+ <label>Feeds Configuration</label>
215
+ <sort_order>2</sort_order>
216
+ <show_in_default>1</show_in_default>
217
+ <show_in_website>0</show_in_website>
218
+ <show_in_store>0</show_in_store>
219
+ <fields>
220
+ <ftp_status translate="label, comment">
221
+ <label>FTP Status</label>
222
+ <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
223
+ <frontend_type>select</frontend_type>
224
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
225
+ <sort_order>1</sort_order>
226
+ <show_in_default>1</show_in_default>
227
+ <show_in_website>0</show_in_website>
228
+ <show_in_store>0</show_in_store>
229
+ </ftp_status>
230
+ <ftp_type translate="label, comment">
231
+ <label>FTP Mode</label>
232
+ <comment><![CDATA[Select mode]]></comment>
233
+ <frontend_type>select</frontend_type>
234
+ <source_model>reevoo/adminhtml_system_config_source_dropdown_values</source_model>
235
+ <sort_order>2</sort_order>
236
+ <show_in_default>1</show_in_default>
237
+ <show_in_website>0</show_in_website>
238
+ <show_in_store>0</show_in_store>
239
+ <depends>
240
+ <ftp_status>1</ftp_status>
241
+ </depends>
242
+ </ftp_type>
243
+ <ftp_host translate="label, comment">
244
+ <label>FTP Host</label>
245
+ <comment><![CDATA[Either IP or domain address.]]></comment>
246
+ <frontend_type>text</frontend_type>
247
+ <sort_order>3</sort_order>
248
+ <show_in_default>1</show_in_default>
249
+ <show_in_website>0</show_in_website>
250
+ <show_in_store>0</show_in_store>
251
+ <depends>
252
+ <ftp_status>1</ftp_status>
253
+ </depends>
254
+ <validate>required-entry</validate>
255
+ </ftp_host>
256
+ <ftp_port translate="label, comment">
257
+ <label>FTP Port</label>
258
+ <comment><![CDATA[Port on server. If empty than default values for Passive/Active is 21 and for SFTP its 22.]]></comment>
259
+ <frontend_type>text</frontend_type>
260
+ <sort_order>4</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_website>0</show_in_website>
263
+ <show_in_store>0</show_in_store>
264
+ <depends>
265
+ <ftp_status>1</ftp_status>
266
+ </depends>
267
+ </ftp_port>
268
+ <ftp_user translate="label, comment">
269
+ <label>FTP Username</label>
270
+ <comment><![CDATA[Username for FTP.]]></comment>
271
+ <frontend_type>text</frontend_type>
272
+ <sort_order>5</sort_order>
273
+ <show_in_default>1</show_in_default>
274
+ <show_in_website>0</show_in_website>
275
+ <show_in_store>0</show_in_store>
276
+ <depends>
277
+ <ftp_status>1</ftp_status>
278
+ </depends>
279
+ <validate>required-entry</validate>
280
+ </ftp_user>
281
+ <ftp_pass translate="label, comment">
282
+ <label>FTP Password</label>
283
+ <comment><![CDATA[Password for FTP.]]></comment>
284
+ <frontend_type>text</frontend_type>
285
+ <sort_order>6</sort_order>
286
+ <show_in_default>1</show_in_default>
287
+ <show_in_website>0</show_in_website>
288
+ <show_in_store>0</show_in_store>
289
+ <depends>
290
+ <ftp_status>1</ftp_status>
291
+ </depends>
292
+ <validate>required-entry</validate>
293
+ </ftp_pass>
294
+ <ftp_path translate="label, comment">
295
+ <label>FTP Path</label>
296
+ <comment><![CDATA[Path for FTP.]]></comment>
297
+ <frontend_type>text</frontend_type>
298
+ <sort_order>7</sort_order>
299
+ <show_in_default>1</show_in_default>
300
+ <show_in_website>0</show_in_website>
301
+ <show_in_store>0</show_in_store>
302
+ <depends>
303
+ <ftp_status>1</ftp_status>
304
+ </depends>
305
+ <validate>required-entry</validate>
306
+ </ftp_path>
307
+ <productfeed_delta translate="label, comment">
308
+ <label>Product Feed Delta</label>
309
+ <comment><![CDATA[Export reevoo product field by delta.]]></comment>
310
+ <frontend_type>select</frontend_type>
311
+ <source_model>adminhtml/system_config_source_yesno</source_model>
312
+ <sort_order>8</sort_order>
313
+ <show_in_default>1</show_in_default>
314
+ <show_in_website>0</show_in_website>
315
+ <show_in_store>0</show_in_store>
316
+ </productfeed_delta>
317
+ <purchasefeed_delta translate="label, comment">
318
+ <label>Purchase Feed Delta</label>
319
+ <comment><![CDATA[Export reevoo purchase field by delta.]]></comment>
320
+ <frontend_type>select</frontend_type>
321
+ <source_model>adminhtml/system_config_source_yesno</source_model>
322
+ <sort_order>9</sort_order>
323
+ <show_in_default>1</show_in_default>
324
+ <show_in_website>0</show_in_website>
325
+ <show_in_store>0</show_in_store>
326
+ </purchasefeed_delta>
327
+ <productfeed_defaultimage translate="label, comment">
328
+ <label>Default Product Image</label>
329
+ <comment><![CDATA[Select default product image to be exported in Product Feed.]]></comment>
330
+ <frontend_type>select</frontend_type>
331
+ <source_model>reevoo/adminhtml_system_config_source_dropdown_attributeslist</source_model>
332
+ <sort_order>10</sort_order>
333
+ <show_in_default>1</show_in_default>
334
+ <show_in_website>1</show_in_website>
335
+ <show_in_store>0</show_in_store>
336
+ <depends>
337
+ <status>1</status>
338
+ </depends>
339
+ </productfeed_defaultimage>
340
+ <run_prfeed translate="label">
341
+ <label>Generate Product Feed</label>
342
+ <frontend_type>button</frontend_type>
343
+ <frontend_model>reevoo/productfeedbtn</frontend_model>
344
+ <sort_order>11</sort_order>
345
+ <show_in_default>1</show_in_default>
346
+ <show_in_website>1</show_in_website>
347
+ <show_in_store>1</show_in_store>
348
+ <depends>
349
+ <status>1</status>
350
+ </depends>
351
+ </run_prfeed>
352
+ <run translate="label">
353
+ <label>Generate Purchase Feed</label>
354
+ <frontend_type>button</frontend_type>
355
+ <frontend_model>reevoo/purchasefeedbtn</frontend_model>
356
+ <sort_order>12</sort_order>
357
+ <show_in_default>1</show_in_default>
358
+ <show_in_website>1</show_in_website>
359
+ <show_in_store>1</show_in_store>
360
+ <depends>
361
+ <status>1</status>
362
+ </depends>
363
+ </run>
364
+ </fields>
365
+ </reevoo_ftp>
366
+ <reevoo_tracking translate="label" module="reevoo">
367
+ <label>Tracking Configurations</label>
368
+ <sort_order>3</sort_order>
369
+ <show_in_default>1</show_in_default>
370
+ <show_in_website>1</show_in_website>
371
+ <show_in_store>0</show_in_store>
372
+ <fields>
373
+ <tracking_status translate="label, comment">
374
+ <label>Tracking Status</label>
375
+ <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
376
+ <frontend_type>select</frontend_type>
377
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
378
+ <sort_order>1</sort_order>
379
+ <show_in_default>1</show_in_default>
380
+ <show_in_website>0</show_in_website>
381
+ <show_in_store>0</show_in_store>
382
+ </tracking_status>
383
+ <tracking_purchase translate="label, comment">
384
+ <label>Purchase Tracking</label>
385
+ <comment><![CDATA[Choose to track the purchases on the order confirmation page.]]></comment>
386
+ <frontend_type>select</frontend_type>
387
+ <source_model>adminhtml/system_config_source_yesno</source_model>
388
+ <sort_order>3</sort_order>
389
+ <show_in_default>1</show_in_default>
390
+ <show_in_website>1</show_in_website>
391
+ <show_in_store>0</show_in_store>
392
+ <depends>
393
+ <tracking_status>1</tracking_status>
394
+ </depends>
395
+ </tracking_purchase>
396
+ <tracking_propensity translate="label, comment">
397
+ <label>Propensity Tracking</label>
398
+ <comment><![CDATA[To track the possible purchases for the merchants that do not offer online sales on their site thus enabling this will let them to include this tracking on any page on their site.]]></comment>
399
+ <frontend_type>select</frontend_type>
400
+ <source_model>adminhtml/system_config_source_yesno</source_model>
401
+ <sort_order>4</sort_order>
402
+ <show_in_default>1</show_in_default>
403
+ <show_in_website>1</show_in_website>
404
+ <show_in_store>0</show_in_store>
405
+ <depends>
406
+ <tracking_status>1</tracking_status>
407
+ </depends>
408
+ </tracking_propensity>
409
+ </fields>
410
+ </reevoo_tracking>
411
+
412
+
413
+ </groups>
414
+ </reevoo_setup>
415
+ <reevoo translate="label" module="reevoo">
416
+ <label>Reevoo Cronjob Configurations</label>
417
+ <tab>eComHut</tab>
418
+ <frontend_type>text</frontend_type>
419
+ <sort_order>509</sort_order>
420
+ <show_in_default>1</show_in_default>
421
+ <show_in_website>1</show_in_website>
422
+ <show_in_store>1</show_in_store>
423
+ <groups>
424
+ <reevoo_productfeed translate="label" module="reevoo">
425
+ <label>Product Feed Cronjob</label>
426
+ <sort_order>1</sort_order>
427
+ <show_in_default>1</show_in_default>
428
+ <show_in_website>1</show_in_website>
429
+ <show_in_store>1</show_in_store>
430
+ <fields>
431
+ <status translate="label, comment">
432
+ <label>Status</label>
433
+ <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
434
+ <frontend_type>select</frontend_type>
435
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
436
+ <sort_order>1</sort_order>
437
+ <show_in_default>1</show_in_default>
438
+ <show_in_website>0</show_in_website>
439
+ <show_in_store>0</show_in_store>
440
+ </status>
441
+ <!-- Cron job time -->
442
+ <time translate="label">
443
+ <label>Start Time</label>
444
+ <frontend_type>time</frontend_type>
445
+ <sort_order>200</sort_order>
446
+ <show_in_default>1</show_in_default>
447
+ <show_in_website>0</show_in_website>
448
+ <show_in_store>0</show_in_store>
449
+ <depends>
450
+ <status>1</status>
451
+ </depends>
452
+ </time>
453
+ <!--other fields here-->
454
+ <frequency translate="label">
455
+ <label>Frequency</label>
456
+ <frontend_type>select</frontend_type>
457
+ <source_model>adminhtml/system_config_source_cron_frequency</source_model>
458
+ <!-- Custom backend model which saves cron configuration -->
459
+ <backend_model>reevoo/adminhtml_system_config_backend_product_cron</backend_model>
460
+ <sort_order>201</sort_order>
461
+ <show_in_default>1</show_in_default>
462
+ <show_in_website>0</show_in_website>
463
+ <show_in_store>0</show_in_store>
464
+ <comment>Job Frequency.</comment>
465
+ <depends>
466
+ <status>1</status>
467
+ </depends>
468
+ </frequency>
469
+ </fields>
470
+ </reevoo_productfeed>
471
+ <reevoo_purchaserfeed translate="label" module="reevoo">
472
+ <label>Purchaser Feed Cronjob</label>
473
+ <sort_order>2</sort_order>
474
+ <show_in_default>1</show_in_default>
475
+ <show_in_website>1</show_in_website>
476
+ <show_in_store>1</show_in_store>
477
+ <fields>
478
+ <status translate="label, comment">
479
+ <label>Status</label>
480
+ <comment><![CDATA[Reevoo Status in Basic Configurations should be enabled as a precondition otherwise enabling this will have no impact.]]></comment>
481
+ <frontend_type>select</frontend_type>
482
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
483
+ <sort_order>1</sort_order>
484
+ <show_in_default>1</show_in_default>
485
+ <show_in_website>0</show_in_website>
486
+ <show_in_store>0</show_in_store>
487
+ </status>
488
+ <time translate="label">
489
+ <label>Start Time</label>
490
+ <frontend_type>time</frontend_type>
491
+ <sort_order>200</sort_order>
492
+ <show_in_default>1</show_in_default>
493
+ <show_in_website>0</show_in_website>
494
+ <show_in_store>0</show_in_store>
495
+ <depends>
496
+ <status>1</status>
497
+ </depends>
498
+ </time>
499
+ <!--other fields here-->
500
+ <frequency translate="label">
501
+ <label>Frequency</label>
502
+ <frontend_type>select</frontend_type>
503
+ <source_model>adminhtml/system_config_source_cron_frequency</source_model>
504
+ <!-- Custom backend model which saves cron configuration -->
505
+ <backend_model>reevoo/adminhtml_system_config_backend_purchaser_cron</backend_model>
506
+ <sort_order>201</sort_order>
507
+ <show_in_default>1</show_in_default>
508
+ <show_in_website>0</show_in_website>
509
+ <show_in_store>0</show_in_store>
510
+ <comment>Job Frequency.</comment>
511
+ <depends>
512
+ <status>1</status>
513
+ </depends>
514
+ </frequency>
515
+ <!-- Cron job time -->
516
+ </fields>
517
+ </reevoo_purchaserfeed>
518
+ </groups>
519
+ </reevoo>
520
+ <reevoo_info translate="label" module="reevoo">
521
+ <label>About Author</label>
522
+ <tab>eComHut</tab>
523
+ <frontend_type>text</frontend_type>
524
+ <sort_order>510</sort_order>
525
+ <show_in_default>1</show_in_default>
526
+ <show_in_website>0</show_in_website>
527
+ <show_in_store>0</show_in_store>
528
+ <groups>
529
+ <info translate="label">
530
+ <label>Author Info</label>
531
+ <frontend_type>text</frontend_type>
532
+ <frontend_model>reevoo/info</frontend_model>
533
+ <sort_order>50</sort_order>
534
+ <show_in_default>1</show_in_default>
535
+ <show_in_website>0</show_in_website>
536
+ <show_in_store>0</show_in_store>
537
+ </info>
538
+ </groups>
539
+ </reevoo_info>
540
+ </sections>
541
+ </config>
app/code/local/EComHut/Reevoo/sql/reevoo_setup/mysql4-install-0.0.1.php CHANGED
@@ -1,62 +1,62 @@
1
- <?php
2
-
3
- /**
4
- * DISCLAIMER
5
- *
6
- * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
- * versions in the future. If you wish to customize the code for your
8
- * needs please refer to https://github.com/reevoo/ for more information.
9
- *
10
- * @category Reeovoo Magento Connect
11
- * @package Com_Reevoo
12
- * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- /**
17
- * Reevoo Package Module.
18
- *
19
- * @category Reeovoo Magento Connect
20
- * @package Com_Reevoo
21
- * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
- */
23
- $installer = $this;
24
- $installer->startSetup();
25
-
26
- /* * Slightly buggy and unsupported for some reasons. **
27
- $table = $installer->getConnection()->newTable($installer->getTable('reevoo/logs'))
28
- ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
29
- 'unsigned' => true,
30
- 'nullable' => false,
31
- 'primary' => true,
32
- 'identity' => true,
33
- ), 'Primary ID of the table.')
34
- ->addColumn('type', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
35
- 'nullable' => true,
36
- ), 'Type of the log')
37
- ->addColumn('event', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
38
- 'nullable' => true,
39
- ), 'Event name i.e. start, stop etc')
40
- ->addColumn('event_message', Varien_Db_Ddl_Table::TYPE_DATETIME, null, array(
41
- ), 'Event Details or Message to be saved with event')
42
- ->addColumn('event_time', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
43
- ), 'Timestamp')
44
- ->setComment('eComHut base logger');
45
-
46
- $installer->getConnection()->createTable($table);
47
- /**
48
- * Alternative syntax as direct SQL.
49
- */
50
- /**/
51
- $table = "ecomhut_logs";
52
- $tableName = Mage::getSingleton('core/resource')->getTableName($table);
53
- $installer->run("CREATE TABLE IF NOT EXISTS `$tableName` (
54
- `id` int(11) NOT NULL AUTO_INCREMENT,
55
- `type` varchar(256) NOT NULL DEFAULT '',
56
- `event` varchar(256) NOT NULL,
57
- `event_message` tinytext NOT NULL,
58
- `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
59
- PRIMARY KEY (`id`)
60
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1");
61
- /**/
62
- $installer->endSetup();
1
+ <?php
2
+
3
+ /**
4
+ * DISCLAIMER
5
+ *
6
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
7
+ * versions in the future. If you wish to customize the code for your
8
+ * needs please refer to https://github.com/reevoo/ for more information.
9
+ *
10
+ * @category Reeovoo Magento Connect
11
+ * @package Com_Reevoo
12
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ /**
17
+ * Reevoo Package Module.
18
+ *
19
+ * @category Reeovoo Magento Connect
20
+ * @package Com_Reevoo
21
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
22
+ */
23
+ $installer = $this;
24
+ $installer->startSetup();
25
+
26
+ /* * Slightly buggy and unsupported for some reasons. **
27
+ $table = $installer->getConnection()->newTable($installer->getTable('reevoo/logs'))
28
+ ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
29
+ 'unsigned' => true,
30
+ 'nullable' => false,
31
+ 'primary' => true,
32
+ 'identity' => true,
33
+ ), 'Primary ID of the table.')
34
+ ->addColumn('type', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
35
+ 'nullable' => true,
36
+ ), 'Type of the log')
37
+ ->addColumn('event', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
38
+ 'nullable' => true,
39
+ ), 'Event name i.e. start, stop etc')
40
+ ->addColumn('event_message', Varien_Db_Ddl_Table::TYPE_DATETIME, null, array(
41
+ ), 'Event Details or Message to be saved with event')
42
+ ->addColumn('event_time', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
43
+ ), 'Timestamp')
44
+ ->setComment('eComHut base logger');
45
+
46
+ $installer->getConnection()->createTable($table);
47
+ /**
48
+ * Alternative syntax as direct SQL.
49
+ */
50
+ /**/
51
+ $table = "ecomhut_logs";
52
+ $tableName = Mage::getSingleton('core/resource')->getTableName($table);
53
+ $installer->run("CREATE TABLE IF NOT EXISTS `$tableName` (
54
+ `id` int(11) NOT NULL AUTO_INCREMENT,
55
+ `type` varchar(256) NOT NULL DEFAULT '',
56
+ `event` varchar(256) NOT NULL,
57
+ `event_message` tinytext NOT NULL,
58
+ `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
59
+ PRIMARY KEY (`id`)
60
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1");
61
+ /**/
62
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/reevoo.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <default>
4
- <reference name="head">
5
- <action method="addCss"><name>reevoo.css</name></action>
6
- </reference>
7
- </default>
8
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss"><name>reevoo.css</name></action>
6
+ </reference>
7
+ </default>
8
  </layout>
app/design/frontend/base/default/template/reevoo/review_list.phtml CHANGED
@@ -23,10 +23,9 @@ if ($_reevoo->getStatus()) {
23
  $sku = $this->getProduct()->getResource()->getAttribute($_reevoo->getValue('default_sku'))->getFrontend()->getValue($this->getProduct());
24
  $reevooMark = $_reevoo->getReevooApi();
25
  $reevooMark->cssAssets();
26
- $reevooMark->javascriptAssets();
27
  $status = (boolean) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_pagination') ? true : false;
28
  $pages = (int) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_count');
29
-
30
  ?>
31
  <div class="reevoo_customer_product_reviews">
32
  <?php $reevooMark->productReviews(array("sku" => $sku, "numberOfReviews" => $pages , 'paginated' => $status, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
23
  $sku = $this->getProduct()->getResource()->getAttribute($_reevoo->getValue('default_sku'))->getFrontend()->getValue($this->getProduct());
24
  $reevooMark = $_reevoo->getReevooApi();
25
  $reevooMark->cssAssets();
 
26
  $status = (boolean) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_pagination') ? true : false;
27
  $pages = (int) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_count');
28
+
29
  ?>
30
  <div class="reevoo_customer_product_reviews">
31
  <?php $reevooMark->productReviews(array("sku" => $sku, "numberOfReviews" => $pages , 'paginated' => $status, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
app/design/frontend/rwd/default/template/reevoo/review_list.phtml CHANGED
@@ -23,10 +23,9 @@ if ($_reevoo->getStatus()) {
23
  $sku = $this->getProduct()->getResource()->getAttribute($_reevoo->getValue('default_sku'))->getFrontend()->getValue($this->getProduct());
24
  $reevooMark = $_reevoo->getReevooApi();
25
  $reevooMark->cssAssets();
26
- $reevooMark->javascriptAssets();
27
  $status = (boolean) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_pagination') ? true : false;
28
  $pages = (int) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_count');
29
-
30
  ?>
31
  <div class="reevoo_customer_product_reviews">
32
  <?php $reevooMark->productReviews(array("sku" => $sku, "numberOfReviews" => $pages , 'paginated' => $status, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
23
  $sku = $this->getProduct()->getResource()->getAttribute($_reevoo->getValue('default_sku'))->getFrontend()->getValue($this->getProduct());
24
  $reevooMark = $_reevoo->getReevooApi();
25
  $reevooMark->cssAssets();
 
26
  $status = (boolean) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_pagination') ? true : false;
27
  $pages = (int) Mage::getStoreConfig('reevoo_setup/reevoo_status/embedded_reviews_count');
28
+
29
  ?>
30
  <div class="reevoo_customer_product_reviews">
31
  <?php $reevooMark->productReviews(array("sku" => $sku, "numberOfReviews" => $pages , 'paginated' => $status, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
lib/Reevoo/reevoo_mark_http_client.php CHANGED
@@ -49,10 +49,10 @@ class ReevooMarkHttpClient {
49
  curl_setopt($ch, CURLOPT_URL, $remote_url);
50
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
51
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
52
- curl_setopt($ch, CURLOPT_TIMEOUT_MS, 5000);
53
  curl_setopt($ch, CURLOPT_USERAGENT, "ReevooMark PHP Widget/8");
54
  curl_setopt($ch, CURLOPT_REFERER, "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}");
55
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
56
  curl_setopt($ch, CURLOPT_HEADER, 1);
57
 
58
  if ($result = curl_exec($ch))
49
  curl_setopt($ch, CURLOPT_URL, $remote_url);
50
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
51
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
52
+ curl_setopt($ch, CURLOPT_TIMEOUT_MS, 2000);
53
  curl_setopt($ch, CURLOPT_USERAGENT, "ReevooMark PHP Widget/8");
54
  curl_setopt($ch, CURLOPT_REFERER, "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}");
55
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
56
  curl_setopt($ch, CURLOPT_HEADER, 1);
57
 
58
  if ($result = curl_exec($ch))
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Com_Reevoo</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Module for Reevoo Configuration</description>
11
  <notes>This extension is a package for reevoo configuration on Magento platform.</notes>
12
  <authors><author><name>Farhan Islam</name><user>askwhyweb</user><email>farhan@askwhyweb.com</email></author></authors>
13
- <date>2015-04-12</date>
14
- <time>15:55:55</time>
15
- <contents><target name="magelocal"><dir name="EComHut"><dir name="Reevoo"><dir name="Block"><file name="Customerexperience.php" hash="a37fc5f610e14d869a412a1f80d6dfa6"/><file name="Info.php" hash="35338f9b7c094d381544f9f37623f07b"/><file name="Overallserviceratingbadge.php" hash="bafa43bcf1ef3e59f68e3268c778db33"/><file name="Productfeedbtn.php" hash="a8c41faaf49b07f73e316f291b9f150c"/><file name="Purchasefeedbtn.php" hash="f5b976c8e1f185588e80b7ea6a8acf77"/><file name="Review.php" hash="7e88cf62e6801b073cbdbf3089455d83"/><file name="Standard.php" hash="0d400be38376e4589a061ac7e843b817"/><file name="Tracking.php" hash="b2af0dc94d00c08acd800b12e76ed0e9"/><dir name="Widget"><file name="Customerexperience.php" hash="665fcaf0b545f8445c965331446af98e"/><file name="Overallserviceratingbadge.php" hash="97ecf7d27e28235e76a8ad3ad6999b11"/><file name="Standard.php" hash="aa63f7b386f1ac5f907cdb976ce083cd"/></dir></dir><dir name="Helper"><file name="Api.php" hash="40d2960503fa651d2ca84f75ebb50647"/><file name="Data.php" hash="313854b92423ee67ef25035f7b33639e"/><file name="Ftp.php" hash="9d9c642636bf94efbe9eb1c23a4a8c92"/><file name="Producthelper.php" hash="387a70b9cbc4acac7c90d7738d6ad5e2"/><file name="Purchasehelper.php" hash="cdb34270535520d700028c08333e4b3a"/><file name="Tracking.php" hash="0b3526baf717546261e130e9e667cf37"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Product"><file name="Cron.php" hash="2845694985cc562dda8355fdcd1147bc"/></dir><dir name="Purchaser"><file name="Cron.php" hash="9a29c9830fc13706d3906a6335165c64"/></dir></dir><dir name="Source"><file name="Checkbox.php" hash="ce8e7480cab493e3fe61ba5fdd90c247"/><dir name="Dropdown"><file name="Attributeslist.php" hash="d7045887c5664aab9d3330ef4072c13c"/><file name="Badges.php" hash="5fb0f41e9f9adb3da6c173d6796acf4c"/><file name="Badgeslocation.php" hash="ef75a022086ab18e541c19a01ecab2de"/><file name="Textattributeslist.php" hash="76f42c9cde29bc0a14f4aeded76f023b"/><file name="Values.php" hash="a1bb094d3645c785c04072f680f88de3"/></dir></dir></dir></dir></dir><file name="Cron.php" hash="1cbb6157d0c6a49271f2dfc75a754b49"/><file name="Data.php" hash="83aad800cfe90bd571e807d3aba31906"/><file name="Observer.php" hash="bad550291a2166ca768bc97ecb5641d6"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="2dd8174d9b04fdbde5ebb12f10910e19"/></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="efbfcaa3ccd4fab087a9310cbe3bf854"/></dir><dir name="etc"><file name="config.xml" hash="a3400084d1de88421e73365189f851e5"/><file name="system.xml" hash="3df6eaa9e3562f32e988a5c6cfb1df89"/><file name="widget.xml" hash="7674e9bb12d3880300f515b0c7e328e7"/></dir><dir name="sql"><dir name="reevoo_setup"><file name="mysql4-install-0.0.1.php" hash="b9269e875e3d39a1810213d4191b6038"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EComHut_Reevoo.xml" hash="dfccfa9a7a0f8b357549edab7a807be4"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="reevoo.xml" hash="48b3e85fd69789b76f7e6faadea3ef4d"/></dir><dir name="template"><dir name="reevoo"><dir name="catalog"><file name="customer_experience.phtml" hash="edfdaf54900f52dda5b8c41be84c3fcf"/><file name="customer_experience_list.phtml" hash="93558e507e32e960762a41a064fec4a5"/><dir name="product"><file name="list.phtml" hash="6222698d9f4bb54fdbd4fd68613cae44"/></dir></dir><dir name="html"><file name="footer.phtml" hash="ac87c8c1617707dbe07f997745495180"/><file name="head.phtml" hash="de625281d2dd2090bbb5cc1ca8229323"/></dir><file name="review_list.phtml" hash="c22caf315d0188cc5e43bd5a41b690df"/><file name="summary.phtml" hash="659284b4b3ddfa4cdaac584c59855bd4"/><file name="summary_short.phtml" hash="972117e694210b5ec80ea4d5fde88794"/><dir name="tracking"><file name="propensity.phtml" hash="0eb02bd915e1f258252c9f0c2f802e94"/></dir><dir name="widgets"><dir name="customerexperience"><file name="block.phtml" hash="ab64676c5baf2699741d2fe876ca33a1"/></dir><dir name="customerserviceratingbadge"><file name="block.phtml" hash="ea5a57a7f3ea169e14f42c57742a128c"/></dir><dir name="deliveryratingbadge"><file name="block.phtml" hash="9004d3422fc94ea5ab947365c154fc56"/></dir><dir name="servicerating"><file name="block.phtml" hash="768ddec8e0966078ad03cd24d9ed2872"/></dir><dir name="tracking"><file name="propensity.phtml" hash="0cf1695a506ca191a82295f611f0c19f"/></dir></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="reevoo.xml" hash="48b3e85fd69789b76f7e6faadea3ef4d"/></dir><dir name="template"><dir name="reevoo"><dir name="catalog"><file name="customer_experience.phtml" hash="edfdaf54900f52dda5b8c41be84c3fcf"/><file name="customer_experience_list.phtml" hash="93558e507e32e960762a41a064fec4a5"/><dir name="product"><file name="list.phtml" hash="0223ff3d0cd960b6ea66b136100cfee7"/></dir></dir><dir name="html"><file name="footer.phtml" hash="ac87c8c1617707dbe07f997745495180"/><file name="head.phtml" hash="de625281d2dd2090bbb5cc1ca8229323"/></dir><file name="review_list.phtml" hash="c22caf315d0188cc5e43bd5a41b690df"/><file name="summary.phtml" hash="c475b64ea71622772b49f4b570b87c45"/><file name="summary_short.phtml" hash="972117e694210b5ec80ea4d5fde88794"/><dir name="tracking"><file name="propensity.phtml" hash="0eb02bd915e1f258252c9f0c2f802e94"/></dir><dir name="widgets"><dir name="customerexperience"><file name="block.phtml" hash="ab64676c5baf2699741d2fe876ca33a1"/></dir><dir name="customerserviceratingbadge"><file name="block.phtml" hash="ea5a57a7f3ea169e14f42c57742a128c"/></dir><dir name="deliveryratingbadge"><file name="block.phtml" hash="9004d3422fc94ea5ab947365c154fc56"/></dir><dir name="servicerating"><file name="block.phtml" hash="768ddec8e0966078ad03cd24d9ed2872"/></dir><dir name="tracking"><file name="propensity.phtml" hash="0cf1695a506ca191a82295f611f0c19f"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="reevoo.xml" hash="6b400907e3843508d4ec04e9908e54b4"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Reevoo"><file name="reevoo_mark.php" hash="449bc5616e002466c23132df067325db"/><file name="reevoo_mark_cache.php" hash="f3f73cfd99d417dd335a26a29d7b6e6e"/><file name="reevoo_mark_document.php" hash="9f16e245cbb693630bdd950f22159f7a"/><file name="reevoo_mark_http_client.php" hash="cf653d51eca54f4c581adf87a71af828"/><file name="reevoo_mark_utils.php" hash="b619193209d9ec35805dd47f29320d39"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="reevoo.css" hash="d0f0d043d6f6a71f6f200f4cdd9368be"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>eComHut_Reevoo</name><channel>community</channel><min>1.6.2.0</min><max>1.9.5</max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Com_Reevoo</name>
4
+ <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
10
  <description>Module for Reevoo Configuration</description>
11
  <notes>This extension is a package for reevoo configuration on Magento platform.</notes>
12
  <authors><author><name>Farhan Islam</name><user>askwhyweb</user><email>farhan@askwhyweb.com</email></author></authors>
13
+ <date>2015-10-28</date>
14
+ <time>17:01:18</time>
15
+ <contents><target name="magelocal"><dir name="EComHut"><dir name="Reevoo"><dir name="Block"><file name="Customerexperience.php" hash="d007d447bae0b36d3c1b9ff87c7bc566"/><file name="Info.php" hash="61c4ec85c072217b3a4ef952f58779e5"/><file name="Overallserviceratingbadge.php" hash="59f6ab3607e2991067d724b2000029ae"/><file name="Productfeedbtn.php" hash="a58527361d773770756541ce1cb8f57f"/><file name="Purchasefeedbtn.php" hash="152a287fca30cd0e778b0b253942b393"/><file name="Review.php" hash="badc72d5899babf80acd996c8c35c23c"/><file name="Standard.php" hash="4080dff8f2f7ae61f1414ffb7bbb8421"/><file name="Tracking.php" hash="651db06e1b451861cafaa4d6a6a1e51b"/><dir name="Widget"><file name="Customerexperience.php" hash="72c1089acd648447aa12122157d968e1"/><file name="Overallserviceratingbadge.php" hash="dd2a3e38147ea03d83e3eb40a86c6c97"/><file name="Standard.php" hash="03507b86358749720f1174750a4e8256"/></dir></dir><dir name="Helper"><file name="Api.php" hash="e590af5bc26ff95d2a3ce8b6d76e45e9"/><file name="Data.php" hash="15d38e45930c69b8580ecd8247886590"/><file name="Ftp.php" hash="e328bcaf3aba4d7ac17a1901e2262003"/><file name="Producthelper.php" hash="ea341af1897e72ecc48c92111e120191"/><file name="Purchasehelper.php" hash="53f39771e3fa890390929631a23682d0"/><file name="Tracking.php" hash="0d936480a4ad56cd06ed564ff2845aea"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Product"><file name="Cron.php" hash="8e813140b0bb10e7bedec332d1cb2c4c"/></dir><dir name="Purchaser"><file name="Cron.php" hash="dc4b61e9b8b20a9af19c93d82d154403"/></dir></dir><dir name="Source"><file name="Checkbox.php" hash="950019cacf6fcb52417e8497b7cf1fa8"/><dir name="Dropdown"><file name="Attributeslist.php" hash="d4d7f87b0ce4c0fd33cc2456a9226214"/><file name="Badges.php" hash="4dd549f40a0a7b190be2d7374bb431d2"/><file name="Badgeslocation.php" hash="4842be422e9d67784ffaf2bcd0e915f4"/><file name="Textattributeslist.php" hash="16b239466a45650db3c8f38634eb88f0"/><file name="Values.php" hash="e9f58e347c2d37dfcadf1fd8306b2984"/></dir></dir></dir></dir></dir><file name="Cron.php" hash="dc252d49ba8fdebbeb59be6c4de9127d"/><file name="Data.php" hash="9f4279b7edd543efb533eeab3e1d703a"/><file name="Observer.php" hash="7d0937e733ca6254abd55dfb2dd552ca"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="28d73310355e6144a6f63706cc03e299"/></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="137d415d828e5b46fea1c80fed2d9cd3"/></dir><dir name="etc"><file name="config.xml" hash="a3400084d1de88421e73365189f851e5"/><file name="system.xml" hash="be6295a74183df22744b224571dd8f21"/><file name="widget.xml" hash="7674e9bb12d3880300f515b0c7e328e7"/></dir><dir name="sql"><dir name="reevoo_setup"><file name="mysql4-install-0.0.1.php" hash="6430314da9d3edb8c10fec85b94b3af1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EComHut_Reevoo.xml" hash="dfccfa9a7a0f8b357549edab7a807be4"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="reevoo.xml" hash="48b3e85fd69789b76f7e6faadea3ef4d"/></dir><dir name="template"><dir name="reevoo"><dir name="catalog"><file name="customer_experience.phtml" hash="edfdaf54900f52dda5b8c41be84c3fcf"/><file name="customer_experience_list.phtml" hash="93558e507e32e960762a41a064fec4a5"/><dir name="product"><file name="list.phtml" hash="6222698d9f4bb54fdbd4fd68613cae44"/></dir></dir><dir name="html"><file name="footer.phtml" hash="ac87c8c1617707dbe07f997745495180"/><file name="head.phtml" hash="de625281d2dd2090bbb5cc1ca8229323"/></dir><file name="review_list.phtml" hash="414d7050fe428d17a720ea00ed88f791"/><file name="summary.phtml" hash="659284b4b3ddfa4cdaac584c59855bd4"/><file name="summary_short.phtml" hash="972117e694210b5ec80ea4d5fde88794"/><dir name="tracking"><file name="propensity.phtml" hash="0eb02bd915e1f258252c9f0c2f802e94"/></dir><dir name="widgets"><dir name="customerexperience"><file name="block.phtml" hash="ab64676c5baf2699741d2fe876ca33a1"/></dir><dir name="customerserviceratingbadge"><file name="block.phtml" hash="ea5a57a7f3ea169e14f42c57742a128c"/></dir><dir name="deliveryratingbadge"><file name="block.phtml" hash="9004d3422fc94ea5ab947365c154fc56"/></dir><dir name="servicerating"><file name="block.phtml" hash="768ddec8e0966078ad03cd24d9ed2872"/></dir><dir name="tracking"><file name="propensity.phtml" hash="0cf1695a506ca191a82295f611f0c19f"/></dir></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="reevoo.xml" hash="48b3e85fd69789b76f7e6faadea3ef4d"/></dir><dir name="template"><dir name="reevoo"><dir name="catalog"><file name="customer_experience.phtml" hash="edfdaf54900f52dda5b8c41be84c3fcf"/><file name="customer_experience_list.phtml" hash="93558e507e32e960762a41a064fec4a5"/><dir name="product"><file name="list.phtml" hash="0223ff3d0cd960b6ea66b136100cfee7"/></dir></dir><dir name="html"><file name="footer.phtml" hash="ac87c8c1617707dbe07f997745495180"/><file name="head.phtml" hash="de625281d2dd2090bbb5cc1ca8229323"/></dir><file name="review_list.phtml" hash="414d7050fe428d17a720ea00ed88f791"/><file name="summary.phtml" hash="c475b64ea71622772b49f4b570b87c45"/><file name="summary_short.phtml" hash="972117e694210b5ec80ea4d5fde88794"/><dir name="tracking"><file name="propensity.phtml" hash="0eb02bd915e1f258252c9f0c2f802e94"/></dir><dir name="widgets"><dir name="customerexperience"><file name="block.phtml" hash="ab64676c5baf2699741d2fe876ca33a1"/></dir><dir name="customerserviceratingbadge"><file name="block.phtml" hash="ea5a57a7f3ea169e14f42c57742a128c"/></dir><dir name="deliveryratingbadge"><file name="block.phtml" hash="9004d3422fc94ea5ab947365c154fc56"/></dir><dir name="servicerating"><file name="block.phtml" hash="768ddec8e0966078ad03cd24d9ed2872"/></dir><dir name="tracking"><file name="propensity.phtml" hash="0cf1695a506ca191a82295f611f0c19f"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="reevoo.xml" hash="997da9620786af5eebb0daaeebcbf7ca"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Reevoo"><file name="reevoo_mark.php" hash="449bc5616e002466c23132df067325db"/><file name="reevoo_mark_cache.php" hash="f3f73cfd99d417dd335a26a29d7b6e6e"/><file name="reevoo_mark_document.php" hash="9f16e245cbb693630bdd950f22159f7a"/><file name="reevoo_mark_http_client.php" hash="e765b0f0b346381f5cc5d85d45a5c3d2"/><file name="reevoo_mark_utils.php" hash="b619193209d9ec35805dd47f29320d39"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="reevoo.css" hash=""/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>eComHut_Reevoo</name><channel>community</channel><min>1.6.2.0</min><max>1.9.5</max></package></required></dependencies>
18
  </package>
skin/adminhtml/default/default/reevoo.css DELETED
@@ -1 +0,0 @@
1
- #row_reevoo_setup_reevoo_status_badges #reevoo_setup_reevoo_status_badges, #row_reevoo_setup_reevoo_status_badges_location #reevoo_setup_reevoo_status_badges_location{height:60px;}