【发布时间】:2017-08-03 05:55:52
【问题描述】:
我使用以下查询向我的 Magento 商店添加了一个最新的过滤器。
UPDATE `catalog_eav_attribute`
SET `used_for_sort_by` = 1
WHERE attribute_id = (SELECT ea.attribute_id FROM `eav_attribute` ea WHERE `entity_type_id` = (SELECT `entity_type_id` FROM `eav_entity_type` WHERE `entity_model` = "catalog/product") AND `attribute_code` = "created_at")
UPDATE `eav_attribute`
SET frontend_label = "Newest"
WHERE `entity_type_id` = (SELECT `entity_type_id` FROM `eav_entity_type` WHERE `entity_model` = "catalog/product") and `attribute_code` = "created_at";
排序的过滤器在前端反映,但它显示旧产品在最后,新产品在最后,谁能告诉我如何改变这个排序顺序?
【问题讨论】:
标签: mysql sorting filter magento-1.9 configurable-product