Clarion_ReviewReminder - Version 1.0.3

Version Notes

Third stable release 1.0.0

Download this release

Release Info

Developer Clarion Tech
Extension Clarion_ReviewReminder
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

app/code/community/Clarion/ReviewReminder/Helper/Data.php CHANGED
@@ -30,6 +30,14 @@ class Clarion_ReviewReminder_Helper_Data extends Mage_Core_Helper_Abstract
30
  */
31
  const XML_PATH_NUM_OF_DAYS_AFTER_ORDER = 'review_reminder/general_settings/number_of_days';
32
 
 
 
 
 
 
 
 
 
33
  /**
34
  * check is reminder data already added
35
  *
@@ -207,10 +215,7 @@ class Clarion_ReviewReminder_Helper_Data extends Mage_Core_Helper_Abstract
207
  $collection = Mage::getModel('review/review')->getProductCollection()
208
  ->addCustomerFilter($cutomerId)
209
  ->addEntityFilter($productId);
210
-
211
- //echo $collection->getSelect();
212
- //exit;
213
-
214
  if($collection->count() > 0){
215
  return true;
216
  }
@@ -241,5 +246,38 @@ class Clarion_ReviewReminder_Helper_Data extends Mage_Core_Helper_Abstract
241
  {
242
  return Mage::getStoreConfig(self::XML_PATH_EXTENSION_ENABLED, $store);
243
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  }
30
  */
31
  const XML_PATH_NUM_OF_DAYS_AFTER_ORDER = 'review_reminder/general_settings/number_of_days';
32
 
33
+
34
+ /**
35
+ * Config number of reminder mails sent
36
+ *
37
+ * @var string
38
+ */
39
+ const XML_PATH_REMINDER_MAILS_SENT = 'review_reminder/general_settings/number_of_reminder';
40
+
41
  /**
42
  * check is reminder data already added
43
  *
215
  $collection = Mage::getModel('review/review')->getProductCollection()
216
  ->addCustomerFilter($cutomerId)
217
  ->addEntityFilter($productId);
218
+
 
 
 
219
  if($collection->count() > 0){
220
  return true;
221
  }
246
  {
247
  return Mage::getStoreConfig(self::XML_PATH_EXTENSION_ENABLED, $store);
248
  }
249
+
250
+ /**
251
+ * check is match number of days after order placed with config number of days
252
+ *
253
+ * @param Clarion_ReviewReminder_Model_Reviewreminder $reminder
254
+ * @return boolean
255
+ */
256
+ public function isReminderMailSent ($reminder)
257
+ {
258
+ $storeId = Mage::app()->getStore()->getStoreId();
259
+ $configReminderMailSent = $this->getConfigReminderMailSent($storeId);
260
+ $reminderCount = $reminder->getReminderCount();
261
+
262
+ if($reminderCount < $configReminderMailSent){
263
+ return true;
264
+ } else {
265
+ return false;
266
+ }
267
+ }
268
+
269
+ /**
270
+ * Get config number of days before mail sent
271
+ *
272
+ * @param integer|string|Mage_Core_Model_Store $store
273
+ * @return int
274
+ */
275
+ public function getConfigReminderMailSent($store = null)
276
+ {
277
+ return Mage::getStoreConfig(self::XML_PATH_REMINDER_MAILS_SENT, $store);
278
+ }
279
+
280
+
281
+
282
 
283
  }
app/code/community/Clarion/ReviewReminder/Model/Observer.php CHANGED
@@ -142,6 +142,11 @@ class Clarion_ReviewReminder_Model_Observer
142
  continue;
143
  }
144
 
 
 
 
 
 
145
  //send reminder mail
146
  $isMailSent = Mage::Helper('clarion_reviewreminder/mail')->sendReminderEmail($reminder);
147
 
142
  continue;
143
  }
144
 
145
+ //Check config settings for Reminder mail allowed count
146
+ if(!Mage::Helper('clarion_reviewreminder')->isReminderMailSent($reminder)){
147
+ continue;
148
+ }
149
+
150
  //send reminder mail
151
  $isMailSent = Mage::Helper('clarion_reviewreminder/mail')->sendReminderEmail($reminder);
152
 
app/code/community/Clarion/ReviewReminder/etc/config.xml CHANGED
@@ -13,7 +13,7 @@
13
  <config>
