【发布时间】:2013-01-14 14:30:31
【问题描述】:
我有这个:
$this->_productCollection = $layer->getProductCollection() ->addAttributeToSort('special_price', 'desc');
我想做类似的事情:
$this->_productCollection = $layer->getProductCollection() ->addAttributeToSort('special_price*100/price', 'desc');
实际上,我的促销/销售百分比并未保存在我的数据库中。但我想按这个百分比排序(使用 Mage Core 或 SQL)。我可以这样做还是必须使用php?
我尝试自定义 Select 但没有成功
谢谢
【问题讨论】:
标签: magento