public function run()
{
$products = Mage::getModel('catalog/product')
->getCollection()
->addFinalPrice()
->addAttributeToSelect('name')
Mage::getSingleton('core/resource_iterator')
->walk($products->getSelect()->limit(10), array(array($this, 'getLine')));
}
public function getLine($args)
{
var_dump($args['row']);
}
Dans ma getLine()
méthode, je reçois non, name
mais addFinalPrice()
fonctionne:
array(16) {
["entity_id"]=>
string(2) "61"
["entity_type_id"]=>
string(1) "4"
["attribute_set_id"]=>
string(2) "10"
["type_id"]=>
string(6) "simple"
["sku"]=>
string(15) "50-F01010001-03"
["has_options"]=>
string(1) "0"
["required_options"]=>
string(1) "0"
["created_at"]=>
string(19) "2011-07-05 18:30:48"
["updated_at"]=>
string(19) "2014-09-04 07:34:21"
["indexed_price"]=>
string(7) "14.5000"
["price"]=>
string(7) "14.5000"
["final_price"]=>
string(7) "14.5000"
["minimal_price"]=>
string(7) "14.5000"
["min_price"]=>
string(7) "14.5000"
["max_price"]=>
string(7) "14.5000"
["tier_price"]=>
NULL
}
Même problème avec image
, price
et tous les autres attributs.
ini_set('memory_limit','512M');
.