【发布时间】:2016-01-26 01:53:42
【问题描述】:
参考:模板/目录/产品/list.phtml 我正在尝试从没有图像的 Magento 列表中过滤所有产品。我在 $productCollection 中添加了以下内容:
->addAttributeToFilter('small_image', array('neq' => 'no_selection'))
我收到以下错误: a:5:{i:0;s:2550:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.small_image' in 'where 子句'
- The small_image column is included in catalog_product_flat
- I have re-indexed.
- $_product->getSmallImage() returns correctly - image URL or no_selection
【问题讨论】: