Com_Reevoo - Version 0.1.0

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.0
Comparing to
See all releases


Version 0.1.0

Files changed (73) hide show
  1. app/code/local/EComHut/Reevoo/Block/Customerexperience.php +51 -0
  2. app/code/local/EComHut/Reevoo/Block/Info.php +37 -0
  3. app/code/local/EComHut/Reevoo/Block/Overallserviceratingbadge.php +42 -0
  4. app/code/local/EComHut/Reevoo/Block/Productfeedbtn.php +47 -0
  5. app/code/local/EComHut/Reevoo/Block/Purchasefeedbtn.php +47 -0
  6. app/code/local/EComHut/Reevoo/Block/Review.php +44 -0
  7. app/code/local/EComHut/Reevoo/Block/Standard.php +25 -0
  8. app/code/local/EComHut/Reevoo/Block/Tracking.php +95 -0
  9. app/code/local/EComHut/Reevoo/Block/Widget/Customerexperience.php +25 -0
  10. app/code/local/EComHut/Reevoo/Block/Widget/Overallserviceratingbadge.php +25 -0
  11. app/code/local/EComHut/Reevoo/Block/Widget/Standard.php +25 -0
  12. app/code/local/EComHut/Reevoo/Helper/Api.php +123 -0
  13. app/code/local/EComHut/Reevoo/Helper/Data.php +377 -0
  14. app/code/local/EComHut/Reevoo/Helper/Ftp.php +194 -0
  15. app/code/local/EComHut/Reevoo/Helper/Producthelper.php +248 -0
  16. app/code/local/EComHut/Reevoo/Helper/Purchasehelper.php +430 -0
  17. app/code/local/EComHut/Reevoo/Helper/Tracking.php +62 -0
  18. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Product/Cron.php +70 -0
  19. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Purchaser/Cron.php +69 -0
  20. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Checkbox.php +42 -0
  21. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Attributeslist.php +55 -0
  22. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badges.php +42 -0
  23. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badgeslocation.php +42 -0
  24. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Textattributeslist.php +55 -0
  25. app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Values.php +42 -0
  26. app/code/local/EComHut/Reevoo/Model/Cron.php +65 -0
  27. app/code/local/EComHut/Reevoo/Model/Data.php +144 -0
  28. app/code/local/EComHut/Reevoo/Model/Observer.php +55 -0
  29. app/code/local/EComHut/Reevoo/Model/Resource/Mysql4/Setup.php +25 -0
  30. app/code/local/EComHut/Reevoo/controllers/IndexController.php +132 -0
  31. app/code/local/EComHut/Reevoo/etc/config.xml +289 -0
  32. app/code/local/EComHut/Reevoo/etc/system.xml +541 -0
  33. app/code/local/EComHut/Reevoo/etc/widget.xml +121 -0
  34. app/code/local/EComHut/Reevoo/sql/reevoo_setup/mysql4-install-0.0.1.php +62 -0
  35. app/design/adminhtml/default/default/layout/reevoo.xml +8 -0
  36. app/design/frontend/base/default/layout/reevoo.xml +86 -0
  37. app/design/frontend/base/default/template/reevoo/catalog/customer_experience.phtml +31 -0
  38. app/design/frontend/base/default/template/reevoo/catalog/customer_experience_list.phtml +31 -0
  39. app/design/frontend/base/default/template/reevoo/catalog/product/list.phtml +152 -0
  40. app/design/frontend/base/default/template/reevoo/html/footer.phtml +29 -0
  41. app/design/frontend/base/default/template/reevoo/html/head.phtml +32 -0
  42. app/design/frontend/base/default/template/reevoo/review_list.phtml +42 -0
  43. app/design/frontend/base/default/template/reevoo/summary.phtml +62 -0
  44. app/design/frontend/base/default/template/reevoo/summary_short.phtml +37 -0
  45. app/design/frontend/base/default/template/reevoo/tracking/propensity.phtml +13 -0
  46. app/design/frontend/base/default/template/reevoo/widgets/customerexperience/block.phtml +35 -0
  47. app/design/frontend/base/default/template/reevoo/widgets/customerserviceratingbadge/block.phtml +31 -0
  48. app/design/frontend/base/default/template/reevoo/widgets/deliveryratingbadge/block.phtml +31 -0
  49. app/design/frontend/base/default/template/reevoo/widgets/servicerating/block.phtml +31 -0
  50. app/design/frontend/base/default/template/reevoo/widgets/tracking/propensity.phtml +41 -0
  51. app/design/frontend/rwd/default/layout/reevoo.xml +86 -0
  52. app/design/frontend/rwd/default/template/reevoo/catalog/customer_experience.phtml +31 -0
  53. app/design/frontend/rwd/default/template/reevoo/catalog/customer_experience_list.phtml +31 -0
  54. app/design/frontend/rwd/default/template/reevoo/catalog/product/list.phtml +208 -0
  55. app/design/frontend/rwd/default/template/reevoo/html/footer.phtml +29 -0
  56. app/design/frontend/rwd/default/template/reevoo/html/head.phtml +32 -0
  57. app/design/frontend/rwd/default/template/reevoo/review_list.phtml +42 -0
  58. app/design/frontend/rwd/default/template/reevoo/summary.phtml +61 -0
  59. app/design/frontend/rwd/default/template/reevoo/summary_short.phtml +37 -0
  60. app/design/frontend/rwd/default/template/reevoo/tracking/propensity.phtml +13 -0
  61. app/design/frontend/rwd/default/template/reevoo/widgets/customerexperience/block.phtml +35 -0
  62. app/design/frontend/rwd/default/template/reevoo/widgets/customerserviceratingbadge/block.phtml +31 -0
  63. app/design/frontend/rwd/default/template/reevoo/widgets/deliveryratingbadge/block.phtml +31 -0
  64. app/design/frontend/rwd/default/template/reevoo/widgets/servicerating/block.phtml +31 -0
  65. app/design/frontend/rwd/default/template/reevoo/widgets/tracking/propensity.phtml +41 -0
  66. app/etc/modules/EComHut_Reevoo.xml +37 -0
  67. lib/Reevoo/reevoo_mark.php +206 -0
  68. lib/Reevoo/reevoo_mark_cache.php +68 -0
  69. lib/Reevoo/reevoo_mark_document.php +104 -0
  70. lib/Reevoo/reevoo_mark_http_client.php +64 -0
  71. lib/Reevoo/reevoo_mark_utils.php +118 -0
  72. package.xml +18 -0
  73. skin/adminhtml/default/default/reevoo.css +1 -0
