Skip to content

Instantly share code, notes, and snippets.

@dinhkhanh
Created June 17, 2014 14:24
Show Gist options
  • Save dinhkhanh/eaa7eeaa2ac53b9b309b to your computer and use it in GitHub Desktop.
Save dinhkhanh/eaa7eeaa2ac53b9b309b to your computer and use it in GitHub Desktop.
Add 'Newest' to product listing dropdown sorter
UPDATE `catalog_eav_attribute`
SET `used_for_sort_by` = 1
WHERE attribute_id = (
SELECT attribute_id FROM `eav_attribute` 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";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment