Version Notes
1.1.1
Download this release
Release Info
Developer | Magento Core Team |
Extension | GoDataFeed |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- app/code/local/GoDataFeed/Services/Model/Catalog/Product/Api.php +29 -29
- app/code/local/GoDataFeed/Services/Model/Sales/Order/Invoice/Api.php +42 -0
- app/code/local/GoDataFeed/Services/Model/Version/Api.php +1 -1
- app/code/local/GoDataFeed/Services/etc/api.xml +34 -0
- app/code/local/GoDataFeed/Services/etc/config.xml +1 -1
- package.xml +5 -5
app/code/local/GoDataFeed/Services/Model/Catalog/Product/Api.php
CHANGED
@@ -19,7 +19,7 @@ class GoDataFeed_Services_Model_Catalog_Product_Api extends Mage_Catalog_Model_P
|
|
19 |
const CATEGORY_SEPARATOR = ' > ';
|
20 |
|
21 |
public function count($filters, $stockQuantityFilterAmount, $store, $responseField)
|
22 |
-
|
23 |
$filteredProductsCollection = $this->getProductsFilteredByStockQuantity(
|
24 |
$filters,
|
25 |
$stockQuantityFilterAmount,
|
@@ -39,7 +39,7 @@ class GoDataFeed_Services_Model_Catalog_Product_Api extends Mage_Catalog_Model_P
|
|
39 |
}
|
40 |
|
41 |
return array($responseField => $numberOfProducts);
|
42 |
-
|
43 |
|
44 |
public function extendedList(
|
45 |
$filters,
|
@@ -62,7 +62,7 @@ class GoDataFeed_Services_Model_Catalog_Product_Api extends Mage_Catalog_Model_P
|
|
62 |
$pageNumber,
|
63 |
$productsPerPage,
|
64 |
$parentSKUConfig)
|
65 |
-
|
66 |
|
67 |
if(empty($store)) {
|
68 |
$baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
@@ -81,18 +81,18 @@ class GoDataFeed_Services_Model_Catalog_Product_Api extends Mage_Catalog_Model_P
|
|
81 |
$absoluteUrlRequested = $absoluteUrlConfig[0];
|
82 |
$absoluteImageUrlRequested = $absoluteImageUrlConfig[0];
|
83 |
$filteredProductsCollection =
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
if(!empty($filteredProductsCollection)) {
|
98 |
|
@@ -140,13 +140,13 @@ class GoDataFeed_Services_Model_Catalog_Product_Api extends Mage_Catalog_Model_P
|
|
140 |
// DESCRIPTION SCRUBBING
|
141 |
if(in_array(self::DESCRIPTION_FIELD, $attributes) && $scrubDescription) {
|
142 |
$resultItem[self::DESCRIPTION_FIELD] =
|
143 |
-
|
144 |
}
|
145 |
|
146 |
// SHORT DESCRIPTION SCRUBBING
|
147 |
if(in_array(self::SHORT_DESCRIPTION_FIELD, $attributes) && $scrubShortDescription) {
|
148 |
$resultItem[self::SHORT_DESCRIPTION_FIELD] =
|
149 |
-
|
150 |
}
|
151 |
|
152 |
// IS IN STOCK & QUANTITY ATTRIBUTES
|
@@ -304,7 +304,7 @@ class GoDataFeed_Services_Model_Catalog_Product_Api extends Mage_Catalog_Model_P
|
|
304 |
}
|
305 |
|
306 |
return $resultItems;
|
307 |
-
|
308 |
|
309 |
private function getProductsFilteredByStockQuantity(
|
310 |
$filters,
|
@@ -321,17 +321,17 @@ class GoDataFeed_Services_Model_Catalog_Product_Api extends Mage_Catalog_Model_P
|
|
321 |
|
322 |
$filteredProductsCollection =
|
323 |
Mage::getModel(self::CATALOG_PRODUCT_MODEL)
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
|
336 |
if (is_array($filters)) {
|
337 |
try {
|
19 |
const CATEGORY_SEPARATOR = ' > ';
|
20 |
|
21 |
public function count($filters, $stockQuantityFilterAmount, $store, $responseField)
|
22 |
+
{
|
23 |
$filteredProductsCollection = $this->getProductsFilteredByStockQuantity(
|
24 |
$filters,
|
25 |
$stockQuantityFilterAmount,
|
39 |
}
|
40 |
|
41 |
return array($responseField => $numberOfProducts);
|
42 |
+
}
|
43 |
|
44 |
public function extendedList(
|
45 |
$filters,
|
62 |
$pageNumber,
|
63 |
$productsPerPage,
|
64 |
$parentSKUConfig)
|
65 |
+
{
|
66 |
|
67 |
if(empty($store)) {
|
68 |
$baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
81 |
$absoluteUrlRequested = $absoluteUrlConfig[0];
|
82 |
$absoluteImageUrlRequested = $absoluteImageUrlConfig[0];
|
83 |
$filteredProductsCollection =
|
84 |
+
$this->getProductsFilteredByStockQuantity(
|
85 |
+
$filters,
|
86 |
+
$stockQuantityFilterAmount,
|
87 |
+
$store,
|
88 |
+
$attributes,
|
89 |
+
$customAttributes,
|
90 |
+
$manufacturerNameRequested,
|
91 |
+
$absoluteUrlRequested,
|
92 |
+
$absoluteImageUrlRequested,
|
93 |
+
$pageNumber,
|
94 |
+
$productsPerPage
|
95 |
+
);
|
96 |
|
97 |
if(!empty($filteredProductsCollection)) {
|
98 |
|
140 |
// DESCRIPTION SCRUBBING
|
141 |
if(in_array(self::DESCRIPTION_FIELD, $attributes) && $scrubDescription) {
|
142 |
$resultItem[self::DESCRIPTION_FIELD] =
|
143 |
+
$this->scrubData($resultItem[self::DESCRIPTION_FIELD]);
|
144 |
}
|
145 |
|
146 |
// SHORT DESCRIPTION SCRUBBING
|
147 |
if(in_array(self::SHORT_DESCRIPTION_FIELD, $attributes) && $scrubShortDescription) {
|
148 |
$resultItem[self::SHORT_DESCRIPTION_FIELD] =
|
149 |
+
$this->scrubData($resultItem[self::SHORT_DESCRIPTION_FIELD]);
|
150 |
}
|
151 |
|
152 |
// IS IN STOCK & QUANTITY ATTRIBUTES
|
304 |
}
|
305 |
|
306 |
return $resultItems;
|
307 |
+
}
|
308 |
|
309 |
private function getProductsFilteredByStockQuantity(
|
310 |
$filters,
|
321 |
|
322 |
$filteredProductsCollection =
|
323 |
Mage::getModel(self::CATALOG_PRODUCT_MODEL)
|
324 |
+
->getCollection()
|
325 |
+
->joinField(
|
326 |
+
'qty',
|
327 |
+
'cataloginventory/stock_item',
|
328 |
+
'qty',
|
329 |
+
'product_id=entity_id',
|
330 |
+
'{{table}}.stock_id=1',
|
331 |
+
'left'
|
332 |
+
)
|
333 |
+
->addAttributeToFilter('qty', array('gteq' => $stockQuantityFilterAmount))
|
334 |
+
->addStoreFilter($store);
|
335 |
|
336 |
if (is_array($filters)) {
|
337 |
try {
|
app/code/local/GoDataFeed/Services/Model/Sales/Order/Invoice/Api.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// DUPLICATED CODE FROM MAGENTO (Mage_Sales_Model_Order_Invoice_Api)
|
3 |
+
// CODE VERSION : 1.4.0.1
|
4 |
+
// Modifications :
|
5 |
+
// - cancel
|
6 |
+
class GoDataFeed_Services_Model_Sales_Order_Invoice_Api extends Mage_Sales_Model_Order_Invoice_Api
|
7 |
+
{
|
8 |
+
// MAGENTO 1.4.0.1 (Mage_Sales_Model_Order_Invoice_Api)
|
9 |
+
// Modifications :
|
10 |
+
// - *1* commented code : override cancellation validation
|
11 |
+
public function customCancel($invoiceIncrementId)
|
12 |
+
{
|
13 |
+
$invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceIncrementId);
|
14 |
+
|
15 |
+
/* @var $invoice Mage_Sales_Model_Order_Invoice */
|
16 |
+
|
17 |
+
if (!$invoice->getId()) {
|
18 |
+
$this->_fault('not_exists');
|
19 |
+
}
|
20 |
+
|
21 |
+
// *1*
|
22 |
+
// if (!$invoice->canCancel()) {
|
23 |
+
// $this->_fault('status_not_changed', Mage::helper('sales')->__('Invoice can not be canceled'));
|
24 |
+
// }
|
25 |
+
// END OF *1*
|
26 |
+
|
27 |
+
try {
|
28 |
+
$invoice->cancel();
|
29 |
+
$invoice->getOrder()->setIsInProcess(true);
|
30 |
+
$transactionSave = Mage::getModel('core/resource_transaction')
|
31 |
+
->addObject($invoice)
|
32 |
+
->addObject($invoice->getOrder())
|
33 |
+
->save();
|
34 |
+
} catch (Mage_Core_Exception $e) {
|
35 |
+
$this->_fault('status_not_changed', $e->getMessage());
|
36 |
+
} catch (Exception $e) {
|
37 |
+
$this->_fault('status_not_changed', Mage::helper('sales')->__('Invoice cancel problem'));
|
38 |
+
}
|
39 |
+
|
40 |
+
return true;
|
41 |
+
}
|
42 |
+
}
|
app/code/local/GoDataFeed/Services/Model/Version/Api.php
CHANGED
@@ -4,6 +4,6 @@ class GoDataFeed_Services_Model_Version_Api
|
|
4 |
{
|
5 |
public function version()
|
6 |
{
|
7 |
-
return "1.1.
|
8 |
}
|
9 |
}
|
4 |
{
|
5 |
public function version()
|
6 |
{
|
7 |
+
return "1.1.1"; // THIS ABSOLUTELY NEEDS TO BE IN SYNC WITH CONFIG.XML
|
8 |
}
|
9 |
}
|
app/code/local/GoDataFeed/Services/etc/api.xml
CHANGED
@@ -266,6 +266,40 @@
|
|
266 |
</faults>
|
267 |
</godatafeed_services_cart_customer>
|
268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
</resources>
|
271 |
</api>
|
266 |
</faults>
|
267 |
</godatafeed_services_cart_customer>
|
268 |
|
269 |
+
<godatafeed_services_sales_order_invoice translate="title" module="services">
|
270 |
+
<title>Invoice API</title>
|
271 |
+
<model>services/sales_order_invoice_api</model>
|
272 |
+
<acl>sales/order/invoice</acl>
|
273 |
+
<methods>
|
274 |
+
<sales_order_invoice_custom_cancel translate="title" module="sales">
|
275 |
+
<title>Cancel invoice</title>
|
276 |
+
<acl>sales/order/invoice/cancel</acl>
|
277 |
+
<method>customCancel</method>
|
278 |
+
</sales_order_invoice_custom_cancel>
|
279 |
+
</methods>
|
280 |
+
<faults module="sales">
|
281 |
+
<not_exists>
|
282 |
+
<code>100</code>
|
283 |
+
<message>Requested shipment not exists.</message>
|
284 |
+
</not_exists>
|
285 |
+
<filters_invalid>
|
286 |
+
<code>101</code>
|
287 |
+
<message>Invalid filters given. Details in error message.</message>
|
288 |
+
</filters_invalid>
|
289 |
+
<data_invalid>
|
290 |
+
<code>102</code>
|
291 |
+
<message>Invalid data given. Details in error message.</message>
|
292 |
+
</data_invalid>
|
293 |
+
<order_not_exists>
|
294 |
+
<code>103</code>
|
295 |
+
<message>Requested order not exists.</message>
|
296 |
+
</order_not_exists>
|
297 |
+
<status_not_changed>
|
298 |
+
<code>104</code>
|
299 |
+
<message>Invoice status not changed</message>
|
300 |
+
</status_not_changed>
|
301 |
+
</faults>
|
302 |
+
</godatafeed_services_sales_order_invoice>
|
303 |
|
304 |
</resources>
|
305 |
</api>
|
app/code/local/GoDataFeed/Services/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<GoDataFeed_Services>
|
5 |
-
<version>1.1.
|
6 |
</GoDataFeed_Services>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<GoDataFeed_Services>
|
5 |
+
<version>1.1.1</version> <!-- THIS ABSOLUTELY NEEDS TO BE IN SYNC WITH Version/Api.php -->
|
6 |
</GoDataFeed_Services>
|
7 |
</modules>
|
8 |
<global>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GoDataFeed</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.godatafeed.com/supportedecommerce.aspx?sp=magento">©GoDataFeed All rights reserved</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>GoDataFeed’s powerful, turn-key datafeed management solution empowers Magento merchants with an affordable and effective way to optimize and automate their datafeed marketing.</summary>
|
10 |
<description>This extension automates product retrieval from Magento while providing enhanced attribute information. Install this extension to streamline your channel feed management with GoDataFeed.</description>
|
11 |
-
<notes>1.1.
|
12 |
<authors><author><name>GoDataFeedSupport</name><user>auto-converted</user><email>support@godatafeed.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="GoDataFeed"><dir name="Services"><dir name="Helper"><file name="Data.php" hash="fbbbbac77dc06cc167e5ab2d3bd69263"/></dir><dir name="Model"><dir name="Api"><dir name="Resource"><dir name="Checkout"><file name="Product.php" hash="d03cd3c306e6b940c9d37ef780d76979"/></dir><file name="Checkout.php" hash="4f689b0150a47625e9b1912a50f99009"/><file name="Customer.php" hash="f9e722373eccc42a1ab5d1d1df8f62b4"/></dir></dir><dir name="Cart"><dir name="Customer"><file name="Api.php" hash="79f65194334c0263b2b87f18c7642be4"/></dir><dir name="Payment"><file name="Api.php" hash="2251058e3f468f02b8f25cbb7a2603f5"/></dir><dir name="Product"><file name="Api.php" hash="b1ad852e70fb70604011ccf61ca9a28b"/></dir><file name="Api.php" hash="858c1d1ec6ac2daeca1b5c94855bb7fd"/></dir><dir name="Catalog"><dir name="Product"><file name="Api.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GoDataFeed</name>
|
4 |
+
<version>1.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.godatafeed.com/supportedecommerce.aspx?sp=magento">©GoDataFeed All rights reserved</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>GoDataFeed’s powerful, turn-key datafeed management solution empowers Magento merchants with an affordable and effective way to optimize and automate their datafeed marketing.</summary>
|
10 |
<description>This extension automates product retrieval from Magento while providing enhanced attribute information. Install this extension to streamline your channel feed management with GoDataFeed.</description>
|
11 |
+
<notes>1.1.1</notes>
|
12 |
<authors><author><name>GoDataFeedSupport</name><user>auto-converted</user><email>support@godatafeed.com</email></author></authors>
|
13 |
+
<date>2013-01-13</date>
|
14 |
+
<time>22:30:51</time>
|
15 |
+
<contents><target name="magelocal"><dir name="GoDataFeed"><dir name="Services"><dir name="Helper"><file name="Data.php" hash="fbbbbac77dc06cc167e5ab2d3bd69263"/></dir><dir name="Model"><dir name="Api"><dir name="Resource"><dir name="Checkout"><file name="Product.php" hash="d03cd3c306e6b940c9d37ef780d76979"/></dir><file name="Checkout.php" hash="4f689b0150a47625e9b1912a50f99009"/><file name="Customer.php" hash="f9e722373eccc42a1ab5d1d1df8f62b4"/></dir></dir><dir name="Cart"><dir name="Customer"><file name="Api.php" hash="79f65194334c0263b2b87f18c7642be4"/></dir><dir name="Payment"><file name="Api.php" hash="2251058e3f468f02b8f25cbb7a2603f5"/></dir><dir name="Product"><file name="Api.php" hash="b1ad852e70fb70604011ccf61ca9a28b"/></dir><file name="Api.php" hash="858c1d1ec6ac2daeca1b5c94855bb7fd"/></dir><dir name="Catalog"><dir name="Product"><file name="Api.php" hash="5214ea2edf4695e9e502e6fb40b1ce66"/></dir></dir><dir name="Method"><file name="OrderSync.php" hash="9a60ed4e0758255ada4b3a7e53f275f1"/></dir><dir name="Order"><file name="Payment.php" hash="b37fa553313e2ac70fa661c9bf3108c7"/></dir><dir name="Quote"><file name="Payment.php" hash="eac432f14ee163b3f3b04a0ef574853d"/></dir><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Api.php" hash="e1336ad995a06b739faf922b5a6781c0"/></dir></dir></dir><dir name="Service"><file name="Quote.php" hash="e480ad4fc4d4493ddbfb0b6f29ecf8a7"/></dir><dir name="Version"><file name="Api.php" hash="6da823bf3db1fc251177c05735651754"/></dir><file name="Quote.php" hash="5474009133786a34b088c15c29309cef"/></dir><dir name="etc"><file name="api.xml" hash="63591e3dabe52d451047567197ffb599"/><file name="config.xml" hash="cbf6836ad09dd97ef0c5359a1c60f507"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GoDataFeed_Services.xml" hash="e2f0d059f7dcd4ed86519c397bb9c310"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|