Version Notes
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.2.9 |
Comparing to | |
See all releases |
Code changes from version 1.2.7 to 1.2.9
Binary file
|
@@ -323,7 +323,10 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
323 |
|
324 |
$_categoryCol = Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('*');
|
325 |
$_categoryCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
|
326 |
-
|
|
|
|
|
|
|
327 |
|
328 |
$categories = array();
|
329 |
|
@@ -358,6 +361,11 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
358 |
$_productCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
|
359 |
}
|
360 |
|
|
|
|
|
|
|
|
|
|
|
361 |
|
362 |
$products = array();
|
363 |
$products[] = array('success' => 'true');
|
@@ -388,6 +396,20 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
388 |
}
|
389 |
|
390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
// get all the categories of the product
|
392 |
|
393 |
|
@@ -664,18 +686,18 @@ class MocoInsight_Mocoauto_ApiController extends Mage_Core_Controller_Front_Acti
|
|
664 |
|
665 |
foreach (Mage::app()->getWebsites() as $_website) {
|
666 |
foreach ($_website->getGroups() as $group) {
|
667 |
-
$stores[] = array($_website->getName() => $_website->getId());
|
668 |
$_stores = $group->getStores();
|
669 |
foreach ($_stores as $_store) {
|
670 |
|
671 |
-
$
|
672 |
-
|
|
|
|
|
673 |
}
|
674 |
}
|
675 |
}
|
676 |
|
677 |
-
|
678 |
-
|
679 |
$this->getResponse()
|
680 |
->setBody(json_encode($stores))
|
681 |
->setHttpResponseCode(200)
|
323 |
|
324 |
$_categoryCol = Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('*');
|
325 |
$_categoryCol->getSelect()->limit($page_size, ($offset * $page_size))->order('updated_at');
|
326 |
+
|
327 |
+
if($since != 'All'){
|
328 |
+
$_categoryCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
|
329 |
+
}
|
330 |
|
331 |
$categories = array();
|
332 |
|
361 |
$_productCol->addAttributeToFilter('updated_at', array('gteq' =>$since));
|
362 |
}
|
363 |
|
364 |
+
// Grab an array of tax rates for lookup later
|
365 |
+
|
366 |
+
//$taxClasses = Mage::helper("core")->jsonDecode( Mage::helper("tax")->getAllRatesByProductClass() );
|
367 |
+
$store = Mage::app()->getStore('default');
|
368 |
+
$request = Mage::getSingleton('tax/calculation')->getRateRequest(null, null, null, $store);
|
369 |
|
370 |
$products = array();
|
371 |
$products[] = array('success' => 'true');
|
396 |
}
|
397 |
|
398 |
|
399 |
+
// get the tax rate of the product
|
400 |
+
|
401 |
+
|
402 |
+
$taxclassid = $_product->getData('tax_class_id');
|
403 |
+
if(isset($taxClasses["value_".$taxclassid])){
|
404 |
+
$taxpercent = $taxClasses["value_".$taxclassid];
|
405 |
+
} else {
|
406 |
+
$taxpercent = 'not defined';
|
407 |
+
}
|
408 |
+
|
409 |
+
$taxpercent = Mage::getSingleton('tax/calculation')->getRate($request->setProductClassId($taxclassid));
|
410 |
+
$products[] = array('moco_TaxRate:' => $taxpercent);
|
411 |
+
|
412 |
+
|
413 |
// get all the categories of the product
|
414 |
|
415 |
|
686 |
|
687 |
foreach (Mage::app()->getWebsites() as $_website) {
|
688 |
foreach ($_website->getGroups() as $group) {
|
689 |
+
$stores[] = array('website name' => $_website->getName(), 'website Id' => $_website->getId());
|
690 |
$_stores = $group->getStores();
|
691 |
foreach ($_stores as $_store) {
|
692 |
|
693 |
+
$storeInfo = $_store->toArray();
|
694 |
+
$storeInfo['tax/calculation/price_includes_tax'] = Mage::getStoreConfig('tax/calculation/price_includes_tax', $_store->getStoreId());
|
695 |
+
$storeInfo['tax/defaults/country'] = Mage::getStoreConfig('tax/defaults/country', $_store->getStoreId());
|
696 |
+
$stores[] = $storeInfo;
|
697 |
}
|
698 |
}
|
699 |
}
|
700 |
|
|
|
|
|
701 |
$this->getResponse()
|
702 |
->setBody(json_encode($stores))
|
703 |
->setHttpResponseCode(200)
|
@@ -4,7 +4,7 @@
|
|
4 |
<config>
|
5 |
<modules>
|
6 |
<MocoInsight_Mocoauto>
|
7 |
-
<version>1.2.
|
8 |
</MocoInsight_Mocoauto>
|
9 |
</modules>
|
10 |
<global>
|
4 |
<config>
|
5 |
<modules>
|
6 |
<MocoInsight_Mocoauto>
|
7 |
+
<version>1.2.9</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.2.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v1.0.0</license>
|
7 |
<channel>community</channel>
|
@@ -11,7 +11,15 @@
|
|
11 |

|
12 |

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

|
16 |
log stats function calculates using direct SQL
|
17 |

|
@@ -87,9 +95,9 @@ System date/time
|
|
87 |
added success true for succesful requests
|
88 |
changed product category to moco_category</notes>
|
89 |
<authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
|
90 |
-
<date>2014-
|
91 |
-
<time>
|
92 |
-
<contents><target name="magecommunity"><dir name="MocoInsight"><dir name="Mocoauto"><dir
|
93 |
<compatible/>
|
94 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
95 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MocoInsight_Mocoauto</name>
|
4 |
+
<version>1.2.9</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v1.0.0</license>
|
7 |
<channel>community</channel>
|
11 |

|
12 |

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

|
16 |
+
Default tax rate fro products returned with producAction
|
17 |
+
---------------------------------------------------------
|
18 |
+
1.2.8
|
19 |
+

|
20 |
+
storesAction now returns store config data
|
21 |
+
----------------------------------------------------------
|
22 |
+
1.2.7
|
23 |

|
24 |
log stats function calculates using direct SQL
|
25 |

|
95 |
added success true for succesful requests
|
96 |
changed product category to moco_category</notes>
|
97 |
<authors><author><name>Rob Davies</name><user>mocoinsight</user><email>rob.davies@mocoinsight.com</email></author></authors>
|
98 |
+
<date>2014-03-25</date>
|
99 |
+
<time>02:56:07</time>
|
100 |
+
<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="5711d1342cb1b7484b86ef93559262f6"/></dir><dir name="etc"><file name="config.xml" hash="84bd43a55b57471a2604989fc2b3cd10"/><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>
|
101 |
<compatible/>
|
102 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
103 |
</package>
|