jeff8899 Posted February 13, 2017 Share Posted February 13, 2017 (edited) anyone knows to change the attributes sort order to alphabet???? Edited February 14, 2017 by jeff8899 (see edit history) Link to comment Share on other sites More sharing options...
JeredBolton Posted February 13, 2017 Share Posted February 13, 2017 You could override the getAttributesGroups function in classes/Product.php so you can change how the attributes are ordered: At present it orders by: ORDER BY ag.`position` ASC, a.`position` ASC, agl.`name` ASC' You could change this to: ORDER BY ag.`position` ASC, agl.`name` ASC' so that it ignores the position of the attributes in a group and just orders them by name. Link to comment Share on other sites More sharing options...
jeff8899 Posted February 14, 2017 Author Share Posted February 14, 2017 Hi, JeredBolton the order has changed but it still not in alphabet order. any idea??? thanks Link to comment Share on other sites More sharing options...
jeff8899 Posted February 14, 2017 Author Share Posted February 14, 2017 Thanks JeredBolton given me the idea! after play around with the sort function, i finally got what i need. ORDER BY ag.`id_attribute_group` ASC, al.`name` ASC'; the attribute group name sort by id, and its value sort by alphabet. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now