Version Notes
Fix of review emails sending
Download this release
Release Info
Developer | Henning Frettem |
Extension | lipscore |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.3.2
- app/code/community/Lipscore/RatingsReviews/Model/Observer/Order/Status.php +1 -1
- app/code/community/Lipscore/RatingsReviews/Model/Purchase/Reminder.php +14 -13
- app/code/community/Lipscore/RatingsReviews/Model/System/Config/Source/Order/Status/Abstract.php +17 -0
- app/code/community/Lipscore/RatingsReviews/Model/System/Config/Source/Order/Status/Reminder.php +19 -0
- app/code/community/Lipscore/RatingsReviews/Model/System/Config/Source/Order/Status/Reminders.php +17 -0
- app/code/community/Lipscore/RatingsReviews/etc/config.xml +1 -1
- package.xml +5 -5
app/code/community/Lipscore/RatingsReviews/Model/Observer/Order/Status.php
CHANGED
@@ -105,6 +105,6 @@ class Lipscore_RatingsReviews_Model_Observer_Order_Status extends Lipscore_Ratin
|
|
105 |
|
106 |
private function log($message)
|
107 |
{
|
108 |
-
//file_put_contents(Mage::getBaseDir('var') . '
|
109 |
}
|
110 |
}
|
105 |
|
106 |
private function log($message)
|
107 |
{
|
108 |
+
//file_put_contents(Mage::getBaseDir('var') . DS . 'log' . DS . 'order_status.log', print_r($message, true) . "\n", FILE_APPEND);
|
109 |
}
|
110 |
}
|
app/code/community/Lipscore/RatingsReviews/Model/Purchase/Reminder.php
CHANGED
@@ -2,28 +2,20 @@
|
|
2 |
|
3 |
class Lipscore_RatingsReviews_Model_Purchase_Reminder
|
4 |
{
|
5 |
-
protected $lipscoreConfig;
|
6 |
-
protected $sender;
|
7 |
protected $dataHelper;
|
|
|
8 |
|
9 |
public function __construct($params)
|
10 |
{
|
11 |
-
$
|
12 |
-
$storeCode = isset($params['storeCode']) ? $params['storeCode'] : null;
|
13 |
-
|
14 |
-
$this->lipscoreConfig = Mage::helper('lipscore_ratingsreviews/config')->getScoped($websiteCode, $storeCode);
|
15 |
-
$this->sender = Mage::getModel('lipscore_ratingsreviews/api_request', array(
|
16 |
-
'lipscoreConfig' => $this->lipscoreConfig,
|
17 |
-
'path' => 'purchases',
|
18 |
-
'timeout' => isset($params['timeout']) ? $params['timeout'] : null
|
19 |
-
));
|
20 |
$this->dataHelper = Mage::helper('lipscore_ratingsreviews/reminder');
|
21 |
}
|
22 |
|
23 |
public function sendSingle($order)
|
24 |
{
|
25 |
$data = $this->dataHelper->orderData($order);
|
26 |
-
|
|
|
27 |
}
|
28 |
|
29 |
public function sendMultiple($orders)
|
@@ -33,7 +25,16 @@ class Lipscore_RatingsReviews_Model_Purchase_Reminder
|
|
33 |
foreach ($orders as $order) {
|
34 |
$data[] = $this->dataHelper->orderData($order);
|
35 |
}
|
|
|
|
|
|
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
}
|
2 |
|
3 |
class Lipscore_RatingsReviews_Model_Purchase_Reminder
|
4 |
{
|
|
|
|
|
5 |
protected $dataHelper;
|
6 |
+
protected $timeout;
|
7 |
|
8 |
public function __construct($params)
|
9 |
{
|
10 |
+
$this->timeout = isset($params['timeout']) ? $params['timeout'] : null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
$this->dataHelper = Mage::helper('lipscore_ratingsreviews/reminder');
|
12 |
}
|
13 |
|
14 |
public function sendSingle($order)
|
15 |
{
|
16 |
$data = $this->dataHelper->orderData($order);
|
17 |
+
$sender = $this->sender($order->getStore());
|
18 |
+
return $sender->send($data);
|
19 |
}
|
20 |
|
21 |
public function sendMultiple($orders)
|
25 |
foreach ($orders as $order) {
|
26 |
$data[] = $this->dataHelper->orderData($order);
|
27 |
}
|
28 |
+
// TODO use correct sender
|
29 |
+
// return $this->sender()->send(array('purchases' => $data));
|
30 |
+
}
|
31 |
|
32 |
+
protected function sender($store) {
|
33 |
+
$config = Mage::helper('lipscore_ratingsreviews/config')->getScoped(null, $store->getCode());
|
34 |
+
return Mage::getModel('lipscore_ratingsreviews/api_request', array(
|
35 |
+
'lipscoreConfig' => $config,
|
36 |
+
'path' => 'purchases',
|
37 |
+
'timeout' => $this->timeout
|
38 |
+
));
|
39 |
}
|
40 |
}
|
app/code/community/Lipscore/RatingsReviews/Model/System/Config/Source/Order/Status/Abstract.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Lipscore_RatingsReviews_Model_System_Config_Source_Order_Status_Abstract
|
3 |
+
{
|
4 |
+
protected function collectStatuses()
|
5 |
+
{
|
6 |
+
$result = array();
|
7 |
+
|
8 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
9 |
+
foreach ($statuses as $code => $label) {
|
10 |
+
$result[] = array(
|
11 |
+
'value' => $code,
|
12 |
+
'label' => $label
|
13 |
+
);
|
14 |
+
}
|
15 |
+
return $result;
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Lipscore/RatingsReviews/Model/System/Config/Source/Order/Status/Reminder.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Lipscore_RatingsReviews_Model_System_Config_Source_Order_Status_Reminder extends
|
3 |
+
Lipscore_RatingsReviews_Model_System_Config_Source_Order_Status_Abstract
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
$options = array(
|
8 |
+
array('value' =>'', 'label' => Mage::helper('adminhtml')->__('Disable the Review Request Email'))
|
9 |
+
);
|
10 |
+
|
11 |
+
try {
|
12 |
+
$options = array_merge($options, $this->collectStatuses());
|
13 |
+
} catch (Exception $e) {
|
14 |
+
Lipscore_RatingsReviews_Logger::logException($e);
|
15 |
+
}
|
16 |
+
|
17 |
+
return $options;
|
18 |
+
}
|
19 |
+
}
|
app/code/community/Lipscore/RatingsReviews/Model/System/Config/Source/Order/Status/Reminders.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Lipscore_RatingsReviews_Model_System_Config_Source_Order_Status_Reminders extends
|
3 |
+
Lipscore_RatingsReviews_Model_System_Config_Source_Order_Status_Abstract
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
$options = array();
|
8 |
+
|
9 |
+
try {
|
10 |
+
$options = $this->collectStatuses();
|
11 |
+
} catch (Exception $e) {
|
12 |
+
Lipscore_RatingsReviews_Logger::logException($e);
|
13 |
+
}
|
14 |
+
|
15 |
+
return $options;
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Lipscore/RatingsReviews/etc/config.xml
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<config>
|
12 |
<modules>
|
13 |
<Lipscore_RatingsReviews>
|
14 |
-
<version>1.3.
|
15 |
</Lipscore_RatingsReviews>
|
16 |
</modules>
|
17 |
|
11 |
<config>
|
12 |
<modules>
|
13 |
<Lipscore_RatingsReviews>
|
14 |
+
<version>1.3.2</version>
|
15 |
</Lipscore_RatingsReviews>
|
16 |
</modules>
|
17 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>lipscore</name>
|
4 |
-
<version>1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://lipscore.com/signup">Terms of use</license>
|
7 |
<channel>community</channel>
|
@@ -11,11 +11,11 @@
|
|
11 |
Lipscore has a range of great features that will
|
12 |
take all the hassle out of collecting product reviews, and help convert more
|
13 |
visitors in to profitable customers.</description>
|
14 |
-
<notes>
|
15 |
<authors><author><name>Henning Frettem</name><user>Lipscore</user><email>henning@lipscore.com</email></author><author><name>Olga Ivanova</name><user>oivanova</user><email>o.ivanova@datacrafts.io</email></author></authors>
|
16 |
-
<date>2016-
|
17 |
-
<time>
|
18 |
-
<contents><target name="magecommunity"><dir name="Lipscore"><dir name="RatingsReviews"><dir name="Block"><dir name="Catalog"><dir name="Product"><file name="Reviews.php" hash="e42b5b73a1b0f108818e4e8dad529d65"/><file name="View.php" hash="7f02a4d1fe64167be9885984fb31b7d3"/></dir></dir><file name="Init.php" hash="5c7469506b215d9dfa3ce8c074b50ab2"/><dir name="Purchase"><file name="Abstract.php" hash="4f9b41b1b84dc81b500656211b6ae38f"/><file name="Multishipping.php" hash="e9c866aed8a68dbc44ef2e050b12dc57"/><file name="Onepage.php" hash="b40ad6b638d20ee66229f4259050c497"/></dir><dir name="Review"><file name="Helper.php" hash="d9f5a39a6e432b5ea58f7b3ed08084e4"/><file name="Single.php" hash="1828a165516557d36820851da6a4fd6a"/><file name="Tabtitle.php" hash="20dfc5f3dc63c5b341c98ac1652b81d9"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Coupons.php" hash="75b2d3c48d10ef77c2a9e5b560767be0"/><dir name="Field"><file name="Abstract.php" hash="d3aacaca28c50d77b4766b35a98cb064"/><file name="Apikey.php" hash="69f23062e608e9a552cce33d0f67f9d2"/><file name="Emailstext.php" hash="0f850db8a26e3dfecc429b2ed0850052"/><file name="Reminderperiod.php" hash="835b2c844a319317b3edfb7b396a8850"/></dir><dir name="Fieldset"><file name="Coupons.php" hash="ea3b6a086bf35810492a89103c81c3c5"/><file name="Dashboardlink.php" hash="274be65d943d4645bb9b25c90cc6dab4"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Abstract.php" hash="4715d026440f1bb1cda70d56a69a2513"/><file name="Config.php" hash="5fc54781d2944ab4aeb941de3ddbb6b5"/><file name="Coupon.php" hash="154dde45de15233138e4bdfd447578a6"/><file name="Data.php" hash="d4a2ee7e1dbdd277e5a6eff4927fe4b2"/><file name="Locale.php" hash="1cfc0eb4dc3ede4aa07fbf1bba7ff104"/><file name="Module.php" hash="b15e3f74b7ce9f77780bc6db2e92efcc"/><file name="Price.php" hash="a18d38d97b10f2bf7ab4e1cd0a9e83a4"/><file name="Product.php" hash="143aae06c14564a008c1bada053f0da6"/><file name="Purchase.php" hash="1ca338f76113c292275067423c9329c9"/><file name="Reminder.php" hash="2fa0a5c45f750afd57f16f9ec84e1ae2"/><file name="Widget.php" hash="e084d21682603fc6bded14031c3ad81e"/></dir><file name="Logger.php" hash="c1d2ebc6b0b6d34537b4d76b7612a932"/><dir name="Model"><dir name="Api"><file name="Request.php" hash="b61017066275ec132bf94e1997896bde"/></dir><dir name="Config"><file name="Env.php" hash="6d541047b5f1366271d4ac92d4cd65b5"/></dir><file name="Config.php" hash="b5d0045d3e73f87fe2a7fab07ea8ec3e"/><dir name="Coupon"><file name="Generator.php" hash="935c307b401046d110c49b2eb09b7958"/></dir><dir name="Observer"><file name="Abstract.php" hash="9c6fc2d6cea03c9cea558933690a0b87"/><file name="Module.php" hash="4887fc64a1eab00776f4b8fa63b0d564"/><dir name="Order"><file name="Status.php" hash="
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>lipscore</name>
|
4 |
+
<version>1.3.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://lipscore.com/signup">Terms of use</license>
|
7 |
<channel>community</channel>
|
11 |
Lipscore has a range of great features that will
|
12 |
take all the hassle out of collecting product reviews, and help convert more
|
13 |
visitors in to profitable customers.</description>
|
14 |
+
<notes>Fix of review emails sending</notes>
|
15 |
<authors><author><name>Henning Frettem</name><user>Lipscore</user><email>henning@lipscore.com</email></author><author><name>Olga Ivanova</name><user>oivanova</user><email>o.ivanova@datacrafts.io</email></author></authors>
|
16 |
+
<date>2016-03-04</date>
|
17 |
+
<time>10:18:53</time>
|
18 |
+
<contents><target name="magecommunity"><dir name="Lipscore"><dir name="RatingsReviews"><dir name="Block"><dir name="Catalog"><dir name="Product"><file name="Reviews.php" hash="e42b5b73a1b0f108818e4e8dad529d65"/><file name="View.php" hash="7f02a4d1fe64167be9885984fb31b7d3"/></dir></dir><file name="Init.php" hash="5c7469506b215d9dfa3ce8c074b50ab2"/><dir name="Purchase"><file name="Abstract.php" hash="4f9b41b1b84dc81b500656211b6ae38f"/><file name="Multishipping.php" hash="e9c866aed8a68dbc44ef2e050b12dc57"/><file name="Onepage.php" hash="b40ad6b638d20ee66229f4259050c497"/></dir><dir name="Review"><file name="Helper.php" hash="d9f5a39a6e432b5ea58f7b3ed08084e4"/><file name="Single.php" hash="1828a165516557d36820851da6a4fd6a"/><file name="Tabtitle.php" hash="20dfc5f3dc63c5b341c98ac1652b81d9"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Coupons.php" hash="75b2d3c48d10ef77c2a9e5b560767be0"/><dir name="Field"><file name="Abstract.php" hash="d3aacaca28c50d77b4766b35a98cb064"/><file name="Apikey.php" hash="69f23062e608e9a552cce33d0f67f9d2"/><file name="Emailstext.php" hash="0f850db8a26e3dfecc429b2ed0850052"/><file name="Reminderperiod.php" hash="835b2c844a319317b3edfb7b396a8850"/></dir><dir name="Fieldset"><file name="Coupons.php" hash="ea3b6a086bf35810492a89103c81c3c5"/><file name="Dashboardlink.php" hash="274be65d943d4645bb9b25c90cc6dab4"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Abstract.php" hash="4715d026440f1bb1cda70d56a69a2513"/><file name="Config.php" hash="5fc54781d2944ab4aeb941de3ddbb6b5"/><file name="Coupon.php" hash="154dde45de15233138e4bdfd447578a6"/><file name="Data.php" hash="d4a2ee7e1dbdd277e5a6eff4927fe4b2"/><file name="Locale.php" hash="1cfc0eb4dc3ede4aa07fbf1bba7ff104"/><file name="Module.php" hash="b15e3f74b7ce9f77780bc6db2e92efcc"/><file name="Price.php" hash="a18d38d97b10f2bf7ab4e1cd0a9e83a4"/><file name="Product.php" hash="143aae06c14564a008c1bada053f0da6"/><file name="Purchase.php" hash="1ca338f76113c292275067423c9329c9"/><file name="Reminder.php" hash="2fa0a5c45f750afd57f16f9ec84e1ae2"/><file name="Widget.php" hash="e084d21682603fc6bded14031c3ad81e"/></dir><file name="Logger.php" hash="c1d2ebc6b0b6d34537b4d76b7612a932"/><dir name="Model"><dir name="Api"><file name="Request.php" hash="b61017066275ec132bf94e1997896bde"/></dir><dir name="Config"><file name="Env.php" hash="6d541047b5f1366271d4ac92d4cd65b5"/></dir><file name="Config.php" hash="b5d0045d3e73f87fe2a7fab07ea8ec3e"/><dir name="Coupon"><file name="Generator.php" hash="935c307b401046d110c49b2eb09b7958"/></dir><dir name="Observer"><file name="Abstract.php" hash="9c6fc2d6cea03c9cea558933690a0b87"/><file name="Module.php" hash="4887fc64a1eab00776f4b8fa63b0d564"/><dir name="Order"><file name="Status.php" hash="7e6e19da5896c1ac912c1c65daa8382f"/></dir><file name="Output.php" hash="6d8c9cb651ac54ab23729f570807d6e8"/></dir><dir name="Purchase"><file name="Reminder.php" hash="144b14a5ae8befcd0e19b0422f592fc2"/></dir><file name="Shop.php" hash="b23d54688fc733ea672d427072a675af"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Apikey.php" hash="53385393e0e6c6320878f06929424581"/></dir><dir name="Source"><file name="Locale.php" hash="6cb71dca2b2e76a756fc794a136cc9c5"/><dir name="Order"><dir name="Status"><file name="Abstract.php" hash="cf141cb1baae94f3214af72196418773"/><file name="Reminder.php" hash="9a48a5d055ad5bff4d0bd2b9d0346b74"/><file name="Reminders.php" hash="7b3fc04193f846838a58d0148d9def23"/></dir><file name="Status.php" hash="e1ce90fd301814fda327bef93f77a8ae"/></dir><file name="Pricerule.php" hash="5204f6c341f8adc8a6b8c77888e40396"/><dir name="Productattr"><file name="Brand.php" hash="fc166f0faa7304b4bc861d50e7b9a8e7"/></dir><file name="Reminderperiod.php" hash="1c6a9df19b5507ab2d706af46c96f4d5"/></dir></dir></dir><dir name="Tracker"><file name="Action.php" hash="94a353059f272207491baa05dd7686f5"/><file name="Installation.php" hash="15a0823b0fd346fba58a313c711c4103"/></dir></dir><dir name="controllers"><dir name="Purchases"><file name="RemindersController.php" hash="01103c031a42daa6958e802e7d39bfb5"/></dir></dir><dir name="data"><dir name="lipscore_ratingsreviews_setup"><file name="data-install-1.2.21.0.php" hash="0ebbbd1f815ef325cee95311bc4023f8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c3a5ed358f97a2119bcaf3a6c1d6c026"/><file name="config.xml" hash="9acfea4df5aa74ac6add79ae2b92b3c8"/><dir name="environments"><file name="production.xml" hash="a519f9130a42c2bc04a30c23eeb3adaf"/></dir><file name="system.xml" hash="c3718cc8bc427e3d783469029822caa6"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="lipscore"><file name="init.phtml" hash="3de6b4043bfb937406e136f3644fa3d9"/><dir name="purchase"><file name="view.phtml" hash="ce87d7dcb5b36f67d19843b84a5198e7"/></dir><dir name="rating"><file name="view.phtml" hash="d678569a9626016f54502e8d35d0eea9"/></dir><dir name="reviews"><file name="tab_title.phtml" hash="716d399499e80fa1cb61dd83295be1f7"/><file name="view.phtml" hash="37b2a4de52536e0632bad412a80a21fc"/><file name="view_single.phtml" hash="3675bcf396c750b63e01dd56b576a676"/></dir></dir></dir><dir name="layout"><file name="lipscore_ratingsreviews.xml" hash="c41ae9b0c0add978cbec4b9ea07b293a"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="lipscore_ratingsreviews.xml" hash="3e6353dfc81756e37494941ef6eb8bee"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lipscore_RatingsReviews.xml" hash="9422ff014d7fcbd68274ffd97182de1d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="lipscore.css" hash="b119c59d0beef8984416f455ea1d3e6e"/></dir><dir name="js"><file name="lipscore.js" hash="0ac6084e3d815ef75855fe2c2ebcae06"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><file name="lipscore.css" hash="5893f0e5e380d7013db09248da0097b9"/><dir name="js"><file name="lipscore.js" hash="8bc4b8b7cd53695bb02fc90bb4055f57"/></dir></dir></dir></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
21 |
</package>
|