Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to sort products in shopping cart


shashank3

Recommended Posts

Posted

Hello,

 

How do i by default SORT all the products in shopping cart (shopping_cart.php) by products_model?

 

Thank you,

Sam

  • 2 weeks later...
Posted

i was able to figure this out.

 

in shopping_cart.php

 

after line

 

$products = $cart->get_products();

 

 

insert

 

foreach ($products as $key => $row) {

$model[$key] = $row['model'];

}

 

array_multisort($model, SORT_ASC, $products);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...