0
我有暢銷書頁面,可以加載最暢銷產品的集合。我想從此頁面刪除所有銷售產品。 這部分代碼,我有:暢銷產品頁面過濾沒有特價產品(特價) - magento
$collection = Mage::getResourceModel('catalog/product_collection');
Mage::getModel('catalog/layer')->prepareProductCollection($collection);
$attributes = Mage::getSingleton('catalog/config')->getProductAttributes();
$collection->addIdFilter($productIds)
->addAttributeToSelect($attributes)
->addMinimalPrice()
->addFinalPrice();
$this->_productCollection = $collection;
$this->_productCollection->load();
和我說->addAttributeToFilter('special_price', array('null' => true))
但它不工作:
$collection = Mage::getResourceModel('catalog/product_collection');
Mage::getModel('catalog/layer')->prepareProductCollection($collection);
$attributes = Mage::getSingleton('catalog/config')->getProductAttributes();
$collection->addIdFilter($productIds)
->addAttributeToSelect($attributes)
->addAttributeToFilter('special_price', array('null' => true))
->addMinimalPrice()
->addFinalPrice();
$this->_productCollection = $collection;
$this->_productCollection->load();