Version Notes
1.5.1.4
Fixed problem with empty unconvertedcarts
1.5.1.3
test_unconvertedcartsAction.
1.5.1.2
Avoid exception if unconvertedcarts product type
fails.
1.5.1.1
Check if Mage::getEdition(); exists before calling.
1.5.1.0
Updates to visits API
1.5.0.6
Updates to visits API
1.5.0.5
New
creditsAction
credit_idsAction
1.5.0.4
Added item id to wishlist items
1.5.0.3
Diagnostic routine for unconverted carts
1.5.0.2
Maintenance release.
1.5.0.0
OrdersNoPaymentAction for sites with non standard payment methods.
1.4.9
Exception handle for payment method.
Updated wishlistsAction
New product_IdsAction
New customer_IdsAction
New order_IdsAction
unconvertedcarts fix for Magento < 1.7
1.4.7
Support for multiple web sites on single Magento instance.
1.4.6
Test actions for multi web site catalog.
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
Release Info
Developer | Rob Davies |
Extension | MocoInsight_Mocoauto |
Version | 1.5.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.5.1.1 to 1.5.1.4
@@ -33,7 +33,7 @@
|
|
33 |
// sql_anytableAction()
|
34 |
|
35 |
|
36 |
-
define("apiversion","1.5.1.
|
37 |
|
38 |
class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Action
|
39 |
{
|
@@ -1476,7 +1476,7 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
1476 |
return $this;
|
1477 |
}
|
1478 |
|
1479 |
-
public function
|
1480 |
{
|
1481 |
if(!$this->_authorise()) {
|
1482 |
return $this;
|
@@ -1599,7 +1599,8 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
1599 |
->setHeader('Content-type', 'application/json', true);
|
1600 |
return $this;
|
1601 |
}
|
1602 |
-
|
|
|
1603 |
{
|
1604 |
if(!$this->_authorise()) {
|
1605 |
return $this;
|
@@ -1612,15 +1613,15 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
1612 |
$since = $this->getRequest()->getParam('since', 'ALL');
|
1613 |
$gTE = $this->getRequest()->getParam('gte', 'ALL');
|
1614 |
|
|
|
|
|
1615 |
$_cartsCol = Mage::getResourceModel('sales/quote_collection')->addFieldToFilter('is_active', '1'); // 1 = quote has not been conveted to an order
|
1616 |
|
1617 |
$magentoVersion = Mage::getVersion();
|
1618 |
if (version_compare($magentoVersion, '1.7', '>=')){
|
1619 |
-
//Mage::log("Version is above check");
|
1620 |
$aboveVersion17Flag = 1;
|
1621 |
}
|
1622 |
else {
|
1623 |
-
//Mage::log("Version is below check");
|
1624 |
$aboveVersion17Flag = 0;
|
1625 |
}
|
1626 |
|
@@ -1638,10 +1639,10 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
1638 |
}
|
1639 |
|
1640 |
if($since != 'ALL'){
|
1641 |
-
$_cartsCol->addFieldToFilter('updated_at', array('gteq' =>$since)); // If
|
1642 |
}
|
1643 |
else{
|
1644 |
-
|
1645 |
}
|
1646 |
|
1647 |
// If using gte we want to sort by entity id
|
@@ -1725,66 +1726,6 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
1725 |
return $this;
|
1726 |
}
|
1727 |
|
1728 |
-
|
1729 |
-
public function ex_unconvertedcartsAction()//This query returns only no empty carts when no dat filter applied
|
1730 |
-
{
|
1731 |
-
if(!$this->_authorise()) {
|
1732 |
-
return $this;
|
1733 |
-
}
|
1734 |
-
|
1735 |
-
$sections = explode('/', trim($this->getRequest()->getPathInfo(), '/'));
|
1736 |
-
|
1737 |
-
$offset = $this->getRequest()->getParam('offset', 0);
|
1738 |
-
$page_size = $this->getRequest()->getParam('page_size', 20);
|
1739 |
-
$since = $this->getRequest()->getParam('since', 'ALL');
|
1740 |
-
$entityId = $this->getRequest()->getParam('entity_id', 'ALL');
|
1741 |
-
|
1742 |
-
$_cartsCol = Mage::getResourceModel('sales/quote_collection')->addFieldToFilter('is_active', '1');
|
1743 |
-
$_cartsCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
|
1744 |
-
|
1745 |
-
if($since != 'ALL'){
|
1746 |
-
$_cartsCol->addFieldToFilter('updated_at', array('gteq' =>$since));
|
1747 |
-
}
|
1748 |
-
else{
|
1749 |
-
$_cartsCol->addFieldToFilter('items_count', array('neq' => 0));
|
1750 |
-
}
|
1751 |
-
|
1752 |
-
if($entityId != 'ALL'){
|
1753 |
-
$_cartsCol->addFieldToFilter('entity_id', $entityId);
|
1754 |
-
}
|
1755 |
-
|
1756 |
-
//Mage::log((string) $_cartsCol->getSelect());
|
1757 |
-
|
1758 |
-
$carts = array();
|
1759 |
-
|
1760 |
-
foreach($_cartsCol as $_cart) {
|
1761 |
-
try {
|
1762 |
-
$carts[] = array('moco_start_of_cart_record' => 'True');
|
1763 |
-
$carts[] = $_cart->toArray();
|
1764 |
-
$_cartItemsCol = $_cart -> getItemsCollection();
|
1765 |
-
|
1766 |
-
foreach($_cartItemsCol as $_cartitem){
|
1767 |
-
$carts[] = array('product_id' => $_cartitem->getProductId());
|
1768 |
-
$carts[] = array('product_sku' => $_cartitem->getSku());
|
1769 |
-
$carts[] = array('product_qty' => $_cartitem->getQty());
|
1770 |
-
$carts[] = array('updated_at' => $_cartitem->getUpdatedAt());
|
1771 |
-
$carts[] = array('product_type' => $_cartitem->getProductType());
|
1772 |
-
//$carts[] = $_cartitem->toArray();
|
1773 |
-
}
|
1774 |
-
$carts[] = array('moco_end_of_cart_record' => 'True');
|
1775 |
-
}
|
1776 |
-
catch(Exception $e) {
|
1777 |
-
$carts[] = array('mocoauto_api_error' => 'moco_unable_to_read_cart: ' . $e->getMessage());
|
1778 |
-
}
|
1779 |
-
}
|
1780 |
-
|
1781 |
-
$this->getResponse()
|
1782 |
-
->setBody(json_encode($carts))
|
1783 |
-
->setHttpResponseCode(200)
|
1784 |
-
->setHeader('Content-type', 'application/json', true);
|
1785 |
-
return $this;
|
1786 |
-
}
|
1787 |
-
|
1788 |
public function wishlistsAction()
|
1789 |
{
|
1790 |
if(!$this->_authorise()) {
|
33 |
// sql_anytableAction()
|
34 |
|
35 |
|
36 |
+
define("apiversion","1.5.1.4");
|
37 |
|
38 |
class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Action
|
39 |
{
|
1476 |
return $this;
|
1477 |
}
|
1478 |
|
1479 |
+
public function ex_unconvertedcartsAction()
|
1480 |
{
|
1481 |
if(!$this->_authorise()) {
|
1482 |
return $this;
|
1599 |
->setHeader('Content-type', 'application/json', true);
|
1600 |
return $this;
|
1601 |
}
|
1602 |
+
|
1603 |
+
public function unconvertedcartsAction()
|
1604 |
{
|
1605 |
if(!$this->_authorise()) {
|
1606 |
return $this;
|
1613 |
$since = $this->getRequest()->getParam('since', 'ALL');
|
1614 |
$gTE = $this->getRequest()->getParam('gte', 'ALL');
|
1615 |
|
1616 |
+
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); // set to admin view all sites and stores
|
1617 |
+
|
1618 |
$_cartsCol = Mage::getResourceModel('sales/quote_collection')->addFieldToFilter('is_active', '1'); // 1 = quote has not been conveted to an order
|
1619 |
|
1620 |
$magentoVersion = Mage::getVersion();
|
1621 |
if (version_compare($magentoVersion, '1.7', '>=')){
|
|
|
1622 |
$aboveVersion17Flag = 1;
|
1623 |
}
|
1624 |
else {
|
|
|
1625 |
$aboveVersion17Flag = 0;
|
1626 |
}
|
1627 |
|
1639 |
}
|
1640 |
|
1641 |
if($since != 'ALL'){
|
1642 |
+
$_cartsCol->addFieldToFilter('updated_at', array('gteq' =>$since)); // If date filter supplied include empty carts
|
1643 |
}
|
1644 |
else{
|
1645 |
+
$_cartsCol->addFieldToFilter('items_count', array('neq' => 0)); // If no date filter supplied (ALL) only include carts with items
|
1646 |
}
|
1647 |
|
1648 |
// If using gte we want to sort by entity id
|
1726 |
return $this;
|
1727 |
}
|
1728 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1729 |
public function wishlistsAction()
|
1730 |
{
|
1731 |
if(!$this->_authorise()) {
|
@@ -4,7 +4,7 @@
|
|
4 |
<config>
|
5 |
<modules>
|
6 |
<MocoInsight_Mocoauto>
|
7 |
-
<version>1.5.1.
|
8 |
</MocoInsight_Mocoauto>
|
9 |
</modules>
|
10 |
<global>
|
4 |
<config>
|
5 |
<modules>
|
6 |
<MocoInsight_Mocoauto>
|
7 |
+
<version>1.5.1.4</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.5.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v1.0.0</license>
|
7 |
<channel>community</channel>
|
@@ -11,7 +11,20 @@
|
|
11 |

|
12 |

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

|
16 |
Check if Mage::getEdition(); exists before calling.
|
17 |

|
@@ -213,9 +226,9 @@ System date/time
|
|
213 |
added success true for succesful requests
|
214 |
changed product category to moco_category</notes>
|
215 |
<authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
|
216 |
-
<date>2015-
|
217 |
-
<time>
|
218 |
-
<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="Api2OrdersController.php" hash="b9fa4922f70212b8b0fbf5ccc12a3e5b"/><file name="ApiController.php" hash="
|
219 |
<compatible/>
|
220 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
221 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MocoInsight_Mocoauto</name>
|
4 |
+
<version>1.5.1.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v1.0.0</license>
|
7 |
<channel>community</channel>
|
11 |

|
12 |

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

|
16 |
+
Fixed problem with empty unconvertedcarts 
|
17 |
+

|
18 |
+
1.5.1.3
|
19 |
+

|
20 |
+
test_unconvertedcartsAction.
|
21 |
+

|
22 |
+
1.5.1.2
|
23 |
+

|
24 |
+
Avoid exception if unconvertedcarts product type 
|
25 |
+
fails.
|
26 |
+

|
27 |
+
1.5.1.1
|
28 |

|
29 |
Check if Mage::getEdition(); exists before calling.
|
30 |

|
226 |
added success true for succesful requests
|
227 |
changed product category to moco_category</notes>
|
228 |
<authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
|
229 |
+
<date>2015-04-01</date>
|
230 |
+
<time>23:55:14</time>
|
231 |
+
<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="Api2OrdersController.php" hash="b9fa4922f70212b8b0fbf5ccc12a3e5b"/><file name="ApiController.php" hash="1fce0ddf74a94f25b4276c9b8739d12e"/></dir><dir name="etc"><file name="config.xml" hash="56c568c61d3a50587e4842943df67154"/><file name="orig.config.xml" hash="863bd2bdfefde5ef9f6c9b30691f4bb4"/><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>
|
232 |
<compatible/>
|
233 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
234 |
</package>
|