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']);
}
Dalam getLine()
metode saya, saya tidak mendapat apa-apa name
selain addFinalPrice()
bekerja:
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
}
Masalah yang sama dengan image
, price
dan setiap atribut lainnya.
ini_set('memory_limit','512M');
.