Version Notes
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
Release Info
| Developer | Rob Davies |
| Extension | MocoInsight_Mocoauto |
| Version | 1.3.7 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3.5 to 1.3.7
|
@@ -422,6 +422,77 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
| 422 |
|
| 423 |
$orders = array();
|
| 424 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 425 |
foreach($_orderCol as $_order) {
|
| 426 |
$orders[] = $_order->toArray();
|
| 427 |
|
|
@@ -569,6 +640,18 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
| 569 |
$products[] = array('moco_category' => $category->getID());
|
| 570 |
}
|
| 571 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 572 |
|
| 573 |
// if type is configurable get simple product children
|
| 574 |
|
|
@@ -588,7 +671,7 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
| 588 |
$groupedProducts = $_product->getTypeInstance(true)->getAssociatedProducts($_product);
|
| 589 |
|
| 590 |
foreach($groupedProducts as $groupedProduct){
|
| 591 |
-
$products[] = array('
|
| 592 |
|
| 593 |
}
|
| 594 |
}
|
|
@@ -1096,8 +1179,11 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
| 1096 |
|
| 1097 |
foreach($_cartItemsCol as $_cartitem){
|
| 1098 |
$carts[] = array('product_id' => $_cartitem->getProductId());
|
|
|
|
| 1099 |
$carts[] = array('product_qty' => $_cartitem->getQty());
|
| 1100 |
$carts[] = array('updated_at' => $_cartitem->getUpdatedAt());
|
|
|
|
|
|
|
| 1101 |
}
|
| 1102 |
$carts[] = array('moco_end_of_cart_record' => 'True');
|
| 1103 |
}
|
| 422 |
|
| 423 |
$orders = array();
|
| 424 |
|
| 425 |
+
foreach($_orderCol as $_order) {
|
| 426 |
+
|
| 427 |
+
try{
|
| 428 |
+
$orders[] = array('moco_start_of_order_record' => 'True');
|
| 429 |
+
$orders[] = $_order->toArray();
|
| 430 |
+
|
| 431 |
+
if(is_object($_order->getBillingAddress())){
|
| 432 |
+
|
| 433 |
+
$_billing_address = $_order->getBillingAddress();
|
| 434 |
+
$orders[] = array('moco_start_of_address' => 'True');
|
| 435 |
+
$orders[] = $_billing_address->toArray();
|
| 436 |
+
$orders[] = array('moco_end_of_address' => 'True');
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
try{
|
| 440 |
+
$_payment_info = $_order->getPayment();
|
| 441 |
+
$orders[] = array('moco_start_of_paymentinfo' => 'True');
|
| 442 |
+
$paymentinfo[] = $_payment_info->toArray();
|
| 443 |
+
foreach($paymentinfo as $key => $value){
|
| 444 |
+
unset($paymentinfo[$key]['cc_number_enc']);
|
| 445 |
+
unset($paymentinfo[$key]['cc_last4']);
|
| 446 |
+
unset($paymentinfo[$key]['cc_exp_month']);
|
| 447 |
+
unset($paymentinfo[$key]['cc_exp_year']);
|
| 448 |
+
}
|
| 449 |
+
$orders[] = array($paymentinfo);
|
| 450 |
+
|
| 451 |
+
$orders[] = array('moco_end_of_paymentinfo' => 'True');
|
| 452 |
+
}
|
| 453 |
+
catch (Exception $e) {
|
| 454 |
+
$orders[] = array('billing info' => 'Mocoauto_error: ' . $e->getMessage());
|
| 455 |
+
}
|
| 456 |
+
$_orderItemsCol = $_order->getItemsCollection();
|
| 457 |
+
|
| 458 |
+
foreach($_orderItemsCol as $_orderitem){
|
| 459 |
+
$orders[] = $_orderitem->toArray();
|
| 460 |
+
}
|
| 461 |
+
$orders[] = array('moco_end_of_order_record' => 'True');
|
| 462 |
+
}
|
| 463 |
+
catch (Exception $e) {
|
| 464 |
+
$orders[] = array('order record' => 'Mocoauto_error: ' . $e->getMessage());
|
| 465 |
+
}
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
$this->getResponse()
|
| 469 |
+
->setBody(json_encode($orders))
|
| 470 |
+
->setHttpResponseCode(200)
|
| 471 |
+
->setHeader('Content-type', 'application/json', true);
|
| 472 |
+
return $this;
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
public function exordersAction()
|
| 476 |
+
{
|
| 477 |
+
if(!$this->_authorise()) {
|
| 478 |
+
return $this;
|
| 479 |
+
}
|
| 480 |
+
|
| 481 |
+
$sections = explode('/', trim($this->getRequest()->getPathInfo(), '/'));
|
| 482 |
+
|
| 483 |
+
$offset = $this->getRequest()->getParam('offset', 0);
|
| 484 |
+
$page_size = $this->getRequest()->getParam('page_size', 20);
|
| 485 |
+
$since = $this->getRequest()->getParam('since','All');
|
| 486 |
+
|
| 487 |
+
$_orderCol = Mage::getModel('sales/order')->getCollection()->addAttributeToSelect('*');
|
| 488 |
+
$_orderCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
|
| 489 |
+
|
| 490 |
+
if($since != 'All'){
|
| 491 |
+
$_orderCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
$orders = array();
|
| 495 |
+
|
| 496 |
foreach($_orderCol as $_order) {
|
| 497 |
$orders[] = $_order->toArray();
|
| 498 |
|
| 640 |
$products[] = array('moco_category' => $category->getID());
|
| 641 |
}
|
| 642 |
|
| 643 |
+
// get inventory information
|
| 644 |
+
|
| 645 |
+
try{
|
| 646 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);
|
| 647 |
+
|
| 648 |
+
$products[] = array('stock_managed' => $stock->getManageStock());
|
| 649 |
+
$products[] = array('stock_availability' => $stock->getIsInStock());
|
| 650 |
+
}
|
| 651 |
+
catch (Exception $e) {
|
| 652 |
+
$products[] = array('moco_product_inventory' => 'Mocoauto_error: ' . $e->getMessage());
|
| 653 |
+
}
|
| 654 |
+
|
| 655 |
|
| 656 |
// if type is configurable get simple product children
|
| 657 |
|
| 671 |
$groupedProducts = $_product->getTypeInstance(true)->getAssociatedProducts($_product);
|
| 672 |
|
| 673 |
foreach($groupedProducts as $groupedProduct){
|
| 674 |
+
$products[] = array('childProductID' => $groupedProduct->getID());
|
| 675 |
|
| 676 |
}
|
| 677 |
}
|
| 1179 |
|
| 1180 |
foreach($_cartItemsCol as $_cartitem){
|
| 1181 |
$carts[] = array('product_id' => $_cartitem->getProductId());
|
| 1182 |
+
$carts[] = array('product_sku' => $_cartitem->getSku());
|
| 1183 |
$carts[] = array('product_qty' => $_cartitem->getQty());
|
| 1184 |
$carts[] = array('updated_at' => $_cartitem->getUpdatedAt());
|
| 1185 |
+
$carts[] = array('product_type' => $_cartitem->getProductType());
|
| 1186 |
+
//$carts[] = $_cartitem->toArray();
|
| 1187 |
}
|
| 1188 |
$carts[] = array('moco_end_of_cart_record' => 'True');
|
| 1189 |
}
|
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<config>
|
| 5 |
<modules>
|
| 6 |
<MocoInsight_Mocoauto>
|
| 7 |
-
<version>1.3.
|
| 8 |
</MocoInsight_Mocoauto>
|
| 9 |
</modules>
|
| 10 |
<global>
|
| 4 |
<config>
|
| 5 |
<modules>
|
| 6 |
<MocoInsight_Mocoauto>
|
| 7 |
+
<version>1.3.7</version>
|
| 8 |
</MocoInsight_Mocoauto>
|
| 9 |
</modules>
|
| 10 |
<global>
|
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>MocoInsight_Mocoauto</name>
|
| 4 |
-
<version>1.3.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL v1.0.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -11,7 +11,12 @@
|
|
| 11 |

|
| 12 |

|
| 13 |
</description>
|
| 14 |
-
<notes>1.3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |

|
| 16 |
Faster uncovertedcarts
|
| 17 |

|
|
@@ -131,9 +136,9 @@ System date/time
|
|
| 131 |
added success true for succesful requests
|
| 132 |
changed product category to moco_category</notes>
|
| 133 |
<authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
|
| 134 |
-
<date>2014-05-
|
| 135 |
-
<time>
|
| 136 |
-
<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="
|
| 137 |
<compatible/>
|
| 138 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 139 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>MocoInsight_Mocoauto</name>
|
| 4 |
+
<version>1.3.7</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL v1.0.0</license>
|
| 7 |
<channel>community</channel>
|
| 11 |

|
| 12 |

|
| 13 |
</description>
|
| 14 |
+
<notes>1.3.7
|
| 15 |
+

|
| 16 |
+
Added non sensitive payment info to orderAction
|
| 17 |
+

|
| 18 |
+
---------------------------------------------------
|
| 19 |
+
1.3.5
|
| 20 |

|
| 21 |
Faster uncovertedcarts
|
| 22 |

|
| 136 |
added success true for succesful requests
|
| 137 |
changed product category to moco_category</notes>
|
| 138 |
<authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
|
| 139 |
+
<date>2014-05-15</date>
|
| 140 |
+
<time>08:36:01</time>
|
| 141 |
+
<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="be4d73da4891013ca80bd29b38878b7c"/></dir><dir name="etc"><file name="config.xml" hash="9ccf1572cfa22d0cb77589a47e0610e0"/><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>
|
| 142 |
<compatible/>
|
| 143 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 144 |
</package>
|
