Jump to content

[PS 1.7.4.0] Products order attributes sorting


gianlucarinaldi3

Recommended Posts

Hello everyone.
I'm facing a problem with attribute's sorting.
The shop has different sizes attributes: numeric (from 1 to 45, but also decimal such as 4,5 - 6,5 etc) and alphabetical (S M L XL etc).
There are 75 of these, and I can't manually edit them on via BO: I try to sort them but then when refreshing the page they come back to the initial order.

So I tried to do that via code, editing the file classes/Product.php

I kinda made it editing the code like so:
ORDER BY ag.`position` ASC, al.`name` DESC, agl.`name` ASC, ag.`id_attribute_group` ASC';
So numeric integers and alphabetics works just fine.

BUT

if I have a product which has either numeric values and decimal, the sorting doesn't work.
To have an idea: https://shop.maisonoperative.com/it/Sneakers/721-2771-New-Balance-2900000126374.html#/437-taglia-10/679-colore-yellow

What am I doing wrong?
Thanks to everyone, and stay safe.

Edited by gianlucarinaldi3
wrong grammar (see edit history)
Link to comment
Share on other sites

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...