Хорошо, решением для меня был пользовательский модуль, который расширяет функциональность списка. Я добавил следующий файл:
/ приложение / код / местные / Mage / Каталог / блока / продукта / list.php
Со следующим добавочным кодом:
protected function _getProductCollectionSuggestion()
{
$layer = Mage::getSingleton('catalog/layer');
/* @var $layer Mage_Catalog_Model_Layer */
if ($this->getShowRootCategory()) {
$this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
}
// if this is a product view page
if (Mage::registry('product')) {
// get collection of categories this product is associated with
$categories = Mage::registry('product')->getCategoryCollection()
->setPage(1, 1)
->load();
// if the product is associated with any category
if ($categories->count()) {
// show products from this category
$this->setCategoryId(current($categories->getIterator()));
}
}
$origCategory = null;
if ($this->getCategoryId()) {
$category = Mage::getModel('catalog/category')->load($this->getCategoryId());
if ($category->getId()) {
$origCategory = $layer->getCurrentCategory();
$layer->setCurrentCategory($category);
}
}
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection->addAttributeToFilter('suggestion', 1);
if($this->_productCollection->count()) {
foreach($this->_productCollection as $_productKey => $_product) {
if($_product->getSuggestion() == 0 || !$_product->getSuggestion()) {
}
}
}
$this->prepareSortableFieldsByCategory($layer->getCurrentCategory());
if ($origCategory) {
$layer->setCurrentCategory($origCategory);
}
return $this->_productCollection;
}
Затем я загрузил этот метод в List.phtml, и он работал :)
Спасибо за чтение в любом случае! Может быть, этот код кому-то поможет!