14
  <modules>
15
  <Clarion_ReviewReminder>
16
- <version>1.0.2</version>
17
  </Clarion_ReviewReminder>
18
  </modules>
19
 
13
  <config>
14
  <modules>
15
  <Clarion_ReviewReminder>
16
+ <version>1.0.3</version>
17
  </Clarion_ReviewReminder>
18
  </modules>
19
 
app/code/community/Clarion/ReviewReminder/etc/system.xml CHANGED
@@ -91,6 +91,14 @@
91
  <show_in_website>1</show_in_website>
92
  <show_in_store>1</show_in_store>
93
  </sender_email_identity>
 
 
 
 
 
 
 
 
94
  </fields>
95
  </general_settings>
96
  </groups>
91
  <show_in_website>1</show_in_website>
92
  <show_in_store>1</show_in_store>
93
  </sender_email_identity>
94
+ <number_of_reminder translate="label">
95
+ <label>Number of reminder emails to be sent</label>
96
+ <frontend_type>text</frontend_type>
97
+ <sort_order>5</sort_order>
98
+ <show_in_default>1</show_in_default>
99
+ <show_in_website>1</show_in_website>
100
+ <show_in_store>1</show_in_store>
101
+ </number_of_reminder>
102
  </fields>
103
  </general_settings>
104
  </groups>
package.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Clarion_ReviewReminder</name>
4
- <version>1.0.2</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 extension helps to send product review reminder to the customers.</summary>
10
- <description>This extension helps to send product review reminder to the customers. When customer completes order then review reminder automatically added into the review reminder database. From admin side we can configure 'order status' and 'number of days from order placed'. Weekly cron job set to send automatic reminders to customers. Admin can also send reminders manually. Reminder mail contains add review link. We can add reminders manually for old orders also.</description>
11
- <notes>- review reminder 1.0.2 stable release&#xD;
12
- - Resolved issue of blank screen when clicked on button "Add Reminders Manually"</notes>
13
  <authors><author><name>Clarion Technologies</name><user>Clariontech</user><email>magento@clariontechnologies.co.in</email></author></authors>
14
- <date>2015-01-20</date>
15
- <time>13:09:23</time>
16
- <contents><target name="magecommunity"><dir name="Clarion"><dir name="ReviewReminder"><dir name="Block"><dir name="Adminhtml"><dir name="AddReminder"><file name="Grid.php" hash="71feb39c6fdf9847130403b12f69f093"/><dir name="Renderer"><file name="CustomerName.php" hash="6c4484ec0e5ee53672a1994fcb34bb8c"/></dir></dir><file name="Addreminder.php" hash="9d69ce6077c8f228684b12d37a571ad6"/><dir name="Closedreminder"><file name="Grid.php" hash="b81dce6a33c5cd3012d45cf3a0b433f2"/></dir><file name="Closedreminder.php" hash="4995a9814427adaa462b17fd257802e7"/><dir name="Reviewreminder"><file name="Grid.php" hash="3d8d8aaf650c56fccabce171b816d29a"/></dir><file name="Reviewreminder.php" hash="345cc57f28c42e87818eff2f95879e29"/></dir></dir><dir name="Helper"><file name="Data.php" hash="91366e4d46a5c23592153c64da3c47cf"/><file name="Mail.php" hash="1383797572d17297fb37e8e01777e4f6"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Days.php" hash="1747a8369d446cd900b8673899b39c37"/><file name="Status.php" hash="d8a315f129ba7a8f63dbd313e1b6696f"/></dir></dir></dir></dir><file name="Observer.php" hash="bd64d820e8250f1a5a06f35819a663e4"/><dir name="Resource"><dir name="Reviewreminder"><file name="Collection.php" hash="704ef230316bc157bd03770bff767426"/></dir><file name="Reviewreminder.php" hash="90400df40bb24ae9a0ae1a4db9ad616b"/><file name="Setup.php" hash="9434cd92f8c5504283cee2888edf8cd2"/></dir><file name="Reviewreminder.php" hash="7ad1d793677ced5f17e7797d144061f7"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ClosedremindersController.php" hash="15e74d1d4779d2ae2261c2ea970d1c16"/><file name="ManageremindersController.php" hash="871035628e05b4ad8a12b389c343e2c8"/></dir><file name="IndexController.php" hash="e5356325f4dfab3ee2f308b0bae58b13"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4e066f114efba76a86291b779ed74cc2"/><file name="config.xml" hash="a0f10109da357f3e8b38b934348b0af7"/><file name="system.xml" hash="c745bb839d57bf16d90a55fd7e1a897d"/></dir><dir name="sql"><dir name="clarion_reviewreminder_setup"><file name="install-1.0.0.php" hash="f1332154b1e3effa8ec58dc04d512342"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="clarion_reviewreminder.xml" hash="bdd2964837f4b985fe58d19e45dfb7f9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Clarion_ReviewReminder.xml" hash="5bea343bf64362ee71a50db74f76bb84"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="clarion_reviewreminder.html" hash="757607de56a203eea7642f249fc7b98a"/></dir></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Clarion_ReviewReminder</name>
4
+ <version>1.0.3</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>Send review reminder mails to customer</summary>
10
+ <description>Helps to remind customer to fill the product reviews for purchased product. Automatic reminders can be send on weekly basis. We can set maximum number of reminders to be sent.</description>
11
+ <notes>Third stable release 1.0.0</notes>
 
