Jump to content

Second Sort-Criteria For The Product-List


si.lithium

Recommended Posts

Hey Folks,

 

in the Backend there's the option, to define only one default sort-criteria for products, e.g. "Price".

 

Is there a way, to define a second parameter, e.g. ...SORT BY 'PRICE', 'Reference'...so if two products have the same price, they will be sorted by the second criteria e.g. the reference-number.

 

I've already tried to change the SQL-Statement in the Controllers, but the frontend is ignoring the second criteria.

 

If there is any possibility, to give a second criteria, the customer would be very happy and pay some money for your solutions.

 

We're waiting happily for some offers (effort, price).

 

Thanks in advance.

 

Best regdards,

Matthias

Link to comment
Share on other sites

In the Category::getProducts function, try to change:

$sql .= ' ORDER BY '.(!empty($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.bqSQL($order_by).'` '.pSQL($order_way).'

to

$sql .= ' ORDER BY '.(!empty($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.bqSQL($order_by).'` '.pSQL($order_way).', p.`reference` ASC
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...