MocoInsight_Mocoauto - Version 1.4.5

Version Notes

1.4.5

Diagnostic: gte - ordered by entity_id

1.4.4

Faster unconvertedcarts.
CustomerTaxClass added to orders and customer Actions

1.4.3

New attrInfoAction and entityTypeInfoAction added to tracked changes in Magento data.

1.4.2

Disconnect API version from module version for sites that cache module XML file

1.4.1

Improved order processing speed.
Multi store URL info.
Shipping address tracked.
gte option for orders,customers, products, carts and subscribers.
Status option for subscribersAction
Update carts action skip non identifed carts.

1.4.0

Split stats action into
stats and logstats

Updated customersAction to return custom attributes.

1.3.9

Added eavinfo_catalogAction

Products action now retuns full url of product images.

testing new testcustomerAction

1.3.8

Changed table exists function
mocoauto_api_error - API errors prefix

1.3.7

Added non sensitive payment info to orderAction

1.3.5

Faster uncovertedcarts

1.3.4

log_all_joined

1.3.3

Added rulesAction - for details on coupon and shopping carts rule.

1.3.2

Exception handles for uncoverted carts.
Changed catalogue tax rate processing.

1.3.1

Added graceful exception handling for installations that have misconfigured product attributes

1.3.0

Check direct SQL methods defined
exproducts
exstats
report version of php

1.2.9

Default tax rate fro products returned with producAction

1.2.8

storesAction now returns store config data

1.2.7

log stats function calculates using direct SQL

1.2.6

StatsAction now returns size of log files

1.2.5

Speed up stocklevelAction, now only returns non zero inventory

WishlistAction now includes wishListItemId

1.2.4

Added wishlistsAction
Added unconvertedcartsAction

Fix - log actions now check if table exists

1.2.3

Fix to Observer.php

1.2.2

Added subscribersAction
Added storesAction

1.2.1

ordersAction - now uses billing address as some products (Virtual) won't have a delivery address and checks that object exists

1.2.0

ordersAction - added shpping address
productsAction - added end of record marker

stocklevelsAction - New

Added log_ actions

1.1.7

Added malformed error

Returns API version number with failed calls

1.1.6

Changed API header name to work with sites that use additional authorisation now:

mocoapi: apikey= THE API KEY

1.1.5
Updated stats API now includes:

Version of magento
System date/time
added success true for succesful requests
changed product category to moco_category

Download this release

Release Info

Developer Rob Davies
Extension MocoInsight_Mocoauto
Version 1.4.5
Comparing to
See all releases


Code changes from version 1.4.4 to 1.4.5

app/code/community/MocoInsight/Mocoauto/controllers/ApiController.php CHANGED
@@ -30,7 +30,7 @@
30
  // entityTypeInfoAction
31
 
32
 
33
- define("apiversion","1.4.4");
34
 
35
  class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Action
