【发布时间】:2013-04-08 13:11:44
【问题描述】:
我正在使用 Magento 1.7.0.2,并且我在 /app/code/core/Mage/Catalog/Block/Product/list.php 中使用了此代码行:
$this->_productCollection = $layer->getProductCollection()
->joinField(
'inventory_in_stock',
'cataloginventory_stock_item',
'is_in_stock',
'product_id=entity_id',
'is_in_stock>=0',
'left')
->setOrder('inventory_in_stock','desc');
在排序位置和名称时,缺货产品排在最后。但是在按价格排序时,缺货的产品不是最后一个正常的订单。
我怎样才能使缺货的产品即使在价格之后的排序中也是最后的?
【问题讨论】:
标签: magento magento-1.7