Version Notes
stable release
Download this release
Release Info
Developer | Jurij |
Extension | ET_Reviewnotify |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.2.0
- app/code/community/ET/Reviewnotify/Block/Adminhtml/Support.php +59 -62
- app/code/community/ET/Reviewnotify/Block/Review/Helper.php +43 -0
- app/code/community/ET/Reviewnotify/Block/Review/Product/View.php +44 -0
- app/code/community/ET/Reviewnotify/Block/Review/Product/View/List.php +45 -0
- app/code/community/ET/Reviewnotify/Helper/Data.php +67 -1
- app/code/community/ET/Reviewnotify/Model/Observer.php +22 -0
- app/code/community/ET/Reviewnotify/Model/ReviewStatuses.php +42 -0
- app/code/community/ET/Reviewnotify/etc/config.xml +8 -1
- app/code/community/ET/Reviewnotify/etc/system.xml +37 -2
- app/locale/ru_RU/ET_Reviewnotify.csv +6 -0
- js/et_reviewnotify/reviewnotify.js +1 -1
- package.xml +6 -6
app/code/community/ET/Reviewnotify/Block/Adminhtml/Support.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
*
|
13 |
* @category ET
|
14 |
* @package ET_Reviewnotify
|
15 |
-
* @copyright Copyright (c)
|
16 |
* @contacts support@etwebsolutions.com
|
17 |
* @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
|
18 |
*/
|
@@ -35,15 +35,14 @@ class ET_Reviewnotify_Block_Adminhtml_Support
|
|
35 |
protected $_platformCode = self::PLATFORM_UNKNOWN;
|
36 |
|
37 |
protected $_platformNames = array(
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
);
|
42 |
|
43 |
-
|
44 |
/**
|
45 |
* Support tab
|
46 |
-
* version 2.2.
|
47 |
*
|
48 |
* @inheritdoc
|
49 |
*/
|
@@ -72,62 +71,59 @@ class ET_Reviewnotify_Block_Adminhtml_Support
|
|
72 |
$moduleVersion . '/' .
|
73 |
'logo.png';
|
74 |
|
75 |
-
$html =
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
</tr>
|
129 |
-
</table>';
|
130 |
-
|
131 |
|
132 |
return $html;
|
133 |
}
|
@@ -181,4 +177,5 @@ class ET_Reviewnotify_Block_Adminhtml_Support
|
|
181 |
|
182 |
return $this->_platformCode;
|
183 |
}
|
|
|
184 |
}
|
12 |
*
|
13 |
* @category ET
|
14 |
* @package ET_Reviewnotify
|
15 |
+
* @copyright Copyright (c) 2017 ET Web Solutions (http://etwebsolutions.com)
|
16 |
* @contacts support@etwebsolutions.com
|
17 |
* @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
|
18 |
*/
|
35 |
protected $_platformCode = self::PLATFORM_UNKNOWN;
|
36 |
|
37 |
protected $_platformNames = array(
|
38 |
+
'Community' => self::PLATFORM_CE, //const Mage::EDITION_COMMUNITY does not exist in Magento < 1.7
|
39 |
+
'Professional' => self::PLATFORM_PE, //const Mage::EDITION_PROFESSIONAL does not exist in Magento < 1.7
|
40 |
+
'Enterprise' => self::PLATFORM_EE //const Mage::EDITION_ENTERPRISE does not exist in Magento < 1.7
|
41 |
);
|
42 |
|
|
|
43 |
/**
|
44 |
* Support tab
|
45 |
+
* version 2.2.4
|
46 |
*
|
47 |
* @inheritdoc
|
48 |
*/
|
71 |
$moduleVersion . '/' .
|
72 |
'logo.png';
|
73 |
|
74 |
+
$html = <<<HTML
|
75 |
+
<style>
|
76 |
+
.line {border-top: 1px solid #c6c6c6; padding-top: 10px;}
|
77 |
+
.developer-label {color: #000000; font-weight:bold; width: 150px;}
|
78 |
+
.developer-text { padding-bottom: 15px;}
|
79 |
+
.developer {width: 600px; }
|
80 |
+
</style>
|
81 |
+
|
82 |
+
<table cellspacing="0" cellpading="0" class="developer" id="{$element->getHtmlId()}">
|
83 |
+
<tr>
|
84 |
+
<td class="developer-label">{$helper->__('Extension:')}</td>
|
85 |
+
<td class="developer-text">{$helper->__('<strong>%s</strong> (version %s)', $moduleName, $moduleVersion)}</td>
|
86 |
+
</tr>
|
87 |
+
|
88 |
+
<tr>
|
89 |
+
<td class="developer-label">{$helper->__('License:')}</td>
|
90 |
+
<td class="developer-text">
|
91 |
+
{$helper->__('<a href="%s" target="_blank">%s</a>', $moduleLicenseLink, $moduleLicense)}
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
<tr>
|
95 |
+
<td class="developer-label">{$helper->__('Short Description:')}</td>
|
96 |
+
<td class="developer-text">{$moduleShortDescription}</td>
|
97 |
+
</tr>
|
98 |
+
<tr>
|
99 |
+
<td class="developer-label">{$helper->__('Documentation:')}</td>
|
100 |
+
<td class="developer-text">{$helper->__(
|
101 |
+
'You can see description of extension features and answers to the ' .
|
102 |
+
'frequently asked questions on <a href="%s" target="_blank">our website</a>.',
|
103 |
+
$moduleLink)}
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<td class="developer-label line">{$helper->__('Support:')}</td>
|
108 |
+
<td class="developer-text line">{$helper->__(
|
109 |
+
'Extension support is available through <a href="%s" target="_blank">issue tracking system' .
|
110 |
+
'</a>.<br>You can see information freely, but you will have to sign up to open a ticket.<br>' .
|
111 |
+
'<br>Please, report all bugs and feature requests that are related to this extension.<br>' .
|
112 |
+
'<br>If by some reason you can not submit a question, bug report or feature request to our ' .
|
113 |
+
'ticket system, you can write us an email - support@etwebsolutions.com.',
|
114 |
+
$moduleSupportLink)}
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<td class="developer-label line"><img src="{$logoLink}" width="100px" height="34px"> </td>
|
119 |
+
<td class="developer-text line">{$helper->__(
|
120 |
+
'You can hire our team to customize the extension. E-mail us on sales@etwebsolutions.com.<br>' .
|
121 |
+
'<br>You can see a list of provided services on <a href="%s" target="_blank">our website</a>.',
|
122 |
+
$servicesLink)}
|
123 |
+
</td>
|
124 |
+
</tr>
|
125 |
+
</table>
|
126 |
+
HTML;
|
|
|
|
|
|
|
127 |
|
128 |
return $html;
|
129 |
}
|
177 |
|
178 |
return $this->_platformCode;
|
179 |
}
|
180 |
+
|
181 |
}
|
app/code/community/ET/Reviewnotify/Block/Review/Helper.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTICE OF LICENSE
|
4 |
+
*
|
5 |
+
* You may not sell, sub-license, rent or lease
|
6 |
+
* any portion of the Software or Documentation to anyone.
|
7 |
+
*
|
8 |
+
* DISCLAIMER
|
9 |
+
*
|
10 |
+
* Do not edit or add to this file if you wish to upgrade to newer
|
11 |
+
* versions in the future.
|
12 |
+
*
|
13 |
+
* @category ET
|
14 |
+
* @package ET_Reviewnotify
|
15 |
+
* @copyright Copyright (c) 2016 ET Web Solutions (http://etwebsolutions.com)
|
16 |
+
* @contacts support@etwebsolutions.com
|
17 |
+
* @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
|
18 |
+
*/
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Class ET_Reviewnotify_Block_Review_Helper
|
22 |
+
*/
|
23 |
+
class ET_Reviewnotify_Block_Review_Helper extends Mage_Review_Block_Helper
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Set correct count of reviews
|
27 |
+
*
|
28 |
+
* Rewrite: Mage_Review_Block_Helper
|
29 |
+
* @return int
|
30 |
+
*/
|
31 |
+
public function getReviewsCount()
|
32 |
+
{
|
33 |
+
/** @var ET_Reviewnotify_Helper_Data $helper */
|
34 |
+
$helper = Mage::helper('reviewnotify');
|
35 |
+
|
36 |
+
$productId = $this->getProduct()->getId();
|
37 |
+
$collection = $helper->getReviewsCollection($productId);
|
38 |
+
$collection = $helper->addReviewsVisibilityForAuthor($collection);
|
39 |
+
|
40 |
+
return $collection->count();
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
app/code/community/ET/Reviewnotify/Block/Review/Product/View.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTICE OF LICENSE
|
4 |
+
*
|
5 |
+
* You may not sell, sub-license, rent or lease
|
6 |
+
* any portion of the Software or Documentation to anyone.
|
7 |
+
*
|
8 |
+
* DISCLAIMER
|
9 |
+
*
|
10 |
+
* Do not edit or add to this file if you wish to upgrade to newer
|
11 |
+
* versions in the future.
|
12 |
+
*
|
13 |
+
* @category ET
|
14 |
+
* @package ET_Reviewnotify
|
15 |
+
* @copyright Copyright (c) 2016 ET Web Solutions (http://etwebsolutions.com)
|
16 |
+
* @contacts support@etwebsolutions.com
|
17 |
+
* @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
|
18 |
+
*/
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Class ET_Reviewnotify_Block_Review_Product_View
|
22 |
+
*/
|
23 |
+
class ET_Reviewnotify_Block_Review_Product_View extends Mage_Review_Block_Product_View
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Create reviews collection
|
27 |
+
*
|
28 |
+
* Rewrite Mage_Review_Block_Product_View
|
29 |
+
* @return Mage_Review_Model_Resource_Review_Collection
|
30 |
+
*/
|
31 |
+
public function getReviewsCollection()
|
32 |
+
{
|
33 |
+
/** @var ET_Reviewnotify_Helper_Data $helper */
|
34 |
+
$helper = Mage::helper('reviewnotify');
|
35 |
+
|
36 |
+
if (null === $this->_reviewsCollection) {
|
37 |
+
$productId = $this->getProduct()->getId();
|
38 |
+
$this->_reviewsCollection = $helper->getReviewsCollection($productId);
|
39 |
+
$this->_reviewsCollection = $helper->addReviewsVisibilityForAuthor($this->_reviewsCollection);
|
40 |
+
}
|
41 |
+
|
42 |
+
return $this->_reviewsCollection;
|
43 |
+
}
|
44 |
+
}
|
app/code/community/ET/Reviewnotify/Block/Review/Product/View/List.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTICE OF LICENSE
|
4 |
+
*
|
5 |
+
* You may not sell, sub-license, rent or lease
|
6 |
+
* any portion of the Software or Documentation to anyone.
|
7 |
+
*
|
8 |
+
* DISCLAIMER
|
9 |
+
*
|
10 |
+
* Do not edit or add to this file if you wish to upgrade to newer
|
11 |
+
* versions in the future.
|
12 |
+
*
|
13 |
+
* @category ET
|
14 |
+
* @package ET_Reviewnotify
|
15 |
+
* @copyright Copyright (c) 2016 ET Web Solutions (http://etwebsolutions.com)
|
16 |
+
* @contacts support@etwebsolutions.com
|
17 |
+
* @license http://shop.etwebsolutions.com/etws-license-commercial-v1/ ETWS Commercial License (ECL1)
|
18 |
+
*/
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Class ET_Reviewnotify_Block_Review_Product_View_List
|
22 |
+
*/
|
23 |
+
class ET_Reviewnotify_Block_Review_Product_View_List extends Mage_Review_Block_Product_View_List
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Create reviews collection
|
27 |
+
*
|
28 |
+
* Rewrite Mage_Review_Block_Product_View_List
|
29 |
+
* @return Mage_Review_Model_Resource_Review_Collection
|
30 |
+
*/
|
31 |
+
public function getReviewsCollection()
|
32 |
+
{
|
33 |
+
/** @var ET_Reviewnotify_Helper_Data $helper */
|
34 |
+
$helper = Mage::helper('reviewnotify');
|
35 |
+
|
36 |
+
if (null === $this->_reviewsCollection) {
|
37 |
+
$productId = $this->getProduct()->getId();
|
38 |
+
$this->_reviewsCollection = $helper->getReviewsCollection($productId);
|
39 |
+
$this->_reviewsCollection = $helper->addReviewsVisibilityForAuthor($this->_reviewsCollection);
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
return $this->_reviewsCollection;
|
44 |
+
}
|
45 |
+
}
|
app/code/community/ET/Reviewnotify/Helper/Data.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
*
|
13 |
* @category ET
|
14 |
* @package ET_Reviewnotify
|
15 |
-
* @copyright Copyright (c)
|
16 |
* @contacts support@etwebsolutions.com
|
17 |
* @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
|
18 |
*/
|
@@ -22,4 +22,70 @@
|
|
22 |
*/
|
23 |
class ET_Reviewnotify_Helper_Data extends Mage_Core_Helper_Abstract
|
24 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
12 |
*
|
13 |
* @category ET
|
14 |
* @package ET_Reviewnotify
|
15 |
+
* @copyright Copyright (c) 2016 ET Web Solutions (http://etwebsolutions.com)
|
16 |
* @contacts support@etwebsolutions.com
|
17 |
* @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
|
18 |
*/
|
22 |
*/
|
23 |
class ET_Reviewnotify_Helper_Data extends Mage_Core_Helper_Abstract
|
24 |
{
|
25 |
+
/**
|
26 |
+
* Generate reviews collection
|
27 |
+
*
|
28 |
+
* @param int $productId
|
29 |
+
* @return mixed
|
30 |
+
*/
|
31 |
+
public function getReviewsCollection($productId)
|
32 |
+
{
|
33 |
+
$collection = Mage::getModel('review/review')->getCollection()
|
34 |
+
->addStoreFilter(Mage::app()->getStore()->getId())
|
35 |
+
->addEntityFilter('product', $productId)
|
36 |
+
->setDateOrder();
|
37 |
+
return $collection;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Change review collection for frontend
|
42 |
+
* Add additional review statuses, depending on extension settings
|
43 |
+
* Author can see Pending and Not Approved reviews, if configured.
|
44 |
+
*
|
45 |
+
* @param Mage_Review_Model_Resource_Review_Collection $collection
|
46 |
+
* @return Mage_Review_Model_Resource_Review_Collection $collection
|
47 |
+
*/
|
48 |
+
public function addReviewsVisibilityForAuthor($collection)
|
49 |
+
{
|
50 |
+
$enable = $this->isEnableReviewVisibilityForAuthor();
|
51 |
+
$customerId = Mage::getModel('customer/session')->getData('id');
|
52 |
+
|
53 |
+
if (($enable) && (null !== $customerId)) {
|
54 |
+
$statuses = $this->getReviewVisibilityForAuthor();
|
55 |
+
$sql = '((status_id IN (' . implode(', ', $statuses) . ')) AND (customer_id = '
|
56 |
+
. $customerId . ')) OR (status_id = ' . Mage_Review_Model_Review::STATUS_APPROVED . ')';
|
57 |
+
|
58 |
+
$collection->getSelect()->where($sql);
|
59 |
+
} else {
|
60 |
+
$collection->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED);
|
61 |
+
}
|
62 |
+
|
63 |
+
return $collection;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Is Function review visibility for author enabled or not
|
68 |
+
*
|
69 |
+
* @return bool
|
70 |
+
*/
|
71 |
+
public function isEnableReviewVisibilityForAuthor()
|
72 |
+
{
|
73 |
+
return (bool)Mage::getStoreConfig('catalog/review/is_enabled_review_visibility_for_author');
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Get review statuses that should be visible for author
|
78 |
+
* by default only approved
|
79 |
+
*
|
80 |
+
* @return array
|
81 |
+
*/
|
82 |
+
public function getReviewVisibilityForAuthor()
|
83 |
+
{
|
84 |
+
|
85 |
+
$statuses = Mage::getStoreConfig('catalog/review/review_visibility_for_author');
|
86 |
+
$statuses = explode(',', $statuses);
|
87 |
+
$statuses[] = (string)Mage_Review_Model_Review::STATUS_APPROVED;
|
88 |
+
|
89 |
+
return $statuses;
|
90 |
+
}
|
91 |
}
|
app/code/community/ET/Reviewnotify/Model/Observer.php
CHANGED
@@ -112,4 +112,26 @@ class ET_Reviewnotify_Model_Observer
|
|
112 |
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
112 |
|
113 |
}
|
114 |
|
115 |
+
/**
|
116 |
+
* Dynamic rewrite
|
117 |
+
*
|
118 |
+
* Event: controller_front_init_before
|
119 |
+
* @param Varien_Event_Observer $observer
|
120 |
+
*/
|
121 |
+
public function rewriteReviewProductBlockViewList(Varien_Event_Observer $observer)
|
122 |
+
{
|
123 |
+
/** @var ET_Reviewnotify_Helper_Data $helper */
|
124 |
+
$helper = Mage::helper('reviewnotify');
|
125 |
+
|
126 |
+
$isEnable = $helper->isEnableReviewVisibilityForAuthor();
|
127 |
+
|
128 |
+
if ($isEnable) {
|
129 |
+
Mage::getConfig()->setNode('global/blocks/review/rewrite/product_view',
|
130 |
+
'ET_Reviewnotify_Block_Review_Product_View');
|
131 |
+
Mage::getConfig()->setNode('global/blocks/review/rewrite/product_view_list',
|
132 |
+
'ET_Reviewnotify_Block_Review_Product_View_List');
|
133 |
+
Mage::getConfig()->setNode('global/blocks/review/rewrite/helper',
|
134 |
+
'ET_Reviewnotify_Block_Review_Helper');
|
135 |
+
}
|
136 |
+
}
|
137 |
}
|
app/code/community/ET/Reviewnotify/Model/ReviewStatuses.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTICE OF LICENSE
|
4 |
+
*
|
5 |
+
* You may not sell, sub-license, rent or lease
|
6 |
+
* any portion of the Software or Documentation to anyone.
|
7 |
+
*
|
8 |
+
* DISCLAIMER
|
9 |
+
*
|
10 |
+
* Do not edit or add to this file if you wish to upgrade to newer
|
11 |
+
* versions in the future.
|
12 |
+
*
|
13 |
+
* @category ET
|
14 |
+
* @package ET_Reviewnotify
|
15 |
+
* @copyright Copyright (c) 2016 ET Web Solutions (http://etwebsolutions.com)
|
16 |
+
* @contacts support@etwebsolutions.com
|
17 |
+
* @license http://shop.etwebsolutions.com/etws-license-commercial-v1/ ETWS Commercial License (ECL1)
|
18 |
+
*/
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Class ET_Reviewnotify_Model_ReviewStatuses
|
22 |
+
*/
|
23 |
+
class ET_Reviewnotify_Model_ReviewStatuses extends Mage_Review_Model_Resource_Review_Status_Collection
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Options List
|
27 |
+
*/
|
28 |
+
public function toOptionArray()
|
29 |
+
{
|
30 |
+
$statuses = parent::toOptionArray();
|
31 |
+
|
32 |
+
$statusList = array();
|
33 |
+
|
34 |
+
foreach ($statuses as $status) {
|
35 |
+
if ($status['value'] != Mage_Review_Model_Review::STATUS_APPROVED) {
|
36 |
+
$statusList[] = array('value' => $status['value'], 'label' => $status['label']);
|
37 |
+
}
|
38 |
+
};
|
39 |
+
|
40 |
+
return $statusList;
|
41 |
+
}
|
42 |
+
}
|
app/code/community/ET/Reviewnotify/etc/config.xml
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
<modules>
|
24 |
<ET_Reviewnotify>
|
25 |
<name>ET Review Notify</name>
|
26 |
-
<version>1.
|
27 |
<descr>
|
28 |
<ru_RU><![CDATA[Модуль добавляет функцию оповещения владельца сайта о появлении новых отзывов и затрудняет спам-ботам автоматическое размещение отзывов.]]>
|
29 |
</ru_RU>
|
@@ -64,6 +64,11 @@
|
|
64 |
<class>reviewnotify/observer</class>
|
65 |
<method>rewriteReviewProductController</method>
|
66 |
</et_reviewnotify_controller_rewrite>
|
|
|
|
|
|
|
|
|
|
|
67 |
</observers>
|
68 |
</controller_front_init_before>
|
69 |
</events>
|
@@ -103,6 +108,8 @@
|
|
103 |
<need_send>0</need_send>
|
104 |
<need_notify>1</need_notify>
|
105 |
<antispam>0</antispam>
|
|
|
|
|
106 |
</review>
|
107 |
</catalog>
|
108 |
</default>
|
23 |
<modules>
|
24 |
<ET_Reviewnotify>
|
25 |
<name>ET Review Notify</name>
|
26 |
+
<version>1.2.0</version>
|
27 |
<descr>
|
28 |
<ru_RU><![CDATA[Модуль добавляет функцию оповещения владельца сайта о появлении новых отзывов и затрудняет спам-ботам автоматическое размещение отзывов.]]>
|
29 |
</ru_RU>
|
64 |
<class>reviewnotify/observer</class>
|
65 |
<method>rewriteReviewProductController</method>
|
66 |
</et_reviewnotify_controller_rewrite>
|
67 |
+
<et_reviewnotify_block_rewrite>
|
68 |
+
<type>model</type>
|
69 |
+
<class>reviewnotify/observer</class>
|
70 |
+
<method>rewriteReviewProductBlockViewList</method>
|
71 |
+
</et_reviewnotify_block_rewrite>
|
72 |
</observers>
|
73 |
</controller_front_init_before>
|
74 |
</events>
|
108 |
<need_send>0</need_send>
|
109 |
<need_notify>1</need_notify>
|
110 |
<antispam>0</antispam>
|
111 |
+
<is_enabled_review_visibility_for_author>0</is_enabled_review_visibility_for_author>
|
112 |
+
<review_visibility_for_author>2</review_visibility_for_author>
|
113 |
</review>
|
114 |
</catalog>
|
115 |
</default>
|
app/code/community/ET/Reviewnotify/etc/system.xml
CHANGED
@@ -81,14 +81,15 @@
|
|
81 |
<groups>
|
82 |
<review translate="label" module="reviewnotify">
|
83 |
<fields>
|
84 |
-
<
|
85 |
<label>ET Review Notify options</label>
|
86 |
<frontend_model>reviewnotify/adminhtml_system_config_form_field_heading</frontend_model>
|
87 |
<sort_order>190</sort_order>
|
88 |
<show_in_default>1</show_in_default>
|
89 |
<show_in_website>1</show_in_website>
|
90 |
<show_in_store>1</show_in_store>
|
91 |
-
</
|
|
|
92 |
<antispam translate="label comment">
|
93 |
<label>Use Antispam</label>
|
94 |
<comment>Make review posting harder for automatic spammers</comment>
|
@@ -160,6 +161,40 @@
|
|
160 |
<show_in_website>1</show_in_website>
|
161 |
<show_in_store>1</show_in_store>
|
162 |
</linktoinfo>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
</fields>
|
164 |
</review>
|
165 |
</groups>
|
81 |
<groups>
|
82 |
<review translate="label" module="reviewnotify">
|
83 |
<fields>
|
84 |
+
<heading_reviewnotify_general translate="label">
|
85 |
<label>ET Review Notify options</label>
|
86 |
<frontend_model>reviewnotify/adminhtml_system_config_form_field_heading</frontend_model>
|
87 |
<sort_order>190</sort_order>
|
88 |
<show_in_default>1</show_in_default>
|
89 |
<show_in_website>1</show_in_website>
|
90 |
<show_in_store>1</show_in_store>
|
91 |
+
</heading_reviewnotify_general>
|
92 |
+
|
93 |
<antispam translate="label comment">
|
94 |
<label>Use Antispam</label>
|
95 |
<comment>Make review posting harder for automatic spammers</comment>
|
161 |
<show_in_website>1</show_in_website>
|
162 |
<show_in_store>1</show_in_store>
|
163 |
</linktoinfo>
|
164 |
+
|
165 |
+
<heading_reviewnotify_review_visibility_for_author translate="label">
|
166 |
+
<label>Review visibility for author</label>
|
167 |
+
<frontend_model>reviewnotify/adminhtml_system_config_form_field_heading</frontend_model>
|
168 |
+
<sort_order>1100</sort_order>
|
169 |
+
<show_in_default>1</show_in_default>
|
170 |
+
<show_in_website>1</show_in_website>
|
171 |
+
<show_in_store>1</show_in_store>
|
172 |
+
</heading_reviewnotify_review_visibility_for_author>
|
173 |
+
|
174 |
+
<is_enabled_review_visibility_for_author>
|
175 |
+
<label>Enable visibility management</label>
|
176 |
+
<comment><![CDATA[By default, reviews with statuses "Pending" and "Not Approved" are not visible to any in frontend. With function "Review visibility for author" can be shown to the author reviews his reviews with these statuses. Other visitors will always be available only approved reviews.]]></comment>
|
177 |
+
<frontend_type>select</frontend_type>
|
178 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
179 |
+
<sort_order>1200</sort_order>
|
180 |
+
<show_in_default>1</show_in_default>
|
181 |
+
<show_in_website>1</show_in_website>
|
182 |
+
<show_in_store>1</show_in_store>
|
183 |
+
</is_enabled_review_visibility_for_author>
|
184 |
+
|
185 |
+
<review_visibility_for_author>
|
186 |
+
<label>Configure visibility for author</label>
|
187 |
+
<comment><![CDATA[<b>Pending</b> - except for approved reviews, the user will see <b>his own reviews</b> with "Pending" status.<br/><b>Not Approved</b> - except for approved reviews, the user will see <b>his own reviews</b> with "Not Approved" status.]]></comment>
|
188 |
+
<frontend_type>multiselect</frontend_type>
|
189 |
+
<source_model>reviewnotify/reviewStatuses</source_model>
|
190 |
+
<sort_order>1300</sort_order>
|
191 |
+
<show_in_default>1</show_in_default>
|
192 |
+
<show_in_website>1</show_in_website>
|
193 |
+
<show_in_store>1</show_in_store>
|
194 |
+
<depends>
|
195 |
+
<is_enabled_review_visibility_for_author>1</is_enabled_review_visibility_for_author>
|
196 |
+
</depends>
|
197 |
+
</review_visibility_for_author>
|
198 |
</fields>
|
199 |
</review>
|
200 |
</groups>
|
app/locale/ru_RU/ET_Reviewnotify.csv
CHANGED
@@ -31,3 +31,9 @@
|
|
31 |
"You can see description of extension features and answers to the frequently asked questions on <a href=""%s"" target=""_blank"">our website</a>.","Описание возможностей модуля и ответы на часто задаваемые вопросы смотрите на <a href=""%s"" target=""_blank"">нашем сайте</a>."
|
32 |
"You can hire our team to customize the extension. E-mail us on sales@etwebsolutions.com.<br><br>You can see a list of provided services on <a href=""%s"" target=""_blank"">our website</a>.","Вы можете нанять нашу команду для любых работ по модификации модуля. Пишите на адрес sales@etwebsolutions.com.<br><br>Со списком предоставляемых нами услуг вы можете ознакомиться <a href=""%s"" target=""_blank"">на нашем сайте</a>."
|
33 |
"Extension support is available through <a href=""%s"" target=""_blank"">issue tracking system</a>.<br>You can see information freely, but you will have to sign up to open a ticket.<br><br>Please, report all bugs and feature requests that are related to this extension.<br><br>If by some reason you can not submit a question, bug report or feature request to our ticket system, you can write us an email - support@etwebsolutions.com.","Поддержка модуля осуществляется через <a href=""%s"" target=""_blank"">систему отслеживания заданий</a>.<br>Для создания задачи будет необходимо зарегистрироваться. Для просмотра информации регистрация не требуется.<br><br>Пожалуйста, сообщайте нам о найденных ошибках и о своих пожеланиях в рамках этого модуля.<br><br>Если по каким-либо причинам вы не можете размеситить вопрос/сообщение об ошибке/пожелание в списке задач, то можете написать нам по адресу support@etwebsolutions.com."
|
|
|
|
|
|
|
|
|
|
|
|
31 |
"You can see description of extension features and answers to the frequently asked questions on <a href=""%s"" target=""_blank"">our website</a>.","Описание возможностей модуля и ответы на часто задаваемые вопросы смотрите на <a href=""%s"" target=""_blank"">нашем сайте</a>."
|
32 |
"You can hire our team to customize the extension. E-mail us on sales@etwebsolutions.com.<br><br>You can see a list of provided services on <a href=""%s"" target=""_blank"">our website</a>.","Вы можете нанять нашу команду для любых работ по модификации модуля. Пишите на адрес sales@etwebsolutions.com.<br><br>Со списком предоставляемых нами услуг вы можете ознакомиться <a href=""%s"" target=""_blank"">на нашем сайте</a>."
|
33 |
"Extension support is available through <a href=""%s"" target=""_blank"">issue tracking system</a>.<br>You can see information freely, but you will have to sign up to open a ticket.<br><br>Please, report all bugs and feature requests that are related to this extension.<br><br>If by some reason you can not submit a question, bug report or feature request to our ticket system, you can write us an email - support@etwebsolutions.com.","Поддержка модуля осуществляется через <a href=""%s"" target=""_blank"">систему отслеживания заданий</a>.<br>Для создания задачи будет необходимо зарегистрироваться. Для просмотра информации регистрация не требуется.<br><br>Пожалуйста, сообщайте нам о найденных ошибках и о своих пожеланиях в рамках этого модуля.<br><br>Если по каким-либо причинам вы не можете размеситить вопрос/сообщение об ошибке/пожелание в списке задач, то можете написать нам по адресу support@etwebsolutions.com."
|
34 |
+
|
35 |
+
"Review visibility for author","Видимость отзывов для автора"
|
36 |
+
"Enable visibility management","Включить управление видимостью"
|
37 |
+
"Configure visibility for author","Настроить видимость для автора"
|
38 |
+
"By default, reviews with statuses ""Pending"" and ""Not Approved"" are not visible to any in frontend. With function ""Review visibility for author"" can be shown to the author reviews his reviews with these statuses. Other visitors will always be available only approved reviews.","По умолчанию, отзывы со статусами ""В очереди"" и ""Отклонён"" не показываются никому в пользовательской части сайта. С помощью функции ""Видимость отзывов для автора"" можно показывать автору отзыва, его отзывы с этими статусами. Другим посетителям всегда будут доступны только одобренные отзывы."
|
39 |
+
"<b>Pending</b> - except for approved reviews, the user will see <b>his own reviews</b> with ""Pending"" status.<br/><b>Not Approved</b> - except for approved reviews, the user will see <b>his own reviews</b> with ""Not Approved"" status.","<b>В очереди</b> - кроме одобренных отзывов, пользователю будут показаны <b>написанные им отзывы</b>, имеющие статус ""В очереди"".<br/><b>Отклонён</b> - кроме одобренных отзывов, пользователю будут показаны <b>написанные им отзывы</b>, имеющие статус ""Отклонён""."
|
js/et_reviewnotify/reviewnotify.js
CHANGED
@@ -35,4 +35,4 @@ function postReviewRestoreData(sequence)
|
|
35 |
$("review-form").writeAttribute("target","_self");
|
36 |
$("review-form").writeAttribute("action",$("review-form").readAttribute("oldurl"));
|
37 |
$("review-form").submit();
|
38 |
-
}
|
35 |
$("review-form").writeAttribute("target","_self");
|
36 |
$("review-form").writeAttribute("action",$("review-form").readAttribute("oldurl"));
|
37 |
$("review-form").submit();
|
38 |
+
};
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ET_Reviewnotify</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://shop.etwebsolutions.com/eng/etws-license-free-v1">ETWS Free License (EFL1)</license>
|
7 |
<channel>community</channel>
|
@@ -9,10 +9,10 @@
|
|
9 |
<summary>Extension notifies store owner about new reviews and complicates automatic review posting for spam bots</summary>
|
10 |
<description>Reviewnotify not only notifies store owner by email about new reviews, but also reminds him about pending review until someone will change their status (in status bar - under main menu in admin panel). As a bonus, we offer a feature that will complicate writing reviews for bots and spammers.</description>
|
11 |
<notes>stable release</notes>
|
12 |
-
<authors><author><name>Jurij</name><user>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="ET"><dir name="Reviewnotify"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Heading.php" hash="94bd440631e9fb1663c6d5f99ce3e157"/><file name="Linktoinfo.php" hash="24df091854eb25fa1945d5d6ef6f0859"/><file name="Linktooptions.php" hash="e7afaf5ff2a869bc79ab02e15b0da89a"/></dir></dir></dir></dir><file name="
|
16 |
<compatible/>
|
17 |
-
<dependencies
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ET_Reviewnotify</name>
|
4 |
+
<version>1.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://shop.etwebsolutions.com/eng/etws-license-free-v1">ETWS Free License (EFL1)</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>Extension notifies store owner about new reviews and complicates automatic review posting for spam bots</summary>
|
10 |
<description>Reviewnotify not only notifies store owner by email about new reviews, but also reminds him about pending review until someone will change their status (in status bar - under main menu in admin panel). As a bonus, we offer a feature that will complicate writing reviews for bots and spammers.</description>
|
11 |
<notes>stable release</notes>
|
12 |
+
<authors><author><name>Jurij</name><user>niro</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>zlojd</user><email>support@etwebsolutions.com</email></author></authors>
|
13 |
+
<date>2017-02-10</date>
|
14 |
+
<time>13:05:06</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="ET"><dir name="Reviewnotify"><dir name="Block"><dir name="Adminhtml"><file name="Support.php" hash="3f374061fa18883c6907052fe902e48f"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Heading.php" hash="94bd440631e9fb1663c6d5f99ce3e157"/><file name="Linktoinfo.php" hash="24df091854eb25fa1945d5d6ef6f0859"/><file name="Linktooptions.php" hash="e7afaf5ff2a869bc79ab02e15b0da89a"/></dir></dir></dir></dir></dir><dir name="Review"><file name="Helper.php" hash="2740ac2f3a968873a8e5b3451ebe0111"/><dir name="Product"><dir name="View"><file name="List.php" hash="35d775b117d7df22c664a7a4f3fa7b66"/></dir><file name="View.php" hash="31d51e410d9a4758bf7bb39605321269"/></dir></dir><file name="Toolbar.php" hash="d45d4b620d4082f0e24bb80607077a66"/></dir><dir name="Helper"><file name="Data.php" hash="acf72c1e2da3abaff700fc86250fe998"/></dir><dir name="Model"><file name="Observer.php" hash="e805a6421c43990679a3bb9d450b1ae5"/><file name="Review.php" hash="ea6df8dce82a17a62f1e5abd74130c2d"/><file name="ReviewStatuses.php" hash="7c315290cda09843d4fc639ecdc53386"/></dir><dir name="controllers"><file name="ProductController.php" hash="0ac5a508beec1b1e4b5d4ada392463d6"/></dir><dir name="etc"><file name="config.xml" hash="7f20db7f88db501ea4fe4d66e0cd0fb1"/><file name="system.xml" hash="5fca89617f8904e41b4869e006dee6b6"/></dir></dir></dir></target><target name="magelocale"><dir name="ru_RU"><file name="ET_Reviewnotify.csv" hash="e4a052a5e06e7355d9e702f937933e8b"/><dir name="template"><dir name="email"><file name="et_reviewnotify.html" hash="dc715adcb9e2d271d206c246af29920d"/></dir></dir></dir><dir name="en_US"><file name="ET_Reviewnotify.csv" hash="fc0b8c0c8a2472410ea86e45253bd162"/><dir name="template"><dir name="email"><file name="et_reviewnotify.html" hash="c3d8b0a804d721cb17271448ef7cf56b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ET_Reviewnotify.xml" hash="47e1448c262ce7a004b23db1e1528cd6"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="reviewnotify"><file name="toolbar.phtml" hash="720b5d875c17cb27bb62822787b5e548"/></dir></dir><dir name="layout"><file name="et_reviewnotify.xml" hash="3aec74e6a34932a3601e83cb0bdf67d1"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="et_reviewnotify.xml" hash="0d561861b19836a6dd5b3f4ea9f30cfc"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="et_reviewnotify"><file name="reviewnotify.js" hash="f948567cadf2c0700d447a351113584a"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.0.0</min><max>7.9.9</max></php></required></dependencies>
|
18 |
</package>
|