Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

Vous parlez français ? par ici !
1.3 Attribute Order Update
#1
Posted 01 June 2010 - 12:54 PM
Just updated my first of 5 shops to 1.3 and noticed that my attributes are now ordered in alphabetical order and not by the order entered as in 1.2.5.
This is great for most attributes, but makes a Small/Medium/Large/X Large/XX Large list look horrible putting large first.
Where has the change been made? and can it be reversed?
Dan
Nineplus Australia First of our global sites to be moved from Actinic to PrestaShop
#2
Posted 14 June 2010 - 09:01 AM
#3
Posted 14 June 2010 - 09:31 AM
Large
Medium
Small
X Large
XX Large
I've got no idea how to solve it =(
#4
Posted 02 July 2010 - 07:12 PM
Works flawless, i just brought this literally 2 mins ago, installed and bobs your uncle. Simple drag and order.
He has some really great other modules too, i think he should work for prestashop :)
#5
Posted 02 July 2010 - 08:04 PM
You are right I have it and it's a real easy and effective module!
Regards.
#6
Posted 02 August 2010 - 07:18 AM
From 1275393277:
Just updated my first of 5 shops to 1.3 and noticed that my attributes are now ordered in alphabetical order and not by the order entered as in 1.2.5.
This is great for most attributes, but makes a Small/Medium/Large/X Large/XX Large list look horrible putting large first.
Where has the change been made? and can it be reversed?
Dan
This is bugging me out, anyone found a solution to this. I don't want to install a module for this. Would appreciate it if someone can point me in the right direction. Thanks
#7
Posted 30 August 2010 - 10:46 PM
The attribute order of 1.3 can be reversed back to the order as in 1.2.5. To do this make the following changes;
1. In /classes/Product.php function: getAttributesGroups()
replace
ORDER BY al.`name`');
with
ORDER BY pa.`id_product_attribute`');
2. In /product.php
comment out the following on lines 285 and 286
foreach($groups AS &$group)
natcasesort($group['attributes']);
to
// foreach($groups AS &$group)
// natcasesort($group['attributes']);
Please Note: The order of attributes is the order in which you add them to each product. I will soon post a more elegant solution where you can set the order of the attributes in each group in the back office.
#8
Posted 24 September 2010 - 10:00 PM
It solved my problem too !!! I just been playing with Prestashop for a couple of days now, and it looks very promising !!
Your help is very much appreciated !!
Marcelo.
#9
Posted 20 October 2010 - 05:42 AM
I tried the above but when I changed them and uploaded them my homepage goes completely blank.
I'm not sure if this matters but the lines that are supposed to be replaced, there is a space missing between foreach and the bracket. I.e. when you search:
foreach($groups AS &$group)
natcasesort($group['attributes']);
it can't find it, so you have to search for the same with a space, as in:
foreach ($groups AS &$group)
natcasesort ($group['attributes']);
I'm new to Prestashop, but I thought I followed this pretty closely
#10
Posted 26 October 2010 - 11:38 AM
First of all thank's to justme54s! It work's form me.
I think we all expecting your promised module.
Meanwhile I attached the two modified files. Just replace it, and it's done.
You will have the sort order by ID. In my case (s, m, l, xl, xxl).
Don't forget! The order of attributes is the order in which you add them to each product.
Replace the first file (Product.php) in root/classes/product.php
Replace the second file (product.php) in root/product.php
It's coded in prestashop version 1.3.2. Older versions are not tested!
classyjoes, indeed It have some space errors, so you can download the two file attached and it will work for you.
Attached File(s)
product.php (16bytes)
Number of downloads: 230
Product.php (103bytes)
Number of downloads: 189
#11
Posted 17 December 2010 - 05:00 AM
#12
Posted 10 January 2011 - 05:06 PM
I have pretashop version 1.3.5 and tried to make the changes as suggested on here but i get a blank page. I downloaded the files and compared to make sure all spacing was correct etc and as far as im concerned they are exactly the same as suggested on here.
Could this be anything to do with me having a newer version? Or any ideas what I may be doing wrong please?
thanks
Rob
#13
Posted 08 February 2011 - 12:27 PM
Messed about for ages to get it back to normal.
Can someone comment what could be going wrong here?
I am using the 1.3.6.0 version btw.
#14
Posted 03 March 2011 - 07:22 PM
Who solved this? I have the same problem.
Ths
#15
Posted 12 March 2011 - 04:05 PM
I have been struggling with this attribute order for dang near half a day now and your fix seems to be working for me so far. I am running PrestaShop v.1.3.7 and so far I have not run across any errors.
So again I applaud you for finding a fix for the attribute order.
#16
Posted 22 March 2011 - 12:10 PM
How do you solvet this? I make the changes but I get a blank page. I am using with V.1.3.7. Can you help me please?
Ths
#17
Posted 29 March 2011 - 12:22 PM
ORDER BY agl.`public_name`, al.`name`');
to
ORDER BY agl.`id_attribute_group`, al.`name`');
and the same modifications must be made in classes/Cart.php, on line 420, for the attributes to be sorted in the same way in the shopping cart.
#18
Posted 17 April 2011 - 08:25 PM
Quote
ORDER BY agl.`public_name`, al.`name`);
to
ORDER BY agl.`id_attribute_group`, al.`name`);
and the same modifications must be made in classes/Cart.php, on line 420, for the attributes to be sorted in the same way in the shopping cart.
Only changing this line in the 1.4 will not disappear me 01. 02. etc.
Thanks in advance
#19
Posted 19 April 2011 - 09:24 AM
From 1303068357:
Quote
ORDER BY agl.`public_name`, al.`name`);
to
ORDER BY agl.`id_attribute_group`, al.`name`);
and the same modifications must be made in classes/Cart.php, on line 420, for the attributes to be sorted in the same way in the shopping cart.
Only changing this line in the 1.4 will not disappear me 01. 02. etc.
Thanks in advance
The solution that I was reffering to doesn't require adding numbers before the name of the attribute, it will sort the attributes by the order they were added in BO.
#20
Posted 19 April 2011 - 09:28 AM
The combinations are dates in format 01-01-2011 02-01-2011.
Prestashop organize:
01-01-2011
01-02-2011
01-03-2011
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












