ref:template / catalog / product / list.phtml 我试图从没有图像的Magento列表中过滤所有产品。我在$ productCollection中添加了以下内容:
->addAttributeToFilter('small_image', array('neq' => 'no_selection'))
我收到以下错误: a:5:{i:0; s:2550:" SQLSTATE [42S22]:未找到列:1054未知列' e.small_image'在' where子句'
- The small_image column is included in catalog_product_flat
- I have re-indexed.
- $_product->getSmallImage() returns correctly - image URL or no_selection
答案 0 :(得分:0)
关于产品系列->addAttributeToFilter('image', array('neq' => 'no_selection'))
尝试使用此代替small_image
。