12
  <authors><author><name>Clarion Technologies</name><user>Clariontech</user><email>magento@clariontechnologies.co.in</email></author></authors>
13
+ <date>2016-01-05</date>
14
+ <time>09:18:29</time>
15
+ <contents><target name="magecommunity"><dir name="Clarion"><dir name="ReviewReminder"><dir name="Block"><dir name="Adminhtml"><dir name="AddReminder"><file name="Grid.php" hash="71feb39c6fdf9847130403b12f69f093"/><dir name="Renderer"><file name="CustomerName.php" hash="6c4484ec0e5ee53672a1994fcb34bb8c"/></dir></dir><file name="Addreminder.php" hash="9d69ce6077c8f228684b12d37a571ad6"/><dir name="Closedreminder"><file name="Grid.php" hash="b81dce6a33c5cd3012d45cf3a0b433f2"/></dir><file name="Closedreminder.php" hash="4995a9814427adaa462b17fd257802e7"/><dir name="Reviewreminder"><file name="Grid.php" hash="3d8d8aaf650c56fccabce171b816d29a"/></dir><file name="Reviewreminder.php" hash="345cc57f28c42e87818eff2f95879e29"/></dir></dir><dir name="Helper"><file name="Data.php" hash="34bf283d8401036dee3cdbd4e1624488"/><file name="Mail.php" hash="1383797572d17297fb37e8e01777e4f6"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Days.php" hash="1747a8369d446cd900b8673899b39c37"/><file name="Status.php" hash="d8a315f129ba7a8f63dbd313e1b6696f"/></dir></dir></dir></dir><file name="Observer.php" hash="7b59375c4e6e52ce46067fc653870969"/><dir name="Resource"><dir name="Reviewreminder"><file name="Collection.php" hash="704ef230316bc157bd03770bff767426"/></dir><file name="Reviewreminder.php" hash="90400df40bb24ae9a0ae1a4db9ad616b"/><file name="Setup.php" hash="9434cd92f8c5504283cee2888edf8cd2"/></dir><file name="Reviewreminder.php" hash="7ad1d793677ced5f17e7797d144061f7"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ClosedremindersController.php" hash="15e74d1d4779d2ae2261c2ea970d1c16"/><file name="ManageremindersController.php" hash="871035628e05b4ad8a12b389c343e2c8"/></dir><file name="IndexController.php" hash="e5356325f4dfab3ee2f308b0bae58b13"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4e066f114efba76a86291b779ed74cc2"/><file name="config.xml" hash="db4aedb3c9f3ec391dce89f5473d55e9"/><file name="system.xml" hash="f060e33f2fb6ddc4cbd44d62a67a95b1"/></dir><dir name="sql"><dir name="clarion_reviewreminder_setup"><file name="install-1.0.0.php" hash="f1332154b1e3effa8ec58dc04d512342"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Clarion_ReviewReminder.xml" hash="5bea343bf64362ee71a50db74f76bb84"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="clarion_reviewreminder.xml" hash="bdd2964837f4b985fe58d19e45dfb7f9"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="clarion_reviewreminder.html" hash="757607de56a203eea7642f249fc7b98a"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>