Version Notes
- Improve compatibility with 1.7 & 1.8
- Improve SQL upgrade management
- Add compatibility with 1.6
Download this release
Release Info
Developer | Maxime Pruvost |
Extension | cartsguru |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
- app/code/local/Cartsguru/Model/Webservice.php +11 -8
- app/code/local/Cartsguru/etc/config.xml +1 -1
- app/code/local/Cartsguru/sql/cartsguru_setup/install-1.0.0.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/install-1.2.0.php +0 -24
- app/code/local/Cartsguru/sql/cartsguru_setup/install-1.2.1.php +0 -24
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.0-1.0.1.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.0-1.2.0.php +0 -24
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.1-1.0.2.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.2-1.1.0.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.0-1.1.1.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.1-1.1.2.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.2-1.1.3.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.3-1.1.4 .php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.4-1.1.5.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.5-1.2.0.php +11 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.2.0-1.2.1.php +6 -0
- app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.2.1-1.2.2.php +6 -0
- package.xml +7 -5
app/code/local/Cartsguru/Model/Webservice.php
CHANGED
@@ -55,9 +55,8 @@ class Cartsguru_Model_Webservice
|
|
55 |
* @param $item
|
56 |
* @return array
|
57 |
*/
|
58 |
-
public function getCatNames($
|
59 |
{
|
60 |
-
$product = $item->getProduct();
|
61 |
$categoryNames = array();
|
62 |
$categoryIds = $product->getCategoryIds();
|
63 |
foreach ($categoryIds as $categoryId) {
|
@@ -102,10 +101,9 @@ class Cartsguru_Model_Webservice
|
|
102 |
public function getItemsData($obj){
|
103 |
$items = array();
|
104 |
foreach ($obj->getAllVisibleItems() as $item) {
|
105 |
-
$product
|
106 |
-
$product=$product->load($product->getId());
|
107 |
if($product->getImage() && $product->getImage() != 'no_selection') {
|
108 |
-
$imageUrl=(string)Mage::helper('catalog/image')->init($
|
109 |
->constrainOnly(false)
|
110 |
->keepAspectRatio(true)
|
111 |
->keepFrame(true)
|
@@ -114,7 +112,7 @@ class Cartsguru_Model_Webservice
|
|
114 |
else {
|
115 |
$imageUrl=$this->notEmpty(null);
|
116 |
}
|
117 |
-
$categoryNames = $this->getCatNames($
|
118 |
|
119 |
$quantity = (int)$item->getQtyOrdered();
|
120 |
if ($quantity == 0){
|
@@ -127,7 +125,7 @@ class Cartsguru_Model_Webservice
|
|
127 |
'quantity' => $quantity, // Count
|
128 |
'totalET' => (float)$item->getPrice()*$quantity, // Subtotal of item, taxe excluded
|
129 |
'totalATI' => (float)$item->getPriceInclTax()*$quantity, // Subtotal of item, taxe included
|
130 |
-
'url' => $
|
131 |
'imageUrl' => $imageUrl,
|
132 |
'universe' => $this->notEmpty($categoryNames[1]),
|
133 |
'category' => $this->notEmpty(end($categoryNames))
|
@@ -143,6 +141,11 @@ class Cartsguru_Model_Webservice
|
|
143 |
*/
|
144 |
public function getOrderData($order)
|
145 |
{
|
|
|
|
|
|
|
|
|
|
|
146 |
//Customer data
|
147 |
$gender = $this->genderMapping($order->getCustomerGender());
|
148 |
$email = $order->getCustomerEmail();
|
@@ -396,7 +399,7 @@ class Cartsguru_Model_Webservice
|
|
396 |
$requestUrl = '/sites/' . $this->getStoreConfig('siteid') . '/register-plugin';
|
397 |
$fields = array(
|
398 |
'plugin' => 'magento',
|
399 |
-
'pluginVersion' => '1.2.
|
400 |
'storeVersion' => Mage::getVersion()
|
401 |
);
|
402 |
|
55 |
* @param $item
|
56 |
* @return array
|
57 |
*/
|
58 |
+
public function getCatNames($product)
|
59 |
{
|
|
|
60 |
$categoryNames = array();
|
61 |
$categoryIds = $product->getCategoryIds();
|
62 |
foreach ($categoryIds as $categoryId) {
|
101 |
public function getItemsData($obj){
|
102 |
$items = array();
|
103 |
foreach ($obj->getAllVisibleItems() as $item) {
|
104 |
+
$product = Mage::getModel('catalog/product')->load($item->getProductId());
|
|
|
105 |
if($product->getImage() && $product->getImage() != 'no_selection') {
|
106 |
+
$imageUrl=(string)Mage::helper('catalog/image')->init($product, 'small_image')
|
107 |
->constrainOnly(false)
|
108 |
->keepAspectRatio(true)
|
109 |
->keepFrame(true)
|
112 |
else {
|
113 |
$imageUrl=$this->notEmpty(null);
|
114 |
}
|
115 |
+
$categoryNames = $this->getCatNames($product);
|
116 |
|
117 |
$quantity = (int)$item->getQtyOrdered();
|
118 |
if ($quantity == 0){
|
125 |
'quantity' => $quantity, // Count
|
126 |
'totalET' => (float)$item->getPrice()*$quantity, // Subtotal of item, taxe excluded
|
127 |
'totalATI' => (float)$item->getPriceInclTax()*$quantity, // Subtotal of item, taxe included
|
128 |
+
'url' => $product->getProductUrl(), // URL of product sheet
|
129 |
'imageUrl' => $imageUrl,
|
130 |
'universe' => $this->notEmpty($categoryNames[1]),
|
131 |
'category' => $this->notEmpty(end($categoryNames))
|
141 |
*/
|
142 |
public function getOrderData($order)
|
143 |
{
|
144 |
+
//Order must have a status
|
145 |
+
if (!$order->getStatus()){
|
146 |
+
return null;
|
147 |
+
}
|
148 |
+
|
149 |
//Customer data
|
150 |
$gender = $this->genderMapping($order->getCustomerGender());
|
151 |
$email = $order->getCustomerEmail();
|
399 |
$requestUrl = '/sites/' . $this->getStoreConfig('siteid') . '/register-plugin';
|
400 |
$fields = array(
|
401 |
'plugin' => 'magento',
|
402 |
+
'pluginVersion' => '1.2.2',
|
403 |
'storeVersion' => Mage::getVersion()
|
404 |
);
|
405 |
|
app/code/local/Cartsguru/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<!-- plugin name -->
|
4 |
<modules>
|
5 |
<Cartsguru>
|
6 |
-
<version>1.2.
|
7 |
</Cartsguru>
|
8 |
</modules>
|
9 |
<global>
|
3 |
<!-- plugin name -->
|
4 |
<modules>
|
5 |
<Cartsguru>
|
6 |
+
<version>1.2.2</version>
|
7 |
</Cartsguru>
|
8 |
</modules>
|
9 |
<global>
|
app/code/local/Cartsguru/sql/cartsguru_setup/install-1.0.0.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/install-1.2.0.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
-
$installer = $this;
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
$connection = $installer->getConnection();
|
7 |
-
|
8 |
-
$connection->addColumn($this->getTable('sales/quote'), 'cartsguru_token', 'varchar(255) NOT NULL');
|
9 |
-
|
10 |
-
$setup = Mage::getModel('customer/entity_setup', 'core_setup');
|
11 |
-
|
12 |
-
$installer_core= new Mage_Sales_Model_Resource_Setup('core_setup');
|
13 |
-
|
14 |
-
$options = array(
|
15 |
-
'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
|
16 |
-
'visible' => false,
|
17 |
-
'required' => false
|
18 |
-
);
|
19 |
-
foreach ($entities as $entity) {
|
20 |
-
$installer_core->addAttribute('quote', 'cartsguru_token', $options);
|
21 |
-
}
|
22 |
-
$setup->endSetup();
|
23 |
-
$installer_core->endSetup();
|
24 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Cartsguru/sql/cartsguru_setup/install-1.2.1.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
-
$installer = $this;
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
$connection = $installer->getConnection();
|
7 |
-
|
8 |
-
$connection->addColumn($this->getTable('sales/quote'), 'cartsguru_token', 'varchar(255) NOT NULL');
|
9 |
-
|
10 |
-
$setup = Mage::getModel('customer/entity_setup', 'core_setup');
|
11 |
-
|
12 |
-
$installer_core= new Mage_Sales_Model_Resource_Setup('core_setup');
|
13 |
-
|
14 |
-
$options = array(
|
15 |
-
'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
|
16 |
-
'visible' => false,
|
17 |
-
'required' => false
|
18 |
-
);
|
19 |
-
foreach ($entities as $entity) {
|
20 |
-
$installer_core->addAttribute('quote', 'cartsguru_token', $options);
|
21 |
-
}
|
22 |
-
$setup->endSetup();
|
23 |
-
$installer_core->endSetup();
|
24 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.0-1.0.1.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.0-1.2.0.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
-
$installer = $this;
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
$connection = $installer->getConnection();
|
7 |
-
|
8 |
-
$connection->addColumn($this->getTable('sales/quote'), 'cartsguru_token', 'varchar(255) NOT NULL');
|
9 |
-
|
10 |
-
$setup = Mage::getModel('customer/entity_setup', 'core_setup');
|
11 |
-
|
12 |
-
$installer_core= new Mage_Sales_Model_Resource_Setup('core_setup');
|
13 |
-
|
14 |
-
$options = array(
|
15 |
-
'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
|
16 |
-
'visible' => false,
|
17 |
-
'required' => false
|
18 |
-
);
|
19 |
-
foreach ($entities as $entity) {
|
20 |
-
$installer_core->addAttribute('quote', 'cartsguru_token', $options);
|
21 |
-
}
|
22 |
-
$setup->endSetup();
|
23 |
-
$installer_core->endSetup();
|
24 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.1-1.0.2.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.0.2-1.1.0.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.0-1.1.1.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.1-1.1.2.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.2-1.1.3.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.3-1.1.4 .php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.4-1.1.5.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.1.5-1.2.0.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
$magentoVersion = Mage::getVersion();
|
5 |
+
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
$connection = $installer->getConnection();
|
9 |
+
$connection->addColumn($this->getTable('sales/quote'), 'cartsguru_token', 'varchar(255) NOT NULL');
|
10 |
+
|
11 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.2.0-1.2.1.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
app/code/local/Cartsguru/sql/cartsguru_setup/upgrade-1.2.1-1.2.2.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->endSetup();
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>cartsguru</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
<channel>community</channel>
|
@@ -18,11 +18,13 @@ Effortlessly reduce the number of abandoned shopping carts by automating telepho
|
|
18 |

|
19 |
- SMS Callback &amp; Push SMS
|
20 |
Send to your prospective customers having abandoned a cart, an SMS suggesting a free call back from your customer relations service, a straightforward SMS reminder or an SMS offering a personalized discount</description>
|
21 |
-
<notes>- Improve
|
|
|
|
|
22 |
<authors><author><name>Maxime Pruvost</name><user>cgmaximepruvost</user><email>maxime@carts.guru</email></author></authors>
|
23 |
-
<date>2016-04-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magelocal"><dir name="Cartsguru"><dir name="Helper"><file name="Data.php" hash="f6590d08ba862a169ce43459ddb1193c"/><file name="Tools.php" hash="612133db113c08e7de7ab94a86d23e34"/></dir><dir name="Model"><file name="Observer.php" hash="7b3b398b86a9b8e044f7d00f6b72e196"/><file name="Webservice.php" hash="
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>cartsguru</name>
|
4 |
+
<version>1.2.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
<channel>community</channel>
|
18 |

|
19 |
- SMS Callback &amp; Push SMS
|
20 |
Send to your prospective customers having abandoned a cart, an SMS suggesting a free call back from your customer relations service, a straightforward SMS reminder or an SMS offering a personalized discount</description>
|
21 |
+
<notes>- Improve compatibility with 1.7 & 1.8
|
22 |
+
- Improve SQL upgrade management
|
23 |
+
- Add compatibility with 1.6</notes>
|
24 |
<authors><author><name>Maxime Pruvost</name><user>cgmaximepruvost</user><email>maxime@carts.guru</email></author></authors>
|
25 |
+
<date>2016-04-27</date>
|
26 |
+
<time>16:22:43</time>
|
27 |
+
<contents><target name="magelocal"><dir name="Cartsguru"><dir name="Helper"><file name="Data.php" hash="f6590d08ba862a169ce43459ddb1193c"/><file name="Tools.php" hash="612133db113c08e7de7ab94a86d23e34"/></dir><dir name="Model"><file name="Observer.php" hash="7b3b398b86a9b8e044f7d00f6b72e196"/><file name="Webservice.php" hash="7272510a152e9a2447f5c1751a0646fa"/></dir><dir name="controllers"><file name="IndexController.php" hash="108acaab218e2a5e79a12677f83ebc29"/><file name="RecovercartController.php" hash="c5272eaae6eba7658155a83c27b94139"/></dir><dir name="etc"><file name="config.xml" hash="b2b13c14d50a71d8de838aaa72020110"/><file name="system.xml" hash="cb0fbf86d2be47dbd719739ee79c4cba"/></dir><dir name="sql"><dir name="cartsguru_setup"><file name="install-1.0.0.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.0.0-1.0.1.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.0.1-1.0.2.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.0.2-1.1.0.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.1.0-1.1.1.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.1.1-1.1.2.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.1.2-1.1.3.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.1.3-1.1.4 .php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.1.4-1.1.5.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.1.5-1.2.0.php" hash="066c5cfb9870c04737cba2d2edb30a40"/><file name="upgrade-1.2.0-1.2.1.php" hash="381716ae5001678f8bcc6680bad68015"/><file name="upgrade-1.2.1-1.2.2.php" hash="381716ae5001678f8bcc6680bad68015"/></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="CartsGuru.csv" hash="b6d51893c33ddef1d53372d3a23b036c"/></dir><dir name="en_US"><file name="CartsGuru.csv" hash="921cb4133db47471456759443bb269f5"/></dir></target><target name="mageetc"><dir name="modules"><file name="Cartsguru.xml" hash="32bfa7d63b1a5b6b8f7977bf31af4e28"/></dir></target></contents>
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
30 |
</package>
|