Version Notes
- Add the quantity to the exported data
Download this release
Release Info
Developer | Digital Pianism |
Extension | DigitalPianism_ProductExport |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
app/code/community/DigitalPianism/ProductExport/Test/Config/Main.php
CHANGED
@@ -12,7 +12,7 @@ class DigitalPianism_ProductExport_Test_Config_Main extends EcomDev_PHPUnit_Test
|
|
12 |
{
|
13 |
// Testing configuration
|
14 |
$this->assertModuleCodePool('local');
|
15 |
-
$this->assertModuleVersion("1.3.
|
16 |
$this->assertModuleDepends('Mage_Adminhtml');
|
17 |
}
|
18 |
|
12 |
{
|
13 |
// Testing configuration
|
14 |
$this->assertModuleCodePool('local');
|
15 |
+
$this->assertModuleVersion("1.3.1");
|
16 |
$this->assertModuleDepends('Mage_Adminhtml');
|
17 |
}
|
18 |
|
app/code/community/DigitalPianism/ProductExport/controllers/Adminhtml/ProductexportController.php
CHANGED
@@ -22,7 +22,7 @@ class DigitalPianism_ProductExport_Adminhtml_ProductexportController extends Mag
|
|
22 |
}
|
23 |
else {
|
24 |
//write headers to the csv file
|
25 |
-
$content = "id,name,url,sku,price,special_price,description,short_description,main_image\n";
|
26 |
try {
|
27 |
|
28 |
$collection = Mage::getResourceModel('catalog/product_collection')
|
@@ -31,6 +31,15 @@ class DigitalPianism_ProductExport_Adminhtml_ProductexportController extends Mag
|
|
31 |
->addAttributeToSelect('sku')
|
32 |
->addAttributeToSelect('product_url');
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
if ($store->getId()) {
|
35 |
$collection->addStoreFilter($store);
|
36 |
$collection->joinAttribute(
|
@@ -91,7 +100,7 @@ class DigitalPianism_ProductExport_Adminhtml_ProductexportController extends Mag
|
|
91 |
} else {
|
92 |
$productImage = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage());
|
93 |
}
|
94 |
-
$content .= "\"{$product->getId()}\",\"{$product->getName()}\",\"{$product->setStoreId($store->getId())->getProductUrl()}\",\"{$product->getSku()}\",\"{$product->getPrice()}\",\"{$product->getSpecialPrice()}\",\"{$product->getDescription()}\",\"{$product->getShortDescription()}\",\"{$productImage}\"\n";
|
95 |
}
|
96 |
} catch (Exception $e) {
|
97 |
$this->_getSession()->addError($e->getMessage());
|
22 |
}
|
23 |
else {
|
24 |
//write headers to the csv file
|
25 |
+
$content = "id,name,url,sku,price,special_price,description,short_description,main_image,qty\n";
|
26 |
try {
|
27 |
|
28 |
$collection = Mage::getResourceModel('catalog/product_collection')
|
31 |
->addAttributeToSelect('sku')
|
32 |
->addAttributeToSelect('product_url');
|
33 |
|
34 |
+
if (Mage::helper('catalog')->isModuleEnabled('Mage_CatalogInventory')) {
|
35 |
+
$collection->joinField('qty',
|
36 |
+
'cataloginventory/stock_item',
|
37 |
+
'qty',
|
38 |
+
'product_id=entity_id',
|
39 |
+
'{{table}}.stock_id=1',
|
40 |
+
'left');
|
41 |
+
}
|
42 |
+
|
43 |
if ($store->getId()) {
|
44 |
$collection->addStoreFilter($store);
|
45 |
$collection->joinAttribute(
|
100 |
} else {
|
101 |
$productImage = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage());
|
102 |
}
|
103 |
+
$content .= "\"{$product->getId()}\",\"{$product->getName()}\",\"{$product->setStoreId($store->getId())->getProductUrl()}\",\"{$product->getSku()}\",\"{$product->getPrice()}\",\"{$product->getSpecialPrice()}\",\"{$product->getDescription()}\",\"{$product->getShortDescription()}\",\"{$productImage}\",\"{$product->getQty()}\"\n";
|
104 |
}
|
105 |
} catch (Exception $e) {
|
106 |
$this->_getSession()->addError($e->getMessage());
|
app/code/community/DigitalPianism/ProductExport/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<DigitalPianism_ProductExport>
|
5 |
-
<version>1.3.
|
6 |
</DigitalPianism_ProductExport>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<DigitalPianism_ProductExport>
|
5 |
+
<version>1.3.1</version>
|
6 |
</DigitalPianism_ProductExport>
|
7 |
</modules>
|
8 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DigitalPianism_ProductExport</name>
|
4 |
-
<version>1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -24,11 +24,11 @@
|
|
24 |

|
25 |
<p>Install the module manually or via Magento Connect</p>
|
26 |
<p>Then login to the backend and flush your cache</p></description>
|
27 |
-
<notes>- Add the
|
28 |
<authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
|
29 |
-
<date>2016-
|
30 |
-
<time>13:
|
31 |
-
<contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="ProductExport"><dir name="Model"><file name="Observer.php" hash="8c252797bb368a36c0ac09afe55a5394"/></dir><dir name="Test"><dir name="Config"><file name="Main.php" hash="
|
32 |
<compatible/>
|
33 |
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
34 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DigitalPianism_ProductExport</name>
|
4 |
+
<version>1.3.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
24 |

|
25 |
<p>Install the module manually or via Magento Connect</p>
|
26 |
<p>Then login to the backend and flush your cache</p></description>
|
27 |
+
<notes>- Add the quantity to the exported data</notes>
|
28 |
<authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
|
29 |
+
<date>2016-04-22</date>
|
30 |
+
<time>13:17:32</time>
|
31 |
+
<contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="ProductExport"><dir name="Model"><file name="Observer.php" hash="8c252797bb368a36c0ac09afe55a5394"/></dir><dir name="Test"><dir name="Config"><file name="Main.php" hash="d93f1019af8181618ff3748b915641fc"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ProductexportController.php" hash="9fff4ea33ba33bf0796fcf81ed0b0755"/></dir></dir><dir name="etc"><file name="config.xml" hash="638ccd1b303dcd875e8ae3e631d75335"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_ProductExport.xml" hash="6cdbc2897d42c0d1d4d682ad613e244f"/></dir></target></contents>
|
32 |
<compatible/>
|
33 |
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
34 |
</package>
|