1959 Posted January 25, 2009 Share Posted January 25, 2009 I am having some trouble getting my attributes in the desired sequence. On the product display page, the attributes are listed alphabetically.LargeMediumSmallX LargeWhen using the combinations generator, I have tried to alter the sequence that I select the attributes in but it doesn't change the order in which they display.How are you getting your sizes in order from smallest to largest? I want them to look like:SmallMediumLargeX Large Link to comment Share on other sites More sharing options...
Travis Posted January 25, 2009 Share Posted January 25, 2009 I would like to know as well. Link to comment Share on other sites More sharing options...
1959 Posted January 25, 2009 Author Share Posted January 25, 2009 The funny thing is, I changed X Large to Extra large, thinking then at least the sizes would be in reverse alphabetical order, right? The sequence didn't change, it stayed the same.LargeMediumSmallExtra LargeI think this makes the shop look a bit silly Link to comment Share on other sites More sharing options...
Skipper Posted January 25, 2009 Share Posted January 25, 2009 Below is what I did to get S/M/L correctly:1/ Add a field position to the database : ALTER TABLE `ps_attribute_lang` ADD `position` TINYINT NOT NULL DEFAULT '0' AFTER `id_lang` ; 2/ Modify the fields 'position' in table 'ps_attribute_lang' using phpmyadmin to fit the row order. Smaller numbers will show first. Personally, I find the ps_attribute_lang not the right table, it should probably be in ps_attribute, but I was too lazy.3/ Change the file /classes/Attribute.php : Find function getAttributes($id_lang, $notNull = false) and change ORDER BY agl.`name` ASC, al.`name` ASC'); to ORDER BY al.`position` ASC, agl.`name` ASC, al.`name` ASC'); Done. A simple refresh will probably not show the new order because Smarty's caching does not catch this. Try with another product instead. Link to comment Share on other sites More sharing options...
1959 Posted January 25, 2009 Author Share Posted January 25, 2009 That sounds like it would be perfect. I will try it and report back Thank you. Link to comment Share on other sites More sharing options...
1959 Posted January 26, 2009 Author Share Posted January 26, 2009 I gave it a try and added the table position with no problem. When I went to edit the position for the various attributes, I found that there were many instances of small, large, medium, and extra large. I have used the combinations generator to create my color/size options for my products, so I wonder if this might be what caused that.I edited the positions in the table, changed the attributes file, and then went into my store's back office. I found that my products were no longer listed in their categories. The categories appeared to be empty even though the front office was fine. I tried refreshing to see if there was any change in S,M,L, XL sequence but there was not.I ended up just dropping the table position from the database to get the back office back to normal It's fine now but I'm still after a workable solution to this problem. Link to comment Share on other sites More sharing options...
Miha Posted October 28, 2009 Share Posted October 28, 2009 Is there an easy solution to this problem? Anyone? Link to comment Share on other sites More sharing options...
BWT Posted May 7, 2012 Share Posted May 7, 2012 I have seen a "Order Attribute" module floating around, I have the same issue but with attribute numbers 0123456789 and when I get to ten it goes in front not after 9, pain in the neck!! Link to comment Share on other sites More sharing options...
Mike Kranzler Posted May 7, 2012 Share Posted May 7, 2012 Hi everybody, tomerg3 here on the forums has created a great module for this, which you can find here. I hope this helps. -Mike Link to comment Share on other sites More sharing options...
Recommended Posts