36
  {
@@ -438,18 +438,23 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
438
  $gTE = $this->getRequest()->getParam('gte', 'ALL');
439
 
440
  $_orderCol = Mage::getModel('sales/order')->getCollection()->addAttributeToSelect('*');
441
- $_orderCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
442
 
443
- // Mage::log('SQL Query: '.$_orderCol->getSelect());
444
 
445
  if($since != 'ALL'){
446
  $_orderCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
447
  }
448
 
449
  if($gTE != 'ALL'){
450
- $_orderCol->addAttributeToFilter('entity_id', array('gteq' =>$gTE));
 
 
 
 
451
  }
452
 
 
 
 
453
  $orders = array();
454
 
455
  foreach($_orderCol as $_order) {
@@ -464,10 +469,11 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
464
  }
465
  $order['payment_method'] = $_order->getPayment()->getMethodInstance()->getTitle();
466
 
467
- $_quote = Mage::getModel('sales/quote')->load($_order->getQuoteId());
468
- $taxClassId = $_quote->getCustomerTaxClassId();
469
- $_taxClass = Mage::getModel('tax/class')->load($taxClassId);
470
- $order['moco_customer_tax_class'] = $_taxClass->getClassName();
 
471
 
472
  if(is_object($_order->getBillingAddress())){
473
  $_billing_address = $_order->getBillingAddress();
@@ -640,14 +646,17 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
640
  $gTE = $this->getRequest()->getParam('gte', 'ALL');
641
 
642
  $_customerCol = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*');
643
- $_customerCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
644
 
645
  if($since != 'ALL'){
646
  $_customerCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
647
  }
648
 
649
  if($gTE != 'ALL'){
650
- $_customerCol->addAttributeToFilter('entity_id', array('gteq' =>$gTE));
 
 
 
 
651
  }
652
 
653
  $customers = array();
@@ -778,18 +787,24 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
778
  $gTE = $this->getRequest()->getParam('gte', 'ALL');
779
 
780
  $_productCol = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
781
- $_productCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
782
 
783
  if($since != 'ALL'){
784
  $_productCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
785
  }
786
 
787
  if($gTE != 'ALL'){
788
- $_productCol->addAttributeToFilter('entity_id', array('gteq' =>$gTE));
 
 
 
 
789
  }
790
 
791
  $products[] = array('success' => 'true');
792
 
 
 
 
793
  foreach($_productCol as $_product){
794
 
795
  // get all the custom attributes of the product
30
  // entityTypeInfoAction
31
 
32
 
33
+ define("apiversion","1.4.5");
34
 
35
  class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Action
36
  {
438
  $gTE = $this->getRequest()->getParam('gte', 'ALL');
439
 
440
  $_orderCol = Mage::getModel('sales/order')->getCollection()->addAttributeToSelect('*');
 
441
 
 
442
 
443
  if($since != 'ALL'){
444
  $_orderCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
445
  }
446
 
447
  if($gTE != 'ALL'){
448
+ $_orderCol->addFieldToFilter('entity_id', array('gteq' =>$gTE));
449
+ $_orderCol->getSelect()->limit($page_size, ($offset * $page_size))->order('entity_id');
450
+ }
451
+ else{
452
+ $_orderCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
453
  }
454
 
455
+ //Mage::log('SQL Query: '.$_orderCol->getSelect());
456
+
457
+
458
  $orders = array();
459
 
460
  foreach($_orderCol as $_order) {
469
  }
470
  $order['payment_method'] = $_order->getPayment()->getMethodInstance()->getTitle();
471
 
472
+ // Removing Tax Class as the customer really wanted VAT number
473
+ // $_quote = Mage::getModel('sales/quote')->load($_order->getQuoteId());
474
+ // $taxClassId = $_quote->getCustomerTaxClassId();
475
+ // $_taxClass = Mage::getModel('tax/class')->load($taxClassId);
476
+ // $order['moco_customer_tax_class'] = $_taxClass->getClassName();
477
 
478
  if(is_object($_order->getBillingAddress())){
479
  $_billing_address = $_order->getBillingAddress();
646
  $gTE = $this->getRequest()->getParam('gte', 'ALL');
647
 
648
  $_customerCol = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*');
 
649
 
650
  if($since != 'ALL'){
651
  $_customerCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
652
  }
653
 
654
  if($gTE != 'ALL'){
655
+ $_customerCol->addFieldToFilter('entity_id', array('gteq' =>$gTE));
656
+ $_customerCol->getSelect()->limit($page_size, ($offset * $page_size))->order('entity_id');
657
+ }
658
+ else{
659
+ $_customerCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
660
  }
661
 
662
  $customers = array();
787
  $gTE = $this->getRequest()->getParam('gte', 'ALL');
788
 
789
  $_productCol = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
 
790
 
791
  if($since != 'ALL'){
792
  $_productCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
793
  }
794
 
795
  if($gTE != 'ALL'){
796
+ $_productCol->addFieldToFilter('entity_id', array('gteq' =>$gTE));
797
+ $_productCol->getSelect()->limit($page_size, ($offset * $page_size))->order('entity_id');
798
+ }
799
+ else{
800
+ $_productCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
801
  }
802
 
803
  $products[] = array('success' => 'true');
804
 
805
+
806
+ //Mage::log((string) $_productCol->getSelect());
807
+
808
  foreach($_productCol as $_product){
809
 
810
  // get all the custom attributes of the product
app/code/community/MocoInsight/Mocoauto/etc/config.xml CHANGED
@@ -4,7 +4,7 @@
4
  <config>
5
  <modules>
6
  <MocoInsight_Mocoauto>
7
- <version>1.4.4</version>
8
  </MocoInsight_Mocoauto>
9
  </modules>
10
  <global>
4
  <config>
5
  <modules>
6
  <MocoInsight_Mocoauto>
7
+ <version>1.4.5</version>
8
  </MocoInsight_Mocoauto>
9
  </modules>
10
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MocoInsight_Mocoauto</name>
4
- <version>1.4.4</version>
5
  <stability>stable</stability>
6
  <license>OSL v1.0.0</license>
7
  <channel>community</channel>
@@ -11,7 +11,11 @@
11
  &#xD;
12
  &#xD;
13
  </description>
14
- <notes>1.4.4&#xD;
 
 
 
 
15
  &#xD;
16
  Faster unconvertedcarts.&#xD;
17
  CustomerTaxClass added to orders and customer Actions&#xD;
@@ -158,9 +162,9 @@ System date/time&#xD;
158
  added success true for succesful requests&#xD;
159
  changed product category to moco_category</notes>
160
  <authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
161
- <date>2014-09-23</date>
162
- <time>02:11:00</time>
163
- <contents><target name="magecommunity"><dir name="MocoInsight"><dir name="Mocoauto"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Buttons"><file name="Generate.php" hash="7690d026d99e31732279e6aa5b6b1def"/></dir></dir><file name="Menu.php" hash="1017af5f89545915f3f28be637e07a0c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4b53061397fec9446830ef218aba4055"/><file name="JWT.php" hash="6610b92191eccedb8edcf993730c3dc0"/></dir><dir name="Model"><file name="Observer.php" hash="c2cc2f396fedd682268457d17dd045b1"/><dir name="Source"><file name="Views.php" hash="c1ddaf4c7bb51c3907dd72b4e21b1897"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="MocoautoController.php" hash="6665fb22806ef20ee59e88a638ca6359"/></dir><file name="ApiController.php" hash="e980a674f8c75a6c3601a6b330e3c963"/></dir><dir name="etc"><file name="config.xml" hash="a9a3ef7215315d7a94804c0e4ff88228"/><file name="rob.config" hash="63828905cc2f104275d380d0e7f9ebb3"/><file name="system.xml" hash="5d86b7d939b85826c7ac4d4496f80900"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mocoauto.xml" hash="7dd142354c78e773490c552bbcc3b408"/></dir><dir name="template"><dir name="mocoauto"><dir name="config"><file name="button-generate.phtml" hash="d2ff89c8f1f78e748ac998bd13e61750"/><file name="link.phtml" hash="75c61cac6bdd33ed914f8618b5698598"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mocoauto.xml" hash="a12a0e1dc675b9ac675181373299e36a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MocoInsight_Mocoauto.xml" hash="1ec387f21726f6c7ea3ea216c47340d9"/></dir></target><target name="magelocale"><dir name="en_US"><file name="MocoInsight_Mocoauto.csv" hash="9b508561f871f93fa3158014baebf02b"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="mocoauto"><file name="button.png" hash="58e62edb7f4be46e3b29c0bb774c7ad7"/><file name="icon.png" hash="b5bfce535c987d1e9e604823ac4b3943"/><file name="mocoauto.css" hash="3cd28072e5c2f2b656dd04c06288165b"/></dir></dir></dir></dir></target></contents>
164
  <compatible/>
165
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
166
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MocoInsight_Mocoauto</name>
4
+ <version>1.4.5</version>
5
  <stability>stable</stability>
6
  <license>OSL v1.0.0</license>
7
  <channel>community</channel>
11
  &#xD;
12
  &#xD;
13
  </description>
14
+ <notes>1.4.5&#xD;
15
+ &#xD;
16
+ Diagnostic: gte - ordered by entity_id&#xD;
17
+ &#xD;
18
+ 1.4.4&#xD;
19
  &#xD;
20
  Faster unconvertedcarts.&#xD;
21
  CustomerTaxClass added to orders and customer Actions&#xD;
162
  added success true for succesful requests&#xD;
163
  changed product category to moco_category</notes>
164
  <authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
165
+ <date>2014-10-02</date>
166
+ <time>06:40:52</time>
167
+ <contents><target name="magecommunity"><dir name="MocoInsight"><dir name="Mocoauto"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Buttons"><file name="Generate.php" hash="7690d026d99e31732279e6aa5b6b1def"/></dir></dir><file name="Menu.php" hash="1017af5f89545915f3f28be637e07a0c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4b53061397fec9446830ef218aba4055"/><file name="JWT.php" hash="6610b92191eccedb8edcf993730c3dc0"/></dir><dir name="Model"><file name="Observer.php" hash="c2cc2f396fedd682268457d17dd045b1"/><dir name="Source"><file name="Views.php" hash="c1ddaf4c7bb51c3907dd72b4e21b1897"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="MocoautoController.php" hash="6665fb22806ef20ee59e88a638ca6359"/></dir><file name="ApiController.php" hash="47a8fccccae9ce18759790ba86ac8910"/></dir><dir name="etc"><file name="config.xml" hash="1eba07ba933b9d1ab343c2a72a1b14d6"/><file name="rob.config" hash="63828905cc2f104275d380d0e7f9ebb3"/><file name="system.xml" hash="5d86b7d939b85826c7ac4d4496f80900"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mocoauto.xml" hash="7dd142354c78e773490c552bbcc3b408"/></dir><dir name="template"><dir name="mocoauto"><dir name="config"><file name="button-generate.phtml" hash="d2ff89c8f1f78e748ac998bd13e61750"/><file name="link.phtml" hash="75c61cac6bdd33ed914f8618b5698598"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mocoauto.xml" hash="a12a0e1dc675b9ac675181373299e36a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MocoInsight_Mocoauto.xml" hash="1ec387f21726f6c7ea3ea216c47340d9"/></dir></target><target name="magelocale"><dir name="en_US"><file name="MocoInsight_Mocoauto.csv" hash="9b508561f871f93fa3158014baebf02b"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="mocoauto"><file name="button.png" hash="58e62edb7f4be46e3b29c0bb774c7ad7"/><file name="icon.png" hash="b5bfce535c987d1e9e604823ac4b3943"/><file name="mocoauto.css" hash="3cd28072e5c2f2b656dd04c06288165b"/></dir></dir></dir></dir></target></contents>
168
  <compatible/>
169
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
170
  </package>