我有以下代码来获取产品列表
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('name')
->addAttributeToFilter("category_ids", array('finset'=>$this->category_id));
foreach($collection as $product) {
echo $product->getName();
}
Run Code Online (Sandbox Code Playgroud)
我的问题是,我怎么能不回应"简单"但属于父"可配置"产品的产品.(例如,不要显示"Red Shirt Medium",因为它属于"Red Shirt")
我已经知道这个协会住在' catalog_product_super_link'但我刚刚开始使用Magento并且不幸的是不知道如何进行过滤:)
干杯伙计们,
克里斯.