Lucif Posted January 16, 2014 Share Posted January 16, 2014 (edited) Hi! I have over the 1000 products in my shop, and i've multiple suppliers. My products are sort by supplier in the shop en in my warehouse.But when i put the products in the shopping cart, or when i get an new order, the products are sort by ID. But that is annoying when i make the order ready. I must scroll through the whole order in the BO because i get the products by supplier..Can anyone help me to sort the productlist in the cart by manufactur?Or maybe, if that is not possible by category?The best is by supplier. Edited January 17, 2014 by Lucif (see edit history) Link to comment Share on other sites More sharing options...
Lucif Posted January 17, 2014 Author Share Posted January 17, 2014 I mean supplier, so i changed the OP. Can anyone help? Link to comment Share on other sites More sharing options...
NemoPS Posted January 17, 2014 Share Posted January 17, 2014 Prestashop version? You have to change the orderby clause in the Cart class, getProducts method Here is on 1.5.4 for example // Build ORDER BY $sql->orderBy('p.id_product, cp.id_product_attribute, cp.date_add ASC'); DO you want to order by manufacturer name or id? If you need the name you have to join the supplier_lang table too 1 Link to comment Share on other sites More sharing options...
Lucif Posted January 17, 2014 Author Share Posted January 17, 2014 (edited) Thank you for your repley! The sort in the cart is now fine: $sql->orderBy('p.id_supplier, cp.id_product_attribute, cp.date_add ASC'); Thankyou! But when people place the order, is the sequence in the BO->orderdetail also alright now?Thankyou! Edited January 17, 2014 by Lucif (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 17, 2014 Share Posted January 17, 2014 Try with $sql->orderBy('p.id_supplier, p.id_product, cp.id_product_attribute, cp.date_add ASC'); 1 Link to comment Share on other sites More sharing options...
Lucif Posted January 17, 2014 Author Share Posted January 17, 2014 (edited) Its better! Thankyou! Is the sequence i see in the card in the FO also the sequence when the order is placed? So what i see in the BO? Haha, just got an order, put the custumer choose 3 products, all from another supplier.. so i can't check it! Edited January 17, 2014 by Lucif (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 17, 2014 Share Posted January 17, 2014 I can't remember if it uses the same method at the moment...let us know! Link to comment Share on other sites More sharing options...
Lucif Posted January 18, 2014 Author Share Posted January 18, 2014 (edited) I've multiple orders, and it is going well! Edited January 22, 2014 by Lucif (see edit history) Link to comment Share on other sites More sharing options...
Lucif Posted January 22, 2014 Author Share Posted January 22, 2014 I have one question..This is how the products are in the card: Supplier ID Product ID Works just fine!But i want now edit the supplier ID.So the leading supplier in our warehouse with number 1, then supplier 2 enz.Can I edit the supplier ID in the database without any problems? Link to comment Share on other sites More sharing options...
NemoPS Posted January 22, 2014 Share Posted January 22, 2014 If you manually edit an id, you have to make sure you edit all occurrences. It might get tricky, as, for exmple, it's used in the ps_products table as well. You will need a database schema to do it properly Link to comment Share on other sites More sharing options...
Lucif Posted January 25, 2014 Author Share Posted January 25, 2014 Thankyou, i don't go edit it, i don't like tricky Link to comment Share on other sites More sharing options...
Welele Posted February 8, 2016 Share Posted February 8, 2016 Hello everyone. It is possible sort the products order by EAN-13 or UPC field?? I dont use this fields and I would like sort the orders invoice because my store and stock is too big. Reference numbers and another fields are disordered. I need a new field to sort. Thanks and regards Link to comment Share on other sites More sharing options...
Welele Posted February 9, 2016 Share Posted February 9, 2016 Please. I need help. Is this possible? Best regards 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