Jump to content

Change product order in Shopping Cart Summary + Invoices


BZZYBI

Recommended Posts

Hi Guys 

I am trying to look for a way how to have the products that have been added to cart, to be displayed in numeric/alphabetical order based on the Reference code.

Example at the moment I get 

SKU : N06-BL2

SKU : N06-WH1

SKU : N06-WH2

SKU : N06-BL1

 

I would like them to be in the following order 

SKU : N06-BL1

SKU : N06-BL2

SKU : N06-WH1

SKU : N06-WH2

 

Any ideas

Thank you guys 

Gordon

 

Link to comment
Share on other sites

Found the solution. 

In carth.php 

change 

 

// Build ORDER BY
$sql->orderBy('cp.`date_add`, p.`id_product`, cp.`id_product_attribute` ASC');
to 
// Build ORDER BY
$sql->orderBy('p.`reference`, p.`id_product`, cp.`id_product_attribute` ASC');
 
Not sure if its the correct thing to do but it seems to work .
Hope this helps other people in need :-) 
Link to comment
Share on other sites

 

Found the solution. 

In carth.php 

change 

 

// Build ORDER BY
$sql->orderBy('cp.`date_add`, p.`id_product`, cp.`id_product_attribute` ASC');
to 
// Build ORDER BY
$sql->orderBy('p.`reference`, p.`id_product`, cp.`id_product_attribute` ASC');
 
Not sure if its the correct thing to do but it seems to work .
Hope this helps other people in need :-) 

 

Actually sorry its not working a 100% .. Any suggestions, please help :-)

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...