Jump to content

[Solved]Configuring the products 'sort by' weight


Recommended Posts

Hi,

I am having some problems figuring out how to configure the sort by options that visitors can select on the website.

The defaults one are sort by name, price, etc.

But I would like to have one sort by weight (as weight is as important as price for my products).

So the users could select to view items by lowest weight first or highest weight.

In each product i enter the weight, so I guess there should be a way to link that weight with the product listing order.

I would be glad if someone has a solution for this, i still use the prestashop 2.5... (been working on the website for 6 months)

Thanks

Link to comment
Share on other sites

Hi thanks for your help, it does show the weight option in the list for customer to see but it doenst work.

When the weight is selected, it brings it back to alphabetical order. I guess it can't read the weight.

Is there a way to make it read the weight ?

Thanks

Link to comment
Share on other sites

  • 4 months later...

HI there,

I'm trying to do the same with a FEATURE called 01.Ripening Time - it's called this with 01. in front to allow me to order them in the product page.

Here's the code I've included in product-sort.tpl:

{l s='Ripening time'}



I've also added the following to my product-sort.php file:

$orderByValues = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity', 7 => '01.Ripening time');



When I reload my product list page, I get the option "Ripening Time" in the dropdown, but when I select it, the reload shows the alphabetical sort instead.

Any help appreciated.....
Cheers, Nik

33382_smZb5tkPx7HDO6YbQdTy_t

33383_zdgxe25fVrLTYVpS9Q1I_t

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