Magento - load only configurable products

后端 未结 6 1530
北荒
北荒 2020-12-01 05:10

I have the following code:

$_productCollection = $this->getLoadedProductCollection();

foreach ($_productCollection as $_product)
{
  if ($_product->_d         


        
6条回答
  •  余生分开走
    2020-12-01 05:13

    Here is the code for getting only configurable products:

     $Config_products  =  Mage::getModel('catalog/product')->getCollection()
                ->addAttributeToFilter('type_id','configurable');
    

提交回复
热议问题