cartsguru - Version 1.2.1

Version Notes

- Improve order tracking

Download this release

Release Info

Developer Maxime Pruvost
Extension cartsguru
Version 1.2.1
Comparing to
See all releases


Code changes from version 1.2.0 to 1.2.1

app/code/local/Cartsguru/Model/Webservice.php CHANGED
@@ -159,7 +159,7 @@ class Cartsguru_Model_Webservice
159
  'creationDate' => $this->formatDate($order->getCreatedAt()), // Date of the order as string in json format
160
  'cartId' => $order->getQuoteId(), // Cart identifier, source of the order
161
  'totalET' => (float)$order->getSubtotal(), // Amount excluded taxes and excluded shipping
162
- 'totalATI' => $this->getTotalATI($items), // Amount included taxes and excluded shipping
163
  'state' => $order->getStatus(), // raw order status
164
  'accountId' => $email, // Account id of the buyer
165
  'ip' => $order->getRemoteIp(), // User IP
@@ -251,14 +251,15 @@ class Cartsguru_Model_Webservice
251
  }
252
 
253
  //Recover link
254
- $recoverUrl = Mage::getBaseUrl() . 'cartsguru/recovercart?cart_id=' . $quote->getId() . '&cart_token=' . $quote->getData('cartsguru_token');
255
-
 
256
 
257
  //Items details
258
  $items = $this->getItemsData($quote);
259
 
260
  //Check is valid
261
- if (!$items || (!$phone || !$email)) {
262
  return;
263
  }
264
 
@@ -395,7 +396,7 @@ class Cartsguru_Model_Webservice
395
  $requestUrl = '/sites/' . $this->getStoreConfig('siteid') . '/register-plugin';
396
  $fields = array(
397
  'plugin' => 'magento',
398
- 'pluginVersion' => '1.2.0',
399
  'storeVersion' => Mage::getVersion()
400
  );
401
 
159
  'creationDate' => $this->formatDate($order->getCreatedAt()), // Date of the order as string in json format
160
  'cartId' => $order->getQuoteId(), // Cart identifier, source of the order
161
  'totalET' => (float)$order->getSubtotal(), // Amount excluded taxes and excluded shipping
162
+ 'totalATI' => (float)$order->getGrandTotal(), // Paid amount
163
  'state' => $order->getStatus(), // raw order status
164
  'accountId' => $email, // Account id of the buyer
165
  'ip' => $order->getRemoteIp(), // User IP
251
  }
252
 
253
  //Recover link
254
+ $recoverUrl = ($quote->getData('cartsguru_token')) ?
255
+ Mage::getBaseUrl() . 'cartsguru/recovercart?cart_id=' . $quote->getId() . '&cart_token=' . $quote->getData('cartsguru_token') :
256
+ '';
257
 
258
  //Items details
259
  $items = $this->getItemsData($quote);
260
 
261
  //Check is valid
262
+ if (sizeof($items) == 0) {
263
  return;
264
  }
265
 
396
  $requestUrl = '/sites/' . $this->getStoreConfig('siteid') . '/register-plugin';
397
  $fields = array(
398
  'plugin' => 'magento',
399
+ 'pluginVersion' => '1.2.1',
400
  'storeVersion' => Mage::getVersion()
401
  );
402
 
app/code/local/Cartsguru/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <!-- plugin name -->
4
  <modules>
5
  <Cartsguru>
6
- <version>1.2.0</version>
7
  </Cartsguru>
8
  </modules>
9
  <global>
@@ -53,7 +53,7 @@
53
  </cartsguru_sales_order_save_after>
54
  </observers>
55
  </sales_order_place_after>
56
- <sales_order_saves_after>
57
  <observers>
58
  <cartsguru_sales_order_save_after>
59
  <type>singleton</type>
@@ -61,7 +61,7 @@
61
  <method>orderSaveAfter</method>
62
  </cartsguru_sales_order_save_after>
63
  </observers>
64
- </sales_order_saves_after>
65
  <!-- when customer register this hooks call two times-->
66
  <customer_save_after>
67
  <observers>
3
  <!-- plugin name -->
4
  <modules>
5
  <Cartsguru>
6
+ <version>1.2.1</version>
7
  </Cartsguru>
8
  </modules>
9
  <global>
53
  </cartsguru_sales_order_save_after>
54
  </observers>
55
  </sales_order_place_after>
56
+ <sales_order_save_after>
57
  <observers>
58
  <cartsguru_sales_order_save_after>
59
  <type>singleton</type>
61
  <method>orderSaveAfter</method>
62
  </cartsguru_sales_order_save_after>
63
  </observers>
64
+ </sales_order_save_after>
65
  <!-- when customer register this hooks call two times-->
66
  <customer_save_after>
67
  <observers>
app/code/local/Cartsguru/sql/cartsguru_setup/install-1.0.0.php DELETED
@@ -1,61 +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_flat_quote'), 'telephone', 'varchar(255) NOT NULL');
9
- $connection->addColumn($this->getTable('sales_flat_order'), 'telephone', 'varchar(255) NOT NULL');
10
-
11
- $connection->addColumn($this->getTable('sales_flat_quote'), 'country', 'varchar(255) NOT NULL');
12
- $connection->addColumn($this->getTable('sales_flat_order'), 'country', 'varchar(255) NOT NULL');
13
-
14
- $setup = Mage::getModel('customer/entity_setup', 'core_setup');
15
-
16
- $installer_core= new Mage_Sales_Model_Resource_Setup('core_setup');
17
- $installer_core->addAttribute('catalog_product', 'telephone', array(
18
- 'group' => 'General',
19
- 'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
20
- 'backend' => '',
21
- 'frontend' => '',
22
- 'label' => 'Telephone',
23
- 'input' => 'text',
24
- 'class' => '',
25
- 'source' => '',
26
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
27
- 'visible' => true,
28
- 'required' => false,
29
- 'user_defined' => true,
30
- 'default' => '',
31
- 'searchable' => true,
32
- 'filterable' => true,
33
- 'comparable' => true,
34
- 'visible_on_front' => true,
35
- 'unique' => false,
36
- 'apply_to' => 'simple,configurable,virtual',
37
- 'is_configurable' => false
38
- ));
39
-
40
- /**
41
- * Add 'custom_attribute' attribute for entities
42
- */
43
- $entities = array(
44
- 'quote',
45
- 'quote_address',
46
- 'quote_item',
47
- 'quote_address_item',
48
- 'order',
49
- 'order_item'
50
- );
51
- $options = array(
52
- 'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
53
- 'visible' => true,
54
- 'required' => false
55
- );
56
- foreach ($entities as $entity) {
57
- $installer_core->addAttribute($entity, 'telephone', $options);
58
- }
59
- $setup->endSetup();
60
- $installer_core->endSetup();
61
- $installer->endSetup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Cartsguru/sql/cartsguru_setup/install-1.2.1.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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();
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>cartsguru</name>
4
- <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
@@ -18,12 +18,11 @@ Effortlessly reduce the number of abandoned shopping carts by automating telepho
18
  &#xD;
19
  - SMS Callback &amp;amp; Push SMS&#xD;
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>- Add recovery cart link&#xD;
22
- - Fix send gender in some cases</notes>
23
  <authors><author><name>Maxime Pruvost</name><user>cgmaximepruvost</user><email>maxime@carts.guru</email></author></authors>
24
  <date>2016-04-26</date>
25
- <time>10:17:24</time>
26
- <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="93ff6cdb037cb3f31d0a85f0a97e7a64"/></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="6ed9edede663e2400ac8fd5f2706179e"/><file name="system.xml" hash="cb0fbf86d2be47dbd719739ee79c4cba"/></dir><dir name="sql"><dir name="cartsguru_setup"><file name="install-1.0.0.php" hash="c46126ce8ce549d525fb25bddc5090b5"/><file name="install-1.2.0.php" hash="112bd2a1d4e02dd1f296ef47e54e0485"/><file name="upgrade-1.0.0-1.2.0.php" hash="112bd2a1d4e02dd1f296ef47e54e0485"/></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>
27
  <compatible/>
28
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
29
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>cartsguru</name>
4
+ <version>1.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
18
  &#xD;
19
  - SMS Callback &amp;amp; Push SMS&#xD;
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 order tracking</notes>
 
22
  <authors><author><name>Maxime Pruvost</name><user>cgmaximepruvost</user><email>maxime@carts.guru</email></author></authors>
23
  <date>2016-04-26</date>
24
+ <time>15:35:58</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="3579906d1db676e6aab7ccf1f3a9a46e"/></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="33653d64090426d708a54a2e01b9bd78"/><file name="system.xml" hash="cb0fbf86d2be47dbd719739ee79c4cba"/></dir><dir name="sql"><dir name="cartsguru_setup"><file name="install-1.2.0.php" hash="112bd2a1d4e02dd1f296ef47e54e0485"/><file name="install-1.2.1.php" hash="112bd2a1d4e02dd1f296ef47e54e0485"/><file name="upgrade-1.0.0-1.2.0.php" hash="112bd2a1d4e02dd1f296ef47e54e0485"/></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>
26
  <compatible/>
27
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
28
  </package>