app/code/local/EComHut/Reevoo/Block/Customerexperience.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Info.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Overallserviceratingbadge.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Productfeedbtn.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Purchasefeedbtn.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Review.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Standard.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Tracking.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Widget/Customerexperience.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Widget/Overallserviceratingbadge.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Block/Widget/Standard.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Helper/Api.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Helper/Data.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Helper/Ftp.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Helper/Producthelper.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Helper/Purchasehelper.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Helper/Tracking.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Product/Cron.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Backend/Purchaser/Cron.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Checkbox.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Attributeslist.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badges.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Badgeslocation.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Textattributeslist.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Adminhtml/System/Config/Source/Dropdown/Values.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Cron.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Data.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Observer.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/Model/Resource/Mysql4/Setup.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/controllers/IndexController.php ADDED
@@ -0,0 +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
+ }
app/code/local/EComHut/Reevoo/etc/config.xml ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <modules>
26
+ <EComHut_Reevoo>
27
+ <version>0.0.1.0</version>
28
+ </EComHut_Reevoo>
29
+ </modules>
30
+ <global>
31
+ <blocks>
32
+ <reevoo>
33
+ <class>EComHut_Reevoo_Block</class>
34
+ </reevoo>
35
+ <reevoo_standard>
36
+ <class>EComHut_Reevoo_Block</class>
37
+ </reevoo_standard>
38
+ <reevoo_customerexperience>
39
+ <class>EComHut_Reevoo_Block</class>
40
+ </reevoo_customerexperience>
41
+ <reevoo_overallserviceratingbadge>
42
+ <class>EComHut_Reevoo_Block</class>
43
+ </reevoo_overallserviceratingbadge>
44
+ <reevoo_customerserviceratingbadge>
45
+ <class>EComHut_Reevoo_Block</class>
46
+ </reevoo_customerserviceratingbadge>
47
+ <reevoo_deliveryratingbadge>
48
+ <class>EComHut_Reevoo_Block</class>
49
+ </reevoo_deliveryratingbadge>
50
+ <review>
51
+ <rewrite>
52
+ <helper>EComHut_Reevoo_Block_Review</helper>
53
+ </rewrite>
54
+ </review>
55
+ </blocks>
56
+ <models>
57
+ <reevoo>
58
+ <class>EComHut_Reevoo_Model</class>
59
+ <!--
60
+ need to create our own resource, can't just use core_mysql4
61
+ -->
62
+ <resourceModel>revoo_mysql4</resourceModel>
63
+ </reevoo>
64
+ <revoo_mysql4>
65
+ <class>EComHut_Reevoo_Model_Mysql4</class>
66
+ <entities>
67
+ <reevoo>
68
+ <table>reevoo</table>
69
+ </reevoo>
70
+ </entities>
71
+ </revoo_mysql4>
72
+ </models>
73
+ <helpers>
74
+ <reevoo>
75
+ <class>EComHut_Reevoo_Helper</class>
76
+ </reevoo>
77
+ <reevoo_customerexperience>
78
+ <class>EComHut_Reevoo_Helper</class>
79
+ </reevoo_customerexperience>
80
+ <reevoo_customerserviceratingbadge>
81
+ <class>EComHut_Reevoo_Helper</class>
82
+ </reevoo_customerserviceratingbadge>
83
+ <reevoo_customerexperience>
84
+ <class>EComHut_Reevoo_Helper</class>
85
+ </reevoo_customerexperience>
86
+ <reevoo_deliveryratingbadge>
87
+ <class>EComHut_Reevoo_Helper</class>
88
+ </reevoo_deliveryratingbadge>
89
+ </helpers>
90
+ <resources>
91
+ <reevoo_setup>
92
+ <setup>
93
+ <module>EComHut_Reevoo</module>
94
+ <class>EComHut_Reevoo_Model_Resource_Mysql4_Setup</class>
95
+ </setup>
96
+ <connection>
97
+ <use>core_setup</use>
98
+ </connection>
99
+ </reevoo_setup>
100
+ <reevoo_logs>
101
+ <connection>
102
+ <use>core_write</use>
103
+ </connection>
104
+ </reevoo_logs>
105
+ </resources>
106
+ </global>
107
+ <frontend>
108
+ <routers>
109
+ <reevoo>
110
+ <use>standard</use>
111
+ <args>
112
+ <module>EComHut_Reevoo</module>
113
+ <frontName>reevoo</frontName>
114
+ </args>
115
+ </reevoo>
116
+ </routers>
117
+ <layout>
118
+ <updates>
119
+ <reevoo>
120
+ <file>reevoo.xml</file>
121
+ </reevoo>
122
+ </updates>
123
+ </layout>
124
+ <events>
125
+ <checkout_onepage_controller_success_action>
126
+ <observers>
127
+ <reevoo_tracking>
128
+ <class>EComHut_Reevoo_Model_Observer</class>
129
+ <method>setOrderTracking</method>
130
+ </reevoo_tracking>
131
+ </observers>
132
+ </checkout_onepage_controller_success_action>
133
+ <checkout_multishipping_controller_success_action>
134
+ <observers>
135
+ <reevoo_tracking>
136
+ <class>EComHut_Reevoo_Model_Observer</class>
137
+ <method>setOrderTracking</method>
138
+ </reevoo_tracking>
139
+ </observers>
140
+ </checkout_multishipping_controller_success_action>
141
+ </events>
142
+ </frontend>
143
+ <admin>
144
+ <routers>
145
+ <reevoo>
146
+ <use>admin</use>
147
+ <args>
148
+ <module>EComHut_Reevoo</module>
149
+ <frontName>reevoo</frontName>
150
+ </args>
151
+ </reevoo>
152
+ <reevoo_info>
153
+ <use>admin</use>
154
+ <args>
155
+ <module>EComHut_Reevoo</module>
156
+ <frontName>reevoo</frontName>
157
+ </args>
158
+ </reevoo_info>
159
+ <reevoo_setup>
160
+ <use>admin</use>
161
+ <args>
162
+ <module>EComHut_Reevoo</module>
163
+ <frontName>reevoo</frontName>
164
+ </args>
165
+ </reevoo_setup>
166
+ </routers>
167
+ <layout>
168
+ <updates>
169
+ <reevoo>
170
+ <file>reevoo.xml</file>
171
+ </reevoo>
172
+ </updates>
173
+ </layout>
174
+ </admin>
175
+ <adminhtml>
176
+ <translate>
177
+ <modules>
178
+ <EComHut_Reevoo>
179
+ <files>
180
+ <default>EComHut_Reevoo.csv</default>
181
+ </files>
182
+ </EComHut_Reevoo>
183
+ </modules>
184
+ </translate>
185
+ <acl>
186
+ <resources>
187
+ <admin>
188
+ <children>
189
+ <system>
190
+ <children>
191
+ <config>
192
+ <children>
193
+ <reevoo translate="title" module="reevoo">
194
+ <title>Reevoo</title>
195
+ </reevoo>
196
+ <reevoo_setup translate="title" module="reevoo">
197
+ <title>Setup</title>
198
+ </reevoo_setup>
199
+ <reevoo_info translate="title" module="reevoo">
200
+ <title>Info</title>
201
+ </reevoo_info>
202
+ </children>
203
+ </config>
204
+ </children>
205
+ </system>
206
+ </children>
207
+ </admin>
208
+ </resources>
209
+ </acl>
210
+ <layout>
211
+ <updates>
212
+ <reevoo>
213
+ <file>reevoo.xml</file>
214
+ </reevoo>
215
+ </updates>
216
+ </layout>
217
+ </adminhtml>
218
+ <crontab>
219
+ <jobs>
220
+ <reevoo_productfeed_cron>
221
+ <!--
222
+ We Don't need to hardcode cron_expr as we are doing this using dynamic way
223
+ <schedule>
224
+ <cron_expr>0 1 * * *</cron_expr>
225
+ </schedule>
226
+ -->
227
+ <run>
228
+ <model>reevoo/cron::processProductsFeed</model>
229
+ </run>
230
+ </reevoo_productfeed_cron>
231
+ <reevoo_purchaserfeed_cron>
232
+ <!--
233
+ We Don't need to hardcode cron_expr as we are doing this using dynamic way
234
+ <schedule>
235
+ <cron_expr>0 1 * * *</cron_expr>
236
+ </schedule>
237
+ -->
238
+ <run>
239
+ <model>reevoo/cron::processPurchaserFeed</model>
240
+ </run>
241
+ </reevoo_purchaserfeed_cron>
242
+ </jobs>
243
+ </crontab>
244
+ <default>
245
+ <!-- default values of the cronjob -->
246
+ <crontab>
247
+ <jobs>
248
+ <reevoo_productfeed>
249
+ <schedule>
250
+ <cron_expr>0 0 * * *</cron_expr>
251
+ </schedule>
252
+ </reevoo_productfeed>
253
+ <reevoo_purchaserfeed>
254
+ <schedule>
255
+ <cron_expr>0 0 * * *</cron_expr>
256
+ </schedule>
257
+ </reevoo_purchaserfeed>
258
+ </jobs>
259
+ </crontab>
260
+ <!-- default values for reevoo when its installed. -->
261
+ <reevoo_setup>
262
+ <reevoo_status>
263
+ <status>1</status>
264
+ <embedded_reviews>1</embedded_reviews>
265
+ <default_sku>sku</default_sku>
266
+ <locale>en_GB</locale>
267
+ <badges>product_badge,owner_badge</badges>
268
+ <badges_location>listing_pages,product_pages</badges_location>
269
+ <embedded_reviews_pagination>1</embedded_reviews_pagination>
270
+ <product_list_varient_for_badge>stars_only</product_list_varient_for_badge>
271
+ <product_varient_for_badge>stars_only</product_varient_for_badge>
272
+ <askanhonor_list_varient_for_badge>stars_only</askanhonor_list_varient_for_badge>
273
+ <askanhonor_varient_for_badge>stars_only</askanhonor_varient_for_badge>
274
+ <embedded_reviews_count>6</embedded_reviews_count>
275
+ </reevoo_status>
276
+ <reevoo_ftp>
277
+ <ftp_path>/upload/reevoo/</ftp_path>
278
+ <productfeed_delta>1</productfeed_delta>
279
+ <purchasefeed_delta>1</purchasefeed_delta>
280
+ <productfeed_defaultimage>image</productfeed_defaultimage>
281
+ </reevoo_ftp>
282
+ <reevoo_tracking>
283
+ <tracking_status>1</tracking_status>
284
+ <tracking_purchase>1</tracking_purchase>
285
+ <tracking_propensity>0</tracking_propensity>
286
+ </reevoo_tracking>
287
+ </reevoo_setup>
288
+ </default>
289
+ </config>
app/code/local/EComHut/Reevoo/etc/system.xml ADDED
@@ -0,0 +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>
app/code/local/EComHut/Reevoo/etc/widget.xml ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <widgets>
25
+ <reevoo_customerexperience type="reevoo_customerexperience/widget_customerexperience" translate="label description" module="reevoo">
26
+ <name>Reevoo Customer Experience Reviews</name>
27
+ <description>The customer experience reviews will be included in the page.</description>
28
+ <parameters>
29
+ <numberofreviews>
30
+ <label>Number Of Reviews To Show</label>
31
+ <required>1</required>
32
+ <visible>1</visible>
33
+ <type>text</type>
34
+ <sort_order>15</sort_order>
35
+ <value>6</value>
36
+ </numberofreviews>
37
+ <pagination>
38
+ <label>Display Pagination</label>
39
+ <required>1</required>
40
+ <visible>1</visible>
41
+ <type>select</type>
42
+ <sort_order>16</sort_order>
43
+ <source_model>adminhtml/system_config_source_yesno</source_model>
44
+ <value>1</value>
45
+ </pagination>
46
+ <template>
47
+ <visible>0</visible>
48
+ <value>reevoo/widgets/customerexperience/block.phtml</value>
49
+ </template>
50
+ </parameters>
51
+ </reevoo_customerexperience>
52
+ <reevoo_overallserviceratingbadge type="reevoo_overallserviceratingbadge/widget_overallserviceratingbadge" translate="label description" module="reevoo">
53
+ <name>Reevoo Overall Service Rating Badge</name>
54
+ <description>The overall service rating badge will be included in the page.</description>
55
+ <parameters>
56
+ <variant>
57
+ <label>Variant Name</label>
58
+ <required>1</required>
59
+ <visible>1</visible>
60
+ <type>text</type>
61
+ <sort_order>17</sort_order>
62
+ <value>stars_only</value>
63
+ </variant>
64
+ <template>
65
+ <value>reevoo/widgets/servicerating/block.phtml</value>
66
+ </template>
67
+ </parameters>
68
+ </reevoo_overallserviceratingbadge>
69
+ <reevoo_customerserviceratingbadge type="reevoo_customerserviceratingbadge/widget_overallserviceratingbadge" translate="label description" module="reevoo">
70
+ <name>Reevoo Customer Service Rating Badge</name>
71
+ <description>The customer service rating badge will be included in the page.</description>
72
+ <parameters>
73
+ <variant>
74
+ <label>Variant Name</label>
75
+ <required>1</required>
76
+ <visible>1</visible>
77
+ <type>text</type>
78
+ <sort_order>17</sort_order>
79
+ <value>stars_only</value>
80
+ </variant>
81
+ <template>
82
+ <value>reevoo/widgets/customerserviceratingbadge/block.phtml</value>
83
+ </template>
84
+ </parameters>
85
+ </reevoo_customerserviceratingbadge>
86
+ <reevoo_deliveryratingbadge type="reevoo_deliveryratingbadge/widget_overallserviceratingbadge" translate="label description" module="reevoo">
87
+ <name>Reevoo Delivery Rating Badge</name>
88
+ <description>The delivery rating badge will be included in the page.</description>
89
+ <parameters>
90
+ <variant>
91
+ <label>Variant Name</label>
92
+ <required>1</required>
93
+ <visible>1</visible>
94
+ <type>text</type>
95
+ <sort_order>17</sort_order>
96
+ <value>stars_only</value>
97
+ </variant>
98
+ <template>
99
+ <value>reevoo/widgets/deliveryratingbadge/block.phtml</value>
100
+ </template>
101
+ </parameters>
102
+ </reevoo_deliveryratingbadge>
103
+ <reevoo_standard type="reevoo_standard/widget_standard" translate="label description" module="reevoo">
104
+ <name>Reevoo Propensity Tracking</name>
105
+ <description>Propensity Tracking.</description>
106
+ <parameters>
107
+ <message>
108
+ <label>Message</label>
109
+ <required>1</required>
110
+ <visible>1</visible>
111
+ <type>text</type>
112
+ <sort_order>15</sort_order>
113
+ <value>Your Message To be Sent With Tracking...!</value>
114
+ </message>
115
+ <template>
116
+ <visible>0</visible>
117
+ <value>reevoo/widgets/tracking/propensity.phtml</value>
118
+ </template>
119
+ </parameters>
120
+ </reevoo_standard>
121
+ </widgets>
app/code/local/EComHut/Reevoo/sql/reevoo_setup/mysql4-install-0.0.1.php ADDED
@@ -0,0 +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();
app/design/adminhtml/default/default/layout/reevoo.xml ADDED
@@ -0,0 +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>
app/design/frontend/base/default/layout/reevoo.xml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <!--
4
+ /**
5
+ * DISCLAIMER
6
+ *
7
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
8
+ * versions in the future. If you wish to customize the code for your
9
+ * needs please refer to https://github.com/reevoo/ for more information.
10
+ *
11
+ * @category Reeovoo Magento Connect
12
+ * @package Com_Reevoo
13
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
14
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
+ */
16
+
17
+ /**
18
+ * Reevoo Package Module.
19
+ *
20
+ * @category Reeovoo Magento Connect
21
+ * @package Com_Reevoo
22
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
23
+ */
24
+ -->
25
+ <default>
26
+ <reference name="head" before="-">
27
+ <action method="setCacheLifetime">
28
+ <s>null</s>
29
+ </action>
30
+ <block type="reevoo/tracking" name="reevoo_header_elements" as="reevoo_header_elements" template="reevoo/html/head.phtml" />
31
+ </reference>
32
+ <reference name="before_body_end">
33
+ <block type="core/template" name="reevoo_footer_elements" template="reevoo/html/footer.phtml"/>
34
+ </reference>
35
+ </default>
36
+ <review_product_list>
37
+ <remove name="reevoo_customer_experience_list" /> <!-- As we don't need the experience list seperately on our review page. -->
38
+ <reference name="product.info.product_additional_data">
39
+ <action method="setTemplate" ifconfig="reevoo_setup/reevoo_status/embedded_reviews">
40
+ <template>reevoo/review_list.phtml</template>
41
+ </action>
42
+ </reference>
43
+ </review_product_list>
44
+
45
+ <catalog_category_default>
46
+ <reference name="product_list">
47
+ <action method="setTemplate">
48
+ <template>reevoo/catalog/product/list.phtml</template>
49
+ </action>
50
+ </reference>
51
+ </catalog_category_default>
52
+ <catalog_category_layered>
53
+ <reference name="product_list">
54
+ <action method="setTemplate">
55
+ <template>reevoo/catalog/product/list.phtml</template>
56
+ </action>
57
+ </reference>
58
+ </catalog_category_layered>
59
+ <!-- Categories/ Search Results and Also for products block -->
60
+ <!--<catalog_category_default>
61
+ <reference name="content">
62
+ <block type="core/template" name="reevoo_customer_experience_list" after="product_list" template="reevoo/catalog/customer_experience_list.phtml"/>
63
+ </reference>
64
+ </catalog_category_default>
65
+ <catalog_category_layered>
66
+ <reference name="content">
67
+ <block type="core/template" name="reevoo_customer_experience_list" after="product_list" template="reevoo/catalog/customer_experience_list.phtml"/>
68
+ </reference>
69
+ </catalog_category_layered>
70
+ <catalog_product_view>-->
71
+ <!--<reference name="content">
72
+ <block type="core/template" name="reevoo_customer_experience_list" after="-" template="reevoo/catalog/customer_experience.phtml"/>
73
+ </reference>-->
74
+ <catalog_product_view>
75
+ <!--<reference name="head">
76
+ <block type="reevoo/tracking" name="reevoo_propensitytracking" after="-" template="reevoo/tracking/propensity.phtml" />
77
+ </reference>-->
78
+ <reference name="product.reviews">
79
+ <action method="setTemplate" ifconfig="reevoo_setup/reevoo_status/embedded_reviews">
80
+ <template>reevoo/review_list.phtml</template>
81
+ </action>
82
+ </reference>
83
+ </catalog_product_view>
84
+
85
+
86
+ </layout>
app/design/frontend/base/default/template/reevoo/catalog/customer_experience.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <div class="reevoo_embedded_reviews">
24
+ <?php
25
+ $_reevoo = Mage::helper('reevoo/api');
26
+ if ($_reevoo->getStatus() && $_reevoo->getValue('embedded_reviews')) {
27
+ $reevooMark = $_reevoo->getReevooApi();
28
+ $reevooMark->customerExperienceReviews(array("numberOfReviews" => 6, "paginated" => true, "locale" => str_replace('_', '-', $_reevoo->getValue('locale'))));
29
+ }
30
+ ?>
31
+ <div>
app/design/frontend/base/default/template/reevoo/catalog/customer_experience_list.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <div class="reevoo_embedded_reviews_list">
24
+ <?php
25
+ $_reevoo = Mage::helper('reevoo/api');
26
+ if ($_reevoo->getStatus()) {
27
+ $reevooMark = $_reevoo->getReevooApi();
28
+ $reevooMark->customerExperienceReviews(array("numberOfReviews" => 6, "paginated" => true, "locale" => str_replace('_', '-', $_reevoo->getValue('locale'))));
29
+ }
30
+ ?>
31
+ </div>
app/design/frontend/base/default/template/reevoo/catalog/product/list.phtml ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ /**
25
+ * Product list template
26
+ *
27
+ * @see Mage_Catalog_Block_Product_List
28
+ */
29
+ ?>
30
+ <?php
31
+ $_productCollection = $this->getLoadedProductCollection();
32
+ $_helper = $this->helper('catalog/output');
33
+ ?>
34
+ <?php if (!$_productCollection->count()): ?>
35
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
36
+ <?php else: ?>
37
+ <div class="category-products">
38
+ <?php echo $this->getToolbarHtml() ?>
39
+ <?php // List mode ?>
40
+ <?php if ($this->getMode() != 'grid'): ?>
41
+ <?php $_iterator = 0; ?>
42
+ <ol class="products-list" id="products-list">
43
+ <?php foreach ($_productCollection as $_product): ?>
44
+ <li class="item<?php if (++$_iterator == sizeof($_productCollection)): ?> last<?php endif; ?>">
45
+ <?php // Product Image ?>
46
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
47
+ <?php // Product description ?>
48
+ <div class="product-shop">
49
+ <div class="f-fix">
50
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
51
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?></a></h2>
52
+ <?php if ($_product->getRatingSummary()): ?>
53
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
54
+ <?php endif; ?>
55
+ <?php echo $this->getPriceHtml($_product, true) ?>
56
+ <?php if ($_product->isSaleable()): ?>
57
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
58
+ <?php else: ?>
59
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
60
+ <?php endif; ?>
61
+ <div class="desc std">
62
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
63
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
64
+ </div>
65
+ <ul class="add-to-links">
66
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
67
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
68
+ <?php endif; ?>
69
+ <?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
70
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
71
+ <?php endif; ?>
72
+ </ul>
73
+ </div>
74
+ </div>
75
+ </li>
76
+ <?php endforeach; ?>
77
+ </ol>
78
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
79
+
80
+ <?php else: ?>
81
+
82
+ <?php // Grid Mode ?>
83
+
84
+ <?php $_collectionSize = $_productCollection->count() ?>
85
+ <?php $_columnCount = $this->getColumnCount(); ?>
86
+ <?php $i = 0;
87
+ foreach ($_productCollection as $_product): ?>
88
+ <?php if ($i++ % $_columnCount == 0): ?>
89
+ <ul class="products-grid">
90
+ <?php endif ?>
91
+ <li class="item<?php if (($i - 1) % $_columnCount == 0): ?> first<?php elseif ($i % $_columnCount == 0): ?> last<?php endif; ?>">
92
+ <?php
93
+ $_reevoo = Mage::helper('reevoo/api');
94
+ $product_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'product_badge');
95
+ $owner_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'owner_badge');
96
+ $page_allowed = $_reevoo->getMultiSelectValue('badges_location', 'reevoo_setup/reevoo_status/', 'listing_pages');
97
+ $varientMessageProductBadge = $_reevoo->getValue('product_list_varient_for_badge','reevoo_setup/reevoo_status/');
98
+ $varientMessageConversationBadge = $_reevoo->getValue('askanhonor_list_varient_for_badge','reevoo_setup/reevoo_status/');
99
+
100
+ if ($_reevoo->getStatus()) {
101
+ $reevooMark = $_reevoo->getReevooApi(); ?>
102
+ <?php if($product_bage && $page_allowed): ?>
103
+ <div class="reevoo_review_product_badge" data-varientName-value="<?php echo $varientMessageProductBadge; ?>">
104
+ <?php $reevooMark->productBadge(array("sku" => $_product->getSku(), 'variantName' => $varientMessageProductBadge)); ?>
105
+ </div>
106
+ <?php endif; ?>
107
+ <?php if($owner_bage && $page_allowed): ?>
108
+ <div class="reevoo_conversion_badge" data-varientName-value="<?php echo $varientMessageConversationBadge; ?>">
109
+ <?php $reevooMark->conversationsBadge(array("sku" => $_product->getSku(), 'variantName' => $varientMessageConversationBadge)) ?>
110
+ </div>
111
+ <?php endif; ?>
112
+ <?php } ?>
113
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
114
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
115
+ <?php if ($_product->getRatingSummary()): ?>
116
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
117
+ <?php endif; ?>
118
+ <?php echo $this->getPriceHtml($_product, true) ?>
119
+ <div class="actions">
120
+ <?php if ($_product->isSaleable()): ?>
121
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
122
+ <?php else: ?>
123
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
124
+ <?php endif; ?>
125
+ <ul class="add-to-links">
126
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
127
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
128
+ <?php endif; ?>
129
+ <?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
130
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
131
+ <?php endif; ?>
132
+ </ul>
133
+ </div>
134
+ </li>
135
+ <?php if ($i % $_columnCount == 0 || $i == $_collectionSize): ?>
136
+ </ul>
137
+ <?php endif ?>
138
+ <?php endforeach ?>
139
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd', 'even', 'first', 'last'])</script>
140
+ <?php endif; ?>
141
+
142
+ <div class="toolbar-bottom">
143
+ <?php echo $this->getToolbarHtml() ?>
144
+ </div>
145
+ </div>
146
+ <?php endif; ?>
147
+ <?php
148
+ $_reevoo = Mage::helper('reevoo/api');
149
+ if ($_reevoo->getStatus()) {
150
+ $reevooMark = $_reevoo->getReevooApi();
151
+ //$reevooMark->customerExperienceReviews(array("numberOfReviews" => 6, "paginated" => true, "locale" => str_replace('_', '-',$_reevoo->getValue('locale'))));
152
+ }?>
app/design/frontend/base/default/template/reevoo/html/footer.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ $_reevoo = Mage::helper('reevoo/api');
24
+ if ($_reevoo->getStatus()) {
25
+ $reevooMark = $_reevoo->getReevooApi();
26
+ $reevooMark->javascriptAssets();
27
+ }
28
+ ?>
29
+
app/design/frontend/base/default/template/reevoo/html/head.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ $_reevoo = Mage::helper('reevoo/api');
24
+ $_helper = $this->helper('reevoo/tracking');
25
+ if ($_reevoo->getStatus()) {
26
+ $reevooMark = $_reevoo->getReevooApi();
27
+ }
28
+ if ($_helper->getStatus() && $_helper->getStatus('tracking_purchase')) {
29
+ $this->_getTrackingPurchase();
30
+ }
31
+
32
+
app/design/frontend/base/default/template/reevoo/review_list.phtml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+ /**
15
+ * Reevoo Package Module.
16
+ *
17
+ * @category Reeovoo Magento Connect
18
+ * @package Com_Reevoo
19
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
20
+ */
21
+ $_reevoo = Mage::helper('reevoo/api');
22
+ 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')))); ?>
33
+ </div>
34
+ <div class="reevoo_customer_experience_reviews">
35
+ <?php //$reevooMark->customerExperienceReviews(array("numberOfReviews" => 6, "paginated" => true, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
36
+ </div>
37
+ <script type="text/javascript">
38
+ $$('.toggle-tabs li.last').addEventListener('click', (function () {
39
+ return ReevooMark.track_click_through('<?php echo $sku; ?>');
40
+ }), false);
41
+ </script>
42
+ <?php } ?>
app/design/frontend/base/default/template/reevoo/summary.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ $_reevoo = Mage::helper('reevoo/api');
23
+ if ($_reevoo->getStatus()) {
24
+ $reevooMark = $_reevoo->getReevooApi();
25
+ $product_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'product_badge');
26
+ $owner_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'owner_badge');
27
+ $page_allowed = $_reevoo->getMultiSelectValue('badges_location', 'reevoo_setup/reevoo_status/', 'product_pages');
28
+ $varientMessageProductBadge = $_reevoo->getValue('product_varient_for_badge','reevoo_setup/reevoo_status/');
29
+ $varientMessageConversationBadge = $_reevoo->getValue('askanhonor_varient_for_badge','reevoo_setup/reevoo_status/');
30
+ $sku = $this->getProduct()->getResource()->getAttribute($_reevoo->getValue('default_sku'))->getFrontend()->getValue($this->getProduct());
31
+ ?>
32
+ <?php if($product_bage && $page_allowed): ?>
33
+ <div class="reevoo_product_badge" style="">
34
+ <?php $reevooMark->productBadge(array("sku" => $sku, 'variantName' => $varientMessageProductBadge)); ?>
35
+ </div>
36
+ <?php endif; ?>
37
+ <?php if($owner_bage && $page_allowed): ?>
38
+ <div class="review_review" style="">
39
+ <?php $reevooMark->conversationsBadge(array("sku" => $sku, 'variantName' => $varientMessageConversationBadge)); ?>
40
+ </div>
41
+ <?php endif; ?>
42
+
43
+ <?php
44
+ } else {
45
+ ?>
46
+ <?php if ($this->getReviewsCount()): ?>
47
+ <div class="ratings">
48
+ <?php if ($this->getRatingSummary()): ?>
49
+ <div class="rating-box">
50
+ <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
51
+ </div>
52
+ <?php endif; ?>
53
+ <p class="rating-links">
54
+ <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a>
55
+ <span class="separator">|</span>
56
+ <a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a>
57
+ </p>
58
+ </div>
59
+ <?php elseif ($this->getDisplayIfEmpty()): ?>
60
+ <p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
61
+ <?php endif; ?>
62
+ <?php } ?>
app/design/frontend/base/default/template/reevoo/summary_short.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+ /**
15
+ * Reevoo Package Module.
16
+ *
17
+ * @category Reeovoo Magento Connect
18
+ * @package Com_Reevoo
19
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
20
+ */
21
+ $_reevoo = Mage::helper('reevoo/api');
22
+ if ($_reevoo->getStatus()) {
23
+ } else {
24
+ ?>
25
+ <?php if ($this->getReviewsCount()): ?>
26
+ <div class="ratings">
27
+ <?php if ($this->getRatingSummary()): ?>
28
+ <div class="rating-box">
29
+ <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
30
+ </div>
31
+ <?php endif; ?>
32
+ <span class="amount"><a href="#" onclick="var t = opener ? opener.window : window; t.location.href = '<?php echo $this->getReviewsUrl() ?>'; return false;"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a></span>
33
+ </div>
34
+ <?php elseif ($this->getDisplayIfEmpty()): ?>
35
+ <p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
36
+ <?php endif; ?>
37
+ <?php } ?>
app/design/frontend/base/default/template/reevoo/tracking/propensity.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $_helper = $this->helper('reevoo/tracking');
4
+ if ($_helper->getStatus('tracking_propensity')) {
5
+ $tempProduct = Mage::getModel('catalog/product')
6
+ ->load(Mage::app()->getRequest()->getParam('id'));
7
+ $sku = $tempProduct->getSku();
8
+ if (!empty($sku)) {
9
+ $this->_getPropensityTracking($sku);
10
+ } else {
11
+ $this->_getPropensityTracking(FALSE); // This is to add backward compatibility with extra uses of this piece of block.
12
+ }
13
+ }
app/design/frontend/base/default/template/reevoo/widgets/customerexperience/block.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ $_reevoo = Mage::helper('reevoo/api');
25
+ $numberOfReviews = $this->getNumberofreviews();
26
+ $pagination = (boolean)$this->getPagination();
27
+
28
+ $reevooMark = $_reevoo->getReevooApi();
29
+ $reevooMark->cssAssets();
30
+ ?>
31
+ <?php if ($this->getStatus()): ?>
32
+ <div class="reevoo_block_customerexperience">
33
+ <?php $this->getExperience()->customerExperienceReviews(array("numberOfReviews" => $numberOfReviews, "paginated" => $pagination, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
34
+ </div>
35
+ <?php endif; ?>
app/design/frontend/base/default/template/reevoo/widgets/customerserviceratingbadge/block.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ $numberOfReviews = $this->getNumberofreviews();
25
+ $variant = $this->getVariant();
26
+ ?>
27
+ <?php if ($this->getStatus()): ?>
28
+ <div class="reevoo_block_customerserviceratingbadge" data-varient-value="<?php echo $variant; ?>">
29
+ <?php $this->getExperience()->customerServiceRatingBadge(array("variantName" => $variant)); ?>
30
+ </div>
31
+ <?php endif; ?>
app/design/frontend/base/default/template/reevoo/widgets/deliveryratingbadge/block.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ $numberOfReviews = $this->getNumberofreviews();
25
+ $variant = $this->getVariant();
26
+ ?>
27
+ <?php if ($this->getStatus()): ?>
28
+ <div class="reevoo_block_customerserviceratingbadge" data-varient-value="<?php echo $variant; ?>">
29
+ <?php $this->getExperience()->deliveryRatingBadge(array("variantName" => $variant)); ?>
30
+ </div>
31
+ <?php endif; ?>
app/design/frontend/base/default/template/reevoo/widgets/servicerating/block.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+ /**
15
+ * Reevoo Package Module.
16
+ *
17
+ * @category Reeovoo Magento Connect
18
+ * @package Com_Reevoo
19
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
20
+ */
21
+ ?>
22
+ <?php
23
+ $_reevoo = Mage::helper('reevoo/api');
24
+ $numberOfReviews = $this->getNumberofreviews();
25
+ $variant = $this->getVariant();
26
+ ?>
27
+ <?php if ($this->getStatus()): ?>
28
+ <div class="reevoo_block_overallserviceratingbadge" data-varient-value="<?php echo $variant; ?>">
29
+ <?php $this->getExperience()->overallServiceRatingBadge(array("variantName" => $variant)); ?>
30
+ </div>
31
+ <?php endif; ?>
app/design/frontend/base/default/template/reevoo/widgets/tracking/propensity.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+
25
+ $trackingMessage = $this->getMessage();
26
+ $_tracker = $this->getLayout()->createBlock('reevoo/tracking');
27
+ $_helper = Mage::helper('reevoo/tracking');
28
+ if ($_helper->getStatus('tracking_propensity')) {
29
+ if (Mage::app()->getRequest()->getParam('id')) {
30
+ $tempProduct = Mage::getModel('catalog/product')
31
+ ->load(Mage::app()->getRequest()->getParam('id'));
32
+ $sku = $tempProduct->getSku();
33
+ if (!empty($sku)) {
34
+ $_tracker->_getPropensityTracking($sku ,$trackingMessage);
35
+ } else {
36
+ $_tracker->_getPropensityTracking(FALSE, $trackingMessage);
37
+ }
38
+ } else {
39
+ $_tracker->_getPropensityTracking(FALSE, $trackingMessage);
40
+ }
41
+ }
app/design/frontend/rwd/default/layout/reevoo.xml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <!--
4
+ /**
5
+ * DISCLAIMER
6
+ *
7
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
8
+ * versions in the future. If you wish to customize the code for your
9
+ * needs please refer to https://github.com/reevoo/ for more information.
10
+ *
11
+ * @category Reeovoo Magento Connect
12
+ * @package Com_Reevoo
13
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
14
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
+ */
16
+
17
+ /**
18
+ * Reevoo Package Module.
19
+ *
20
+ * @category Reeovoo Magento Connect
21
+ * @package Com_Reevoo
22
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
23
+ */
24
+ -->
25
+ <default>
26
+ <reference name="head" before="-">
27
+ <action method="setCacheLifetime">
28
+ <s>null</s>
29
+ </action>
30
+ <block type="reevoo/tracking" name="reevoo_header_elements" as="reevoo_header_elements" template="reevoo/html/head.phtml" />
31
+ </reference>
32
+ <reference name="before_body_end">
33
+ <block type="core/template" name="reevoo_footer_elements" template="reevoo/html/footer.phtml"/>
34
+ </reference>
35
+ </default>
36
+ <review_product_list>
37
+ <remove name="reevoo_customer_experience_list" /> <!-- As we don't need the experience list seperately on our review page. -->
38
+ <reference name="product.info.product_additional_data">
39
+ <action method="setTemplate" ifconfig="reevoo_setup/reevoo_status/embedded_reviews">
40
+ <template>reevoo/review_list.phtml</template>
41
+ </action>
42
+ </reference>
43
+ </review_product_list>
44
+
45
+ <catalog_category_default>
46
+ <reference name="product_list">
47
+ <action method="setTemplate">
48
+ <template>reevoo/catalog/product/list.phtml</template>
49
+ </action>
50
+ </reference>
51
+ </catalog_category_default>
52
+ <catalog_category_layered>
53
+ <reference name="product_list">
54
+ <action method="setTemplate">
55
+ <template>reevoo/catalog/product/list.phtml</template>
56
+ </action>
57
+ </reference>
58
+ </catalog_category_layered>
59
+ <!-- Categories/ Search Results and Also for products block -->
60
+ <!--<catalog_category_default>
61
+ <reference name="content">
62
+ <block type="core/template" name="reevoo_customer_experience_list" after="product_list" template="reevoo/catalog/customer_experience_list.phtml"/>
63
+ </reference>
64
+ </catalog_category_default>
65
+ <catalog_category_layered>
66
+ <reference name="content">
67
+ <block type="core/template" name="reevoo_customer_experience_list" after="product_list" template="reevoo/catalog/customer_experience_list.phtml"/>
68
+ </reference>
69
+ </catalog_category_layered>
70
+ <catalog_product_view>-->
71
+ <!--<reference name="content">
72
+ <block type="core/template" name="reevoo_customer_experience_list" after="-" template="reevoo/catalog/customer_experience.phtml"/>
73
+ </reference>-->
74
+ <catalog_product_view>
75
+ <!--<reference name="head">
76
+ <block type="reevoo/tracking" name="reevoo_propensitytracking" after="-" template="reevoo/tracking/propensity.phtml" />
77
+ </reference>-->
78
+ <reference name="product.reviews">
79
+ <action method="setTemplate" ifconfig="reevoo_setup/reevoo_status/embedded_reviews">
80
+ <template>reevoo/review_list.phtml</template>
81
+ </action>
82
+ </reference>
83
+ </catalog_product_view>
84
+
85
+
86
+ </layout>
app/design/frontend/rwd/default/template/reevoo/catalog/customer_experience.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <div class="reevoo_embedded_reviews">
24
+ <?php
25
+ $_reevoo = Mage::helper('reevoo/api');
26
+ if ($_reevoo->getStatus() && $_reevoo->getValue('embedded_reviews')) {
27
+ $reevooMark = $_reevoo->getReevooApi();
28
+ $reevooMark->customerExperienceReviews(array("numberOfReviews" => 6, "paginated" => true, "locale" => str_replace('_', '-', $_reevoo->getValue('locale'))));
29
+ }
30
+ ?>
31
+ <div>
app/design/frontend/rwd/default/template/reevoo/catalog/customer_experience_list.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <div class="reevoo_embedded_reviews_list">
24
+ <?php
25
+ $_reevoo = Mage::helper('reevoo/api');
26
+ if ($_reevoo->getStatus()) {
27
+ $reevooMark = $_reevoo->getReevooApi();
28
+ $reevooMark->customerExperienceReviews(array("numberOfReviews" => 6, "paginated" => true, "locale" => str_replace('_', '-', $_reevoo->getValue('locale'))));
29
+ }
30
+ ?>
31
+ </div>
app/design/frontend/rwd/default/template/reevoo/catalog/product/list.phtml ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ /**
25
+ * Product list template
26
+ *
27
+ * @see Mage_Catalog_Block_Product_List
28
+ */
29
+ /* @var $this Mage_Catalog_Block_Product_List */
30
+ ?>
31
+ <?php
32
+ $_productCollection=$this->getLoadedProductCollection();
33
+ $_helper = $this->helper('catalog/output');
34
+ ?>
35
+ <?php if(!$_productCollection->count()): ?>
36
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
37
+ <?php else: ?>
38
+ <div class="category-products">
39
+ <?php echo $this->getToolbarHtml() ?>
40
+ <?php // List mode ?>
41
+ <?php if($this->getMode()!='grid'): ?>
42
+ <?php $_iterator = 0; ?>
43
+ <ol class="products-list" id="products-list">
44
+ <?php foreach ($_productCollection as $_product): ?>
45
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
46
+ <?php // Product Image ?>
47
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
48
+ <?php /* Based on the native RWD styling, product images are displayed at a max of ~400px wide when viewed on a
49
+ one column page layout with four product columns from a 1280px viewport. For bandwidth reasons,
50
+ we are going to serve a 300px image, as it will look fine at 400px and most of the times, the image
51
+ will be displayed at a smaller size (eg, if two column are being used or viewport is smaller than 1280px).
52
+ This $_imgSize value could even be decreased further, based on the page layout
53
+ (one column, two column, three column) and number of product columns. */ ?>
54
+ <?php $_imgSize = 300; ?>
55
+ <img id="product-collection-image-<?php echo $_product->getId(); ?>"
56
+ src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->keepFrame(false)->resize($_imgSize); ?>"
57
+ alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
58
+ </a>
59
+ <?php // Product description ?>
60
+ <div class="product-shop">
61
+ <div class="f-fix">
62
+ <div class="product-primary">
63
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
64
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
65
+ <?php if($_product->getRatingSummary()): ?>
66
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
67
+ <?php endif; ?>
68
+ <?php
69
+ // Provides extra blocks on which to hang some features for products in the list
70
+ // Features providing UI elements targeting this block will display directly below the product name
71
+ if ($this->getChild('name.after')) {
72
+ $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
73
+ foreach ($_nameAfterChildren as $_nameAfterChildName) {
74
+ $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
75
+ $_nameAfterChild->setProduct($_product);
76
+ echo $_nameAfterChild->toHtml();
77
+ }
78
+ }
79
+ ?>
80
+ </div>
81
+ <div class="product-secondary">
82
+ <?php echo $this->getPriceHtml($_product, true) ?>
83
+ </div>
84
+ <div class="product-secondary">
85
+ <?php if(!$_product->canConfigure() && $_product->isSaleable()): ?>
86
+ <p class="action"><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
87
+ <?php elseif($_product->getStockItem() && $_product->getStockItem()->getIsInStock()): ?>
88
+ <p class="action"><a title="<?php echo $this->__('View Details') ?>" class="button" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('View Details') ?></a></p>
89
+ <?php else: ?>
90
+ <p class="action availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
91
+ <?php endif; ?>
92
+ <ul class="add-to-links">
93
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
94
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
95
+ <?php endif; ?>
96
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
97
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
98
+ <?php endif; ?>
99
+ </ul>
100
+ </div>
101
+ <div class="desc std">
102
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
103
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </li>
108
+ <?php endforeach; ?>
109
+ </ol>
110
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
111
+
112
+ <?php else: ?>
113
+
114
+ <?php // Grid Mode ?>
115
+
116
+ <?php $_collectionSize = $_productCollection->count() ?>
117
+ <?php $_columnCount = $this->getColumnCount(); ?>
118
+ <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col">
119
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
120
+ <?php /*if ($i++%$_columnCount==0): ?>
121
+ <?php endif*/ ?>
122
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
123
+ <?php
124
+ $_reevoo = Mage::helper('reevoo/api');
125
+ $product_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'product_badge');
126
+ $owner_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'owner_badge');
127
+ $page_allowed = $_reevoo->getMultiSelectValue('badges_location', 'reevoo_setup/reevoo_status/', 'listing_pages');
128
+ $varientMessageProductBadge = $_reevoo->getValue('product_list_varient_for_badge','reevoo_setup/reevoo_status/');
129
+ $varientMessageConversationBadge = $_reevoo->getValue('askanhonor_list_varient_for_badge','reevoo_setup/reevoo_status/');
130
+
131
+ if ($_reevoo->getStatus()) {
132
+ $reevooMark = $_reevoo->getReevooApi(); ?>
133
+ <?php if($product_bage && $page_allowed): ?>
134
+ <div class="reevoo_review_product_badge" data-varientName-value="<?php echo $varientMessageProductBadge; ?>">
135
+ <?php $reevooMark->productBadge(array("sku" => $_product->getSku(), 'variantName' => $varientMessageProductBadge)); ?>
136
+ </div>
137
+ <?php endif; ?>
138
+ <?php if($owner_bage && $page_allowed): ?>
139
+ <div class="reevoo_conversion_badge" data-varientName-value="<?php echo $varientMessageConversationBadge; ?>">
140
+ <?php $reevooMark->conversationsBadge(array("sku" => $_product->getSku(), 'variantName' => $varientMessageConversationBadge)) ?>
141
+ </div>
142
+ <?php endif; ?>
143
+ <?php } ?>
144
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
145
+ <?php $_imgSize = 210; ?>
146
+ <img id="product-collection-image-<?php echo $_product->getId(); ?>"
147
+ src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($_imgSize); ?>"
148
+ alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
149
+ </a>
150
+ <div class="product-info">
151
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
152
+ <?php
153
+ // Provides extra blocks on which to hang some features for products in the list
154
+ // Features providing UI elements targeting this block will display directly below the product name
155
+ if ($this->getChild('name.after')) {
156
+ $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
157
+ foreach ($_nameAfterChildren as $_nameAfterChildName) {
158
+ $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
159
+ $_nameAfterChild->setProduct($_product);
160
+ echo $_nameAfterChild->toHtml();
161
+ }
162
+ }
163
+ ?>
164
+ <?php echo $this->getPriceHtml($_product, true) ?>
165
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
166
+ <div class="actions">
167
+ <?php if(!$_product->canConfigure() && $_product->isSaleable()): ?>
168
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
169
+ <?php elseif($_product->getStockItem() && $_product->getStockItem()->getIsInStock()): ?>
170
+ <a title="<?php echo $this->__('View Details') ?>" class="button" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('View Details') ?></a>
171
+ <?php else: ?>
172
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
173
+ <?php endif; ?>
174
+ <ul class="add-to-links">
175
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
176
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
177
+ <?php endif; ?>
178
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
179
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
180
+ <?php endif; ?>
181
+ </ul>
182
+ </div>
183
+ </div>
184
+ </li>
185
+ <?php /*if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
186
+ <?php endif*/ ?>
187
+ <?php endforeach ?>
188
+ </ul>
189
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
190
+ <?php endif; ?>
191
+
192
+ <div class="toolbar-bottom">
193
+ <?php echo $this->getToolbarHtml() ?>
194
+ </div>
195
+ </div>
196
+ <?php endif; ?>
197
+ <?php
198
+ // Provides a block where additional page components may be attached, primarily good for in-page JavaScript
199
+ if ($this->getChild('after')) {
200
+ $_afterChildren = $this->getChild('after')->getSortedChildren();
201
+ foreach ($_afterChildren as $_afterChildName) {
202
+ $_afterChild = $this->getChild('after')->getChild($_afterChildName);
203
+ //set product collection on after blocks
204
+ $_afterChild->setProductCollection($_productCollection);
205
+ echo $_afterChild->toHtml();
206
+ }
207
+ }
208
+ ?>
app/design/frontend/rwd/default/template/reevoo/html/footer.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ $_reevoo = Mage::helper('reevoo/api');
24
+ if ($_reevoo->getStatus()) {
25
+ $reevooMark = $_reevoo->getReevooApi();
26
+ $reevooMark->javascriptAssets();
27
+ }
28
+ ?>
29
+
app/design/frontend/rwd/default/template/reevoo/html/head.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ $_reevoo = Mage::helper('reevoo/api');
24
+ $_helper = $this->helper('reevoo/tracking');
25
+ if ($_reevoo->getStatus()) {
26
+ $reevooMark = $_reevoo->getReevooApi();
27
+ }
28
+ if ($_helper->getStatus() && $_helper->getStatus('tracking_purchase')) {
29
+ $this->_getTrackingPurchase();
30
+ }
31
+
32
+
app/design/frontend/rwd/default/template/reevoo/review_list.phtml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+ /**
15
+ * Reevoo Package Module.
16
+ *
17
+ * @category Reeovoo Magento Connect
18
+ * @package Com_Reevoo
19
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
20
+ */
21
+ $_reevoo = Mage::helper('reevoo/api');
22
+ 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')))); ?>
33
+ </div>
34
+ <div class="reevoo_customer_experience_reviews">
35
+ <?php //$reevooMark->customerExperienceReviews(array("numberOfReviews" => 6, "paginated" => true, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
36
+ </div>
37
+ <script type="text/javascript">
38
+ $$('.toggle-tabs li.last').addEventListener('click', (function () {
39
+ return ReevooMark.track_click_through('<?php echo $sku; ?>');
40
+ }), false);
41
+ </script>
42
+ <?php } ?>
app/design/frontend/rwd/default/template/reevoo/summary.phtml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ $_reevoo = Mage::helper('reevoo/api');
23
+ if ($_reevoo->getStatus()) {
24
+ $reevooMark = $_reevoo->getReevooApi();
25
+ $product_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'product_badge');
26
+ $owner_bage = $_reevoo->getMultiSelectValue('badges', 'reevoo_setup/reevoo_status/', 'owner_badge');
27
+ $page_allowed = $_reevoo->getMultiSelectValue('badges_location', 'reevoo_setup/reevoo_status/', 'product_pages');
28
+ $varientMessageProductBadge = $_reevoo->getValue('product_varient_for_badge','reevoo_setup/reevoo_status/');
29
+ $varientMessageConversationBadge = $_reevoo->getValue('askanhonor_varient_for_badge','reevoo_setup/reevoo_status/');
30
+ $sku = $this->getProduct()->getResource()->getAttribute($_reevoo->getValue('default_sku'))->getFrontend()->getValue($this->getProduct());
31
+ ?>
32
+ <?php if($product_bage && $page_allowed): ?>
33
+ <div class="reevoo_product_badge" style="">
34
+ <?php $reevooMark->productBadge(array("sku" => $sku, 'variantName' => $varientMessageProductBadge)); ?>
35
+ </div>
36
+ <?php endif; ?>
37
+ <?php if($owner_bage && $page_allowed): ?>
38
+ <div class="review_review" style="">
39
+ <?php $reevooMark->conversationsBadge(array("sku" => $sku, 'variantName' => $varientMessageConversationBadge)); ?>
40
+ </div>
41
+ <?php endif; ?>
42
+ <?php
43
+ } else {
44
+ ?>
45
+ <?php if ($this->getReviewsCount()): ?>
46
+ <div class="ratings">
47
+ <?php if ($this->getRatingSummary()): ?>
48
+ <div class="rating-box">
49
+ <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
50
+ </div>
51
+ <?php endif; ?>
52
+ <p class="rating-links">
53
+ <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a>
54
+ <span class="separator">|</span>
55
+ <a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a>
56
+ </p>
57
+ </div>
58
+ <?php elseif ($this->getDisplayIfEmpty()): ?>
59
+ <p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
60
+ <?php endif; ?>
61
+ <?php } ?>
app/design/frontend/rwd/default/template/reevoo/summary_short.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+ /**
15
+ * Reevoo Package Module.
16
+ *
17
+ * @category Reeovoo Magento Connect
18
+ * @package Com_Reevoo
19
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
20
+ */
21
+ $_reevoo = Mage::helper('reevoo/api');
22
+ if ($_reevoo->getStatus()) {
23
+ } else {
24
+ ?>
25
+ <?php if ($this->getReviewsCount()): ?>
26
+ <div class="ratings">
27
+ <?php if ($this->getRatingSummary()): ?>
28
+ <div class="rating-box">
29
+ <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
30
+ </div>
31
+ <?php endif; ?>
32
+ <span class="amount"><a href="#" onclick="var t = opener ? opener.window : window; t.location.href = '<?php echo $this->getReviewsUrl() ?>'; return false;"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a></span>
33
+ </div>
34
+ <?php elseif ($this->getDisplayIfEmpty()): ?>
35
+ <p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
36
+ <?php endif; ?>
37
+ <?php } ?>
app/design/frontend/rwd/default/template/reevoo/tracking/propensity.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $_helper = $this->helper('reevoo/tracking');
4
+ if ($_helper->getStatus('tracking_propensity')) {
5
+ $tempProduct = Mage::getModel('catalog/product')
6
+ ->load(Mage::app()->getRequest()->getParam('id'));
7
+ $sku = $tempProduct->getSku();
8
+ if (!empty($sku)) {
9
+ $this->_getPropensityTracking($sku);
10
+ } else {
11
+ $this->_getPropensityTracking(FALSE); // This is to add backward compatibility with extra uses of this piece of block.
12
+ }
13
+ }
app/design/frontend/rwd/default/template/reevoo/widgets/customerexperience/block.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ $_reevoo = Mage::helper('reevoo/api');
25
+ $numberOfReviews = $this->getNumberofreviews();
26
+ $pagination = (boolean)$this->getPagination();
27
+
28
+ $reevooMark = $_reevoo->getReevooApi();
29
+ $reevooMark->cssAssets();
30
+ ?>
31
+ <?php if ($this->getStatus()): ?>
32
+ <div class="reevoo_block_customerexperience">
33
+ <?php $this->getExperience()->customerExperienceReviews(array("numberOfReviews" => $numberOfReviews, "paginated" => $pagination, "locale" => str_replace('_', '-', $_reevoo->getValue('locale')))); ?>
34
+ </div>
35
+ <?php endif; ?>
app/design/frontend/rwd/default/template/reevoo/widgets/customerserviceratingbadge/block.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ $numberOfReviews = $this->getNumberofreviews();
25
+ $variant = $this->getVariant();
26
+ ?>
27
+ <?php if ($this->getStatus()): ?>
28
+ <div class="reevoo_block_customerserviceratingbadge" data-varient-value="<?php echo $variant; ?>">
29
+ <?php $this->getExperience()->customerServiceRatingBadge(array("variantName" => $variant)); ?>
30
+ </div>
31
+ <?php endif; ?>
app/design/frontend/rwd/default/template/reevoo/widgets/deliveryratingbadge/block.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /**
16
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+ $numberOfReviews = $this->getNumberofreviews();
25
+ $variant = $this->getVariant();
26
+ ?>
27
+ <?php if ($this->getStatus()): ?>
28
+ <div class="reevoo_block_customerserviceratingbadge" data-varient-value="<?php echo $variant; ?>">
29
+ <?php $this->getExperience()->deliveryRatingBadge(array("variantName" => $variant)); ?>
30
+ </div>
31
+ <?php endif; ?>
app/design/frontend/rwd/default/template/reevoo/widgets/servicerating/block.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DISCLAIMER
4
+ *
5
+ * Do not edit or add to this file if you wish to upgrade reevoo to newer
6
+ * versions in the future. If you wish to customize the code for your
7
+ * needs please refer to https://github.com/reevoo/ for more information.
8
+ *
9
+ * @category Reeovoo Magento Connect
10
+ * @package Com_Reevoo
11
+ * @copyright Copyright (c) 20015 Reevoo Limited. (www.reevoo.com)
12
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+ /**
15
+ * Reevoo Package Module.
16
+ *
17
+ * @category Reeovoo Magento Connect
18
+ * @package Com_Reevoo
19
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
20
+ */
21
+ ?>
22
+ <?php
23
+ $_reevoo = Mage::helper('reevoo/api');
24
+ $numberOfReviews = $this->getNumberofreviews();
25
+ $variant = $this->getVariant();
26
+ ?>
27
+ <?php if ($this->getStatus()): ?>
28
+ <div class="reevoo_block_overallserviceratingbadge" data-varient-value="<?php echo $variant; ?>">
29
+ <?php $this->getExperience()->overallServiceRatingBadge(array("variantName" => $variant)); ?>
30
+ </div>
31
+ <?php endif; ?>
app/design/frontend/rwd/default/template/reevoo/widgets/tracking/propensity.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ ?>
23
+ <?php
24
+
25
+ $trackingMessage = $this->getMessage();
26
+ $_tracker = $this->getLayout()->createBlock('reevoo/tracking');
27
+ $_helper = Mage::helper('reevoo/tracking');
28
+ if ($_helper->getStatus('tracking_propensity')) {
29
+ if (Mage::app()->getRequest()->getParam('id')) {
30
+ $tempProduct = Mage::getModel('catalog/product')
31
+ ->load(Mage::app()->getRequest()->getParam('id'));
32
+ $sku = $tempProduct->getSku();
33
+ if (!empty($sku)) {
34
+ $_tracker->_getPropensityTracking($sku ,$trackingMessage);
35
+ } else {
36
+ $_tracker->_getPropensityTracking(FALSE, $trackingMessage);
37
+ }
38
+ } else {
39
+ $_tracker->_getPropensityTracking(FALSE, $trackingMessage);
40
+ }
41
+ }
app/etc/modules/EComHut_Reevoo.xml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ -->
25
+ <config>
26
+ <modules>
27
+ <EComHut_Reevoo>
28
+ <active>true</active>
29
+ <codePool>local</codePool>
30
+ <depends>
31
+ <Mage_Core />
32
+ <Mage_Catalog />
33
+ <Mage_Adminhtml />
34
+ </depends>
35
+ </EComHut_Reevoo>
36
+ </modules>
37
+ </config>
lib/Reevoo/reevoo_mark.php ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Reevoo Package Module.
17
+ *
18
+ * @category Reeovoo Magento Connect
19
+ * @package Com_Reevoo
20
+ * @author Haroon Chaudhry<haroon.chaudhry@innovadeltech.com>
21
+ */
22
+ require_once(Mage::getBaseDir('lib') . "/Reevoo/reevoo_mark_utils.php");
23
+ require_once(Mage::getBaseDir('lib') . "/Reevoo/reevoo_mark_http_client.php");
24
+
25
+ class ReevooMark {
26
+
27
+ function ReevooMark($trkrefs, $cache_path, $base_url = 'http://mark.reevoo.com') {
28
+ $this->trkrefs = $trkrefs;
29
+ $this->base_url = $base_url;
30
+ $this->http_client = new ReevooMarkHttpClient($base_url, $cache_path);
31
+ $this->utils = new ReevooMarkUtils($trkrefs);
32
+ }
33
+
34
+ function cssAssets() {
35
+ echo '<link rel="stylesheet" href="//mark.reevoo.com/stylesheets/reevoomark/embedded_reviews.css" type="text/css" />';
36
+ }
37
+
38
+ function productBadge($options = array()) {
39
+ if (!$options['sku']) {
40
+ Mage::log('Compulsory parameter sku has not been provided to ReevooMark#productBadge', null, 'reevoo_php_api.log');
41
+ return;
42
+ }
43
+ $variant = $this->utils->getVariant($options);
44
+ $trkref = $this->utils->getTrkref($options);
45
+ echo "<a class=\"reevoomark{$variant}\" href=\"{$this->base_url}/partner/{$trkref}/{$options['sku']}\"></a>";
46
+ }
47
+
48
+ function conversationsBadge($options = array()) {
49
+ if (!$options['sku']) {
50
+ Mage::log('Need to provide a SKU for ReevooMark#conversationBadge', null, 'reevoo_php_api.log');
51
+ return;
52
+ }
53
+ $variant = $this->utils->getVariant($options);
54
+ $trkref = $this->utils->getTrkref($options);
55
+ echo "<a class=\"reevoomark reevoo-conversations{$variant}\" href=\"{$this->base_url}/partner/{$trkref}/{$options['sku']}\"></a>";
56
+ }
57
+
58
+ function productSeriesBadge($options = array()) {
59
+ if (!$options['sku']) {
60
+ Mage::log('Need to provide a SKU for ReevooMark#productSeriesBadge', null, 'reevoo_php_api.log');
61
+ return;
62
+ }
63
+ $variant = $this->utils->getVariant($options);
64
+ $trkref = $this->utils->getTrkref($options);
65
+ echo "<a class=\"reevoomark{$variant}\" href=\"{$this->base_url}/partner/{$trkref}/series:{$options['sku']}\"></a>";
66
+ }
67
+
68
+ function conversationSeriesBadge($options = array()) {
69
+ if (!$options['sku']) {
70
+ Mage::log('Need to provide a SKU for ReevooMark#conversationSeriesBadge', null, 'reevoo_php_api.log');
71
+ return;
72
+ }
73
+ $variant = $this->utils->getVariant($options);
74
+ $trkref = $this->utils->getTrkref($options);
75
+ echo "<a class=\"reevoomark reevoo-conversations{$variant}\" href=\"{$this->base_url}/partner/{$trkref}/series:{$options['sku']}\"></a>";
76
+ }
77
+
78
+ function overallServiceRatingBadge($options = array()) {
79
+ $variant = $this->utils->getVariant($options);
80
+ $trkref = $this->utils->getTrkref($options);
81
+ echo "<a class=\"reevoo_reputation{$variant}\" href=\"{$this->base_url}/retailer/{$trkref}\"></a>";
82
+ }
83
+
84
+ function customerServiceRatingBadge($options = array()) {
85
+ $variant = $this->utils->getVariant($options);
86
+ $trkref = $this->utils->getTrkref($options);
87
+ echo "<a class=\"reevoo_reputation customer_service{$variant}\" href=\"{$this->base_url}/retailer/{$trkref}\"></a>";
88
+ }
89
+
90
+ function deliveryRatingBadge($options = array()) {
91
+ $variant = $this->utils->getVariant($options);
92
+ $trkref = $this->utils->getTrkref($options);
93
+ echo "<a class=\"reevoo_reputation delivery{$variant}\" href=\"{$this->base_url}/retailer/{$trkref}\"></a>";
94
+ }
95
+
96
+ function productReviews($options = array()) {
97
+ if (!$options['sku']) {
98
+ Mage::log('Need to provide a SKU for ReevooMark#productReviews', null, 'reevoo_php_api.log');
99
+ return;
100
+ }
101
+ $trkref = $this->utils->getTrkref($options);
102
+ $pagination_params = $this->utils->getPaginationParams($options);
103
+ $locale_param = $this->utils->getLocaleParam($options);
104
+ $sort_by_param = $this->utils->getSortByParam($options);
105
+ $filter_param = $this->utils->getFilterParam($options);
106
+ $client_url_param = $this->utils->getClientUrlParam($options);
107
+ $notEmpty = $this->get_embedded_data("/reevoomark/embeddable_reviews?trkref={$trkref}&sku={$options['sku']}{$pagination_params}{$locale_param}{$sort_by_param}{$filter_param}{$client_url_param}", "X-Reevoo-ReviewCount", $options);
108
+ return $notEmpty;
109
+ }
110
+
111
+ function customerExperienceReviews($options = array()) {
112
+ $trkref = $this->utils->getTrkref($options);
113
+ $pagination_params = $this->utils->getPaginationParams($options);
114
+ $locale_param = $this->utils->getLocaleParam($options);
115
+ $sort_by_param = $this->utils->getSortByParam($options);
116
+ $filter_param = $this->utils->getFilterParam($options);
117
+ $client_url_param = $this->utils->getClientUrlParam($options);
118
+ $notEmpty = $this->get_embedded_data("/reevoomark/embeddable_customer_experience_reviews?trkref={$trkref}{$pagination_params}{$locale_param}{$sort_by_param}{$filter_param}{$client_url_param}", "X-Reevoo-ReviewCount", $options);
119
+ return $notEmpty;
120
+ }
121
+
122
+ function conversations($options = array()) {
123
+ if (!$options['sku']) {
124
+ Mage::log('Need to provide a SKU for ReevooMark#productReviews', null, 'reevoo_php_api.log');
125
+ return;
126
+ }
127
+ $trkref = $this->utils->getTrkref($options);
128
+ $locale_param = $this->utils->getLocaleParam($options);
129
+ $notEmpty = $this->get_embedded_data("/reevoomark/embeddable_conversations?trkref={$trkref}&sku={$options['sku']}{$locale_param}", "X-Reevoo-ConversationCount", $options);
130
+ return $notEmpty;
131
+ }
132
+
133
+ function purchaseTrackingEvent($options = array()) {
134
+ $trkref = $this->utils->getTrkref($options);
135
+ if (!$options['skus']) {
136
+ Mage::log('Need to provide the list of skus purchased for ReevooMark#purchaseTrackingEvent', null, 'reevoo_php_api.log');
137
+ return;
138
+ }
139
+ $skus = $options['skus'];
140
+ $value = $options['value'];
141
+ $this->echo_tracking_script($trkref, "retailer.track_purchase(\"{$skus}\".split(/[ ,]+/), \"{$value}\");");
142
+ }
143
+
144
+ function propensityToBuyTrackingEvent($options = array()) {
145
+ $trkref = $this->utils->getTrkref($options);
146
+ $action = isset($options['action']) ? $options['action'] : false;
147
+ $sku = isset($options['sku']) ? $options['sku'] : false;
148
+ if (!$sku) {
149
+ $sku = "Global CTA";
150
+ }
151
+ $this->echo_tracking_script($trkref, "retailer.Tracking.ga_track_event(\"Propensity to buy\", \"{$action}\", \"{$sku}\");retailer.track_exit();");
152
+ }
153
+
154
+ function javascriptAssets() {
155
+ echo <<<EOT
156
+ <script id="reevoomark-loader" type="text/javascript" charset="utf-8">
157
+ (function () {
158
+ var script = document.createElement('script');
159
+ script.type = 'text/javascript';
160
+ script.src = '//cdn.mark.reevoo.com/assets/reevoo_mark.js';
161
+ var s = document.getElementById('reevoomark-loader');
162
+ s.parentNode.insertBefore(script, s);
163
+ })();
164
+ if (typeof afterReevooMarkLoaded === 'undefined') {
165
+ var afterReevooMarkLoaded = [];
166
+ }
167
+ afterReevooMarkLoaded.push(
168
+ function () {
169
+ ReevooApi.each('{$this->trkrefs}'.split(/[ ,]+/), function (retailer) {
170
+ retailer.init_badges();
171
+ retailer.init_reevoo_reputation_badges();
172
+ });
173
+ }
174
+ );
175
+ </script>
176
+ EOT;
177
+ }
178
+
179
+ private function get_embedded_data($embedded_data_url, $count_header, $options) {
180
+ $showEmptyMessage = array_key_exists('showEmptyMessage', $options) ? $options['showEmptyMessage'] : true;
181
+ $data = $this->http_client->getData($embedded_data_url);
182
+ $notEmpty = !!($data->header($count_header));
183
+ if ($notEmpty || $showEmptyMessage) {
184
+ echo $data->body();
185
+ }
186
+ return $notEmpty;
187
+ }
188
+
189
+ private function echo_tracking_script($trkref, $tracking_call) {
190
+ echo <<<EOT
191
+ <script type="text/javascript" charset="utf-8">
192
+ if (typeof afterReevooMarkLoaded === 'undefined') {
193
+ var afterReevooMarkLoaded = [];
194
+ }
195
+ afterReevooMarkLoaded.push(
196
+ function(){
197
+ ReevooApi.load('{$trkref}', function(retailer){
198
+ {$tracking_call}
199
+ });
200
+ }
201
+ );
202
+ </script>
203
+ EOT;
204
+ }
205
+
206
+ }
lib/Reevoo/reevoo_mark_cache.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ require_once(Mage::getBaseDir('lib') . "/Reevoo/reevoo_mark_document.php");
25
+ require_once(Mage::getBaseDir('lib') . "/Reevoo/reevoo_mark_utils.php");
26
+
27
+ class ReevooMarkCache {
28
+
29
+ var $cache_path;
30
+
31
+ function ReevooMarkCache($cache_path) {
32
+ $this->cache_path = $cache_path;
33
+ }
34
+
35
+ function saveToCache($data, $url_path) {
36
+ if (ReevooMarkUtils::presence($this->cache_path)) {
37
+ if (!file_exists($this->cache_path))
38
+ mkdir($this->cache_path);
39
+ file_put_contents($this->cachePath($url_path), $data);
40
+ }
41
+ }
42
+
43
+ function loadFromCache($url_path) {
44
+ if (ReevooMarkUtils::presence($this->cache_path)) {
45
+ if (file_exists($this->cachePath($url_path))) {
46
+ return file_get_contents($this->cachePath($url_path));
47
+ }
48
+ }
49
+ }
50
+
51
+ function cacheMTime($url_path) {
52
+ if (ReevooMarkUtils::presence($this->cache_path)) {
53
+ if (file_exists($this->cachePath($url_path))) {
54
+ return filemtime($this->cachePath($url_path));
55
+ }
56
+ }
57
+ }
58
+
59
+ function newDocumentFromCache($url_path) {
60
+ return new ReevooMarkDocument($this->loadFromCache($url_path), $this->cacheMTime($url_path));
61
+ }
62
+
63
+ protected function cachePath($url_path) {
64
+ $digest = md5($url_path);
65
+ return "$this->cache_path/$digest.cache";
66
+ }
67
+
68
+ }
lib/Reevoo/reevoo_mark_document.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ReevooMarkDocument {
25
+
26
+ protected $head, $body, $headers;
27
+
28
+ function __construct($data, $mtime) {
29
+ if ($this->data = $data)
30
+ list($this->head, $this->body) = explode("\n\n", $this->data, 2);
31
+ else
32
+ $this->head = $this->body = null;
33
+ $this->mtime = $mtime;
34
+ }
35
+
36
+ function body() {
37
+ if ($this->isValidResponse())
38
+ return $this->body;
39
+ else
40
+ return "";
41
+ }
42
+
43
+ function statusCode() {
44
+ $headers = explode("\n", $this->head, 2);
45
+ $status_line = $headers[0];
46
+ if (preg_match("/^HTTP\/[^ ]* ([0-9]{3})/", $status_line, $matches))
47
+ return $matches[1];
48
+ else
49
+ return 500;
50
+ }
51
+
52
+ function header($name) {
53
+ $headers = $this->headers();
54
+ $name = strtolower($name);
55
+ if (array_key_exists($name, $headers))
56
+ return $headers[$name];
57
+ else
58
+ return null;
59
+ }
60
+
61
+ function headers() {
62
+ if ($this->headers)
63
+ return $this->headers;
64
+ else {
65
+ $headers = explode("\n", $this->head);
66
+ array_shift($headers); // Status line is no use here
67
+ $parsed_headers = Array();
68
+ foreach ($headers as $header) {
69
+ list($key, $value) = explode(":", $header, 2);
70
+ $parsed_headers[strtolower($key)] = trim($value);
71
+ }
72
+ $this->headers = $parsed_headers;
73
+ return $this->headers;
74
+ }
75
+ }
76
+
77
+ function isValidResponse() {
78
+ if (!$this->data)
79
+ return false;
80
+ return 200 == $this->statusCode();
81
+ }
82
+
83
+ function isCachableResponse() {
84
+ return $this->statusCode() < 500;
85
+ }
86
+
87
+ function hasExpired() {
88
+ if (!$this->data)
89
+ return true;
90
+ return $this->maxAge() < $this->currentAge();
91
+ }
92
+
93
+ function maxAge() {
94
+ if (preg_match("/max-age=([0-9]+)/", $this->header("Cache-Control"), $matches))
95
+ return $matches[1];
96
+ }
97
+
98
+ function currentAge() {
99
+ return time() - $this->mtime + $this->header("Age");
100
+ }
101
+
102
+ }
103
+
104
+ ;
lib/Reevoo/reevoo_mark_http_client.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ require_once(Mage::getBaseDir('lib') . "/Reevoo/reevoo_mark_document.php");
25
+ require_once(Mage::getBaseDir('lib') . "/Reevoo/reevoo_mark_cache.php");
26
+
27
+ class ReevooMarkHttpClient {
28
+
29
+ function ReevooMarkHttpClient($base_url, $cache_path) {
30
+ $this->base_url = $base_url;
31
+ $this->cache = new ReevooMarkCache($cache_path);
32
+ }
33
+
34
+ function getData($url_path) {
35
+ $doc = $this->cache->newDocumentFromCache($url_path);
36
+ if ($doc->hasExpired()) {
37
+ $remote_doc = new ReevooMarkDocument($this->loadFromRemote($url_path), time());
38
+ if (!$doc->isCachableResponse() || $remote_doc->isCachableResponse()) {
39
+ $this->cache->saveToCache($remote_doc->data, $url_path);
40
+ $doc = $remote_doc;
41
+ }
42
+ }
43
+ return $doc;
44
+ }
45
+
46
+ protected function loadFromRemote($url_path) {
47
+ $remote_url = $this->base_url . $url_path;
48
+ $ch = curl_init();
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))
59
+ return str_replace("\r", "", $result);
60
+ else
61
+ return false;
62
+ }
63
+
64
+ }
lib/Reevoo/reevoo_mark_utils.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ReevooMarkUtils {
25
+
26
+ function ReevooMarkUtils($trkrefs) {
27
+ $trkref_array = explode(',', $trkrefs);
28
+ $this->trkref = self::presenceKey($trkref_array, 0);
29
+ }
30
+
31
+ static function presence($var, $default = null) {
32
+ return empty($var) ? $default : $var;
33
+ }
34
+
35
+ static function presenceKey($arr, $key, $default = null) {
36
+ return (is_array($arr) && array_key_exists($key, $arr)) ? $arr[$key] : $default;
37
+ }
38
+
39
+ function getVariant($options = array()) {
40
+ $variant = self::presenceKey($options, 'variantName', '');
41
+ if ($variant != '') {
42
+ $variant = ' ' . $variant . '_variant';
43
+ }
44
+ return $variant;
45
+ }
46
+
47
+ function getTrkref($options = array()) {
48
+ return self::presenceKey($options, 'trkref', $this->trkref);
49
+ }
50
+
51
+ function getPaginationParams($options = array()) {
52
+ $page = self::presenceKey($_GET, 'reevoo_page', 1);
53
+ $paginated = self::presenceKey($options, 'paginated');
54
+ if ($paginated) {
55
+ $numberOfReviews = self::presenceKey($options, 'numberOfReviews', "default");
56
+ $pagination_params = "&per_page={$numberOfReviews}&page={$page}";
57
+ } elseif (self::presenceKey($options, 'numberOfReviews')) {
58
+ $pagination_params = "&reviews={$options['numberOfReviews']}";
59
+ } else {
60
+ $pagination_params = '';
61
+ }
62
+ return $pagination_params;
63
+ }
64
+
65
+ function getLocaleParam($options = array()) {
66
+ if (self::presenceKey($options, 'locale')) {
67
+ return "&locale={$options['locale']}";
68
+ } else {
69
+ return "";
70
+ }
71
+ }
72
+
73
+ function getSortByParam($options = array()) {
74
+ if (self::presenceKey($_GET, 'reevoo_sort_by')) {
75
+ return "&sort_by={$_GET['reevoo_sort_by']}";
76
+ } else {
77
+ return "";
78
+ }
79
+ }
80
+
81
+ function getFilterParam($options = array()) {
82
+ if (self::presenceKey($_GET, 'reevoo_filter')) {
83
+ return "&filter={$_GET['reevoo_filter']}";
84
+ } else {
85
+ return "";
86
+ }
87
+ }
88
+
89
+ function getClientUrlParam($options = array()) {
90
+ if (self::presenceKey($options, 'paginated')) {
91
+ $current_url = urlencode($this->getCurrentURL());
92
+ return "&client_url={$current_url}";
93
+ } else {
94
+ return "";
95
+ }
96
+ }
97
+
98
+ function reviewCount($data) {
99
+ return $data->header("X-Reevoo-ReviewCount");
100
+ }
101
+
102
+ function offerCount($data) {
103
+ return $data->header("X-Reevoo-OfferCount");
104
+ }
105
+
106
+ function conversationCount($data) {
107
+ return $data->header("X-Reevoo-ConversationCount");
108
+ }
109
+
110
+ function bestPrice($data) {
111
+ return $data->header("X-Reevoo-BestPrice");
112
+ }
113
+
114
+ function getCurrentURL() {
115
+ return Mage::helper('core/url')->getCurrentUrl();
116
+ }
117
+
118
+ }
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>
8
+ <extends/>
9
+ <summary>This module provides functionality for Reevoo setup in your Magento store</summary>
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>
skin/adminhtml/default/default/reevoo.css ADDED
@@ -0,0 +1 @@
 
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;}