`
kirenenko04
  • 浏览: 146436 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

Get Product By Product Type Id

 
阅读更多

1. Get your products in 3 different collections using addAttributeToFilter where attribute name is type_id. For the condition you can use

Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE and Mage_Catalog_Model_Product_Type::TYPE_GROUPED.

 

Example:

$simple_products = $model->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('type_id', Mage_Catalog_Model_Product_Type::TYPE_SIMPLE);

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics