gerry293 Posted June 22, 2010 Share Posted June 22, 2010 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 More sharing options...
rocky Posted June 22, 2010 Share Posted June 22, 2010 Try editing product-sort.tpl in your theme's directory and adding the following before the : {l s='Heaviest'} {l s='Lightest'} 1 Link to comment Share on other sites More sharing options...
gerry293 Posted June 23, 2010 Author Share Posted June 23, 2010 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 More sharing options...
gerry293 Posted June 23, 2010 Author Share Posted June 23, 2010 Ok nevermind, I just had to add the 'weight' option in the .php file.It's working now,Thanks so much. Link to comment Share on other sites More sharing options...
rocky Posted June 23, 2010 Share Posted June 23, 2010 If your issue is resolved, please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
nikmagnus Posted November 15, 2010 Share Posted November 15, 2010 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 Link to comment Share on other sites More sharing options...
rocky Posted November 15, 2010 Share Posted November 15, 2010 That won't work. You need to use a field in the ps_product table as a parameter, not a specific value. This is actually quite difficult to do, since there is no field in the ps_product table for features. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now