I have this scirpt in php (attached [login to view URL])
<?php
error_reporting(E_ALL | E_STRICT);
define('MAGENTO_ROOT', getcwd());
$compilerConfig = MAGENTO_ROOT . '/includes/[login to view URL]';
if (file_exists($compilerConfig)) {
include $compilerConfig;
}
$mageFilename = MAGENTO_ROOT . '/app/[login to view URL]';
require_once $mageFilename;
ini_set('display_errors', 1);
Mage::app();
$storeId = 15; //id store
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load($storeId));
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('*');
$collection->addAttributeToFilter('status', 1);//attivo prodotto 1 o 0
$lines = array();
//parte stampo prima riga
$lines[] = array("Prodotto SKU","Nome Prodotto","Prezzo Prodotto","Prodotto URL","Descrizione Prodotto","Immagine URL","Categoria Prodotto");
//arreizzo tutti i dati sotto
foreach ($collection as $product) {
$line = array();
$line[] = $product->getSku();//Prodotto SKU
$line[] = $product->getName();//Nome Prodotto
$line[] = $product->getFinalPrice();//Prezzo Prodotto
$line[] = $product->getProductUrl(); //Prodotto URL
$line[] = $product->getShortDescription();//Descrizione Prodotto
$line[] = Mage::helper('catalog/image')->init($product, 'image')->__toString(); //Immagine URL IN CACHE
$categories = $product->getCategoryCollection();
$categoryNames = array();
foreach ($categories as $category) {
$categoryNames[] = $category->getName();
}
$line[] = implode(' | ', $categoryNames); //Categoria Prodotto INFAME
$lines[] = $line;
}
foreach ($lines as $line) {
echo '"'.implode('","', $line).'"'."\n";
}
It does not work properly.
- Do not export categories
- Do not export successfully links to product images. ( i prefer a original image not cache image)
They must be added to the fields in the sample file (attached [login to view URL])
Red: fields add
green: fields must remain empty.
fields must be in the order of file [login to view URL]
the script should automatically save a file in the root of file [login to view URL]
R.
Hello
Thank you for posting this project.I am highly interested to do this project.I can help you for done 100% satisfied work. I don't need any payment now. payment me when you are happy. I want long term work [login to view URL] forward. Thanks
€16 EUR v 0 dnevu
4,0 (16 ocen)
3,9
3,9
4 freelancerjev je oddalo ponudbo s povprečno vrednostjo €31 EUR za to delo