Jump to content

Sorting Attributes (Sizes)


Recommended Posts

Greetings, I did a search for my issue on the forum an dthe Wiki prior to writing this message. While I do see some people mentioning the problem... I have not found a solution. However on many of the demo sites I do see the feature I am looking for working just fine.

I hope someone can help me with this problem:

I added a T-Shirt to my catalog.
Created a new Attribute Group called sizes.
Added the following in this order: Small, Medium, Large, XLarge, 2XL and 3XL

I then added the attribute combinations... but the product page shows them in alphanumerical order:

2XL
3XL
Large
Medium
Small
X-Large

you can see it here: http://emtstuff.com/product.php?id_product=10

How do I sort this to show correctly? It should sort from Small to 3XL.

Like I said I have seen it on some of the showcase sites:
http://www.oneoneonewear.com/en/t-shirts-men/88/afreeca-anniversary.html
http://www.pastetshirts.com/product.php?id_product=112
http://www.nazca-shop.com/homme/73-veste-polaire-tattoo-requin-beige.html

Can someone please direct me how to sort this... or direct me to the answer on here?

Im using the latest stable version: Version 1.3.7.0 - 0.349s

Please help me... I cant go on with adding products... as 95% of my products are T-shirts.

Thank you

Lisette

Link to comment
Share on other sites

Hi

Would this link be a solution for you? Being a new useless prestashop jockey, I am not sure if this helps. More a case of the blind leading the blind perhaps. Good luck wiht the t-shirts. I must do a similar thing with my chocolates... attrubutes of sizes and colour of boxes. If it's too hard, i'll sell just one size and pack it in a transparent bag!!! There''s a solution...tail wagging the dog!

http://www.prestashop.com/wiki/Sorting_categories/

MIchael

Link to comment
Share on other sites

Hi

Would this link be a solution for you? Being a new useless prestashop jockey, I am not sure if this helps. More a case of the blind leading the blind perhaps. Good luck wiht the t-shirts. I must do a similar thing with my chocolates... attrubutes of sizes and colour of boxes. If it's too hard, i'll sell just one size and pack it in a transparent bag!!! There''s a solution...tail wagging the dog!

http://www.prestashop.com/wiki/Sorting_categories/

MIchael



Hey Michael...

The categories is not where i am having the issue. The issue is with the attributes of the product... so if you have a T-shirt product... and you need to add sizes... I need to be able to manually sort the sizes by size and not alphabetically.

Thanks for replying just the same. :)

IS THERE ANYONE CAN HELP US?

Lisette
Link to comment
Share on other sites

Change your attribute names (add number value):

01. S
02. M
03. L
04. XL

and add substr:3:4 in your template.

example: {$group_attribute|escape:'htmlall':'UTF-8'|substr:3:4}


I hope this trick will help you.



THANK YOU! One question though... what file or where do I edit the template? Thank you again for replying.

Lisette
Link to comment
Share on other sites

/themes/yourthemes/product.tpl

you may also have to add substr:3:4 in the directory /modules (.tpl). example: /modules/blockcart/blockcart.tpl


Thank you again for your reply... I did as suggested and they do show in order this time... but they show the number prefix too:

01. X-Small
02. Small
03. Medium
04. Large
etc.

This can be confusing to a customer I think. Is there a way to remove the numbers?
Link to comment
Share on other sites

ok, I figured it out. There are 2 locations in the product.tpl file that you need to add the code to.

Also for those who are interested the 3:4 is variable. It can be 3:6 or 3:10

The first number determines the first number of characters to purge and the second number is how many characters to keep after the purge.

So for example... lets say you have the suggested 3:4:
03. Medium as one of the attributes.
that would show:
Med
With a prior blank space... so it would be a total of 4 characters.

If you have it set as 3:4 it would show
Medium

Very cool trick.

Now that I got that... I see that thsi fix only works if you only have one attribute group to worry about. If you have multiples... you have to add numbers and take into account for number of characters for all your possible attributes and then edit the code to accomodate it. That can be a pain the butt.

So what I did was spend $20 and purchased the following module:

http://www.presto-changeo.com/attribute-modules/24-attribute-order.html

I just installed it and will let you know how it works.

Lisette

Link to comment
Share on other sites

Hi there,

I was trying to make this solution work for my store, as I have this sorting issue too. However, I have two issues:
- I could only find one instance of {$group_attribute|escape:‘htmlall’:‘UTF-8‘} in my theme's product.tpl
- and I could find no instance at all in the blockcart.tpl

I am using 1.3.6 - could it be different in that version?

Any help would be greatly appreciated! I've been trying to solve this for a full year now!

Link to comment
Share on other sites

  • 2 months later...
Hi there,

I was trying to make this solution work for my store, as I have this sorting issue too. However, I have two issues:
- I could only find one instance of {$group_attribute|escape:‘htmlall’:‘UTF-8‘} in my theme's product.tpl
- and I could find no instance at all in the blockcart.tpl

I am using 1.3.6 - could it be different in that version?

Any help would be greatly appreciated! I've been trying to solve this for a full year now!


Hi,

I have the same issue in PS 1.4. I can´t find in block cart where to add substr code.

Any help will appreciate!
Link to comment
Share on other sites

  • 4 months later...
  • 6 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...