tukker Posted January 21, 2015 Share Posted January 21, 2015 Hello, I want to sort my products in Cart en the order by product-name instead of id_product. Some customers order 100 products. All these products are sorted by id. That's is terrible for me. So I want to sort by name I know i have to change something in the file cart.php map classes // Build ORDER BY $sql->orderBy('p.id_product,cp.id_product_attribute, cp.date_add ASC'); But what do I have to change to sort the cart by product name. Prestashop 1.5.6 Link to comment Share on other sites More sharing options...
tukker Posted January 22, 2015 Author Share Posted January 22, 2015 Nobody who have problems with sorting products in the cart and order ? Link to comment Share on other sites More sharing options...
Tristan de VGO Posted March 2, 2015 Share Posted March 2, 2015 Hello you must change add pl.`name` if you are in prestashop 1.6 like that. $sql->orderBy(' pl.`name`,p.`id_product`, cp.`id_product_attribute`, cp.`date_add` ASC'); bye bye Link to comment Share on other sites More sharing options...
lovemyseo Posted July 29, 2016 Share Posted July 29, 2016 Hello you must change add pl.`name` if you are in prestashop 1.6 like that. $sql->orderBy(' pl.`name`,p.`id_product`, cp.`id_product_attribute`, cp.`date_add` ASC'); bye bye Will this work with PS 1.6.1.6 "change order by clause in $sql->orderBy('p.id_product, cp.id_product_attribute, cp.date_add ASC'); to $sql->orderBy('pl.name ASC, cp.id_product_attribute, cp.date_add ASC'); your list will be sortted by product name ASCENDING (pl.name ASC) it's a part of classes/Cart.php (getProducts()) funciton" 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