0

在我的网站上,我有几家商店可用。一个特定的商店包含简单和可配置的产品。这是一个庞大的产品集合。通过商店ID获取该商店的所有启用产品(包括可配置产品的子产品)集合的最快方法是什么?

注意:我尝试了很多不同的方法。但这需要很多时间。有时甚至会导致服务器崩溃。

注意:我正在使用Magento CE 1.3

任何建议将不胜感激。

4

1 回答 1

0
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect(array('name', 'url_key','price','lowest_price','service_id','description','short_description'));

$collection->addStoreFilter();

instead of use addAttributeToSelect('*') use only specific attributes which you needed because it effect performance of site

hope this will help you

于 2013-10-10T12:19:58.253 回答