Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping cart list order


Jlenting

Recommended Posts

Hello guys,

 

Well my question is simple, when a customer adds a product to his shopping basket, and he comes on the shopping_cart.php page the added product is at the bottom of the page.

 

Is it possible to get the shopping cart list in descending order, so that the last added product is on top of the list?

 

Kind regards,

Jasper

Link to comment
Share on other sites

Look at the shopping_cart class, you`ll need to add order by customers_basket_date_added desc

to the relavent query.

 

:)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Look at the shopping_cart class, you`ll need to add order by customers_basket_date_added desc

to the relavent query.

 

:)

 

Hi Sam,

 

Tnx for your reply. I looked in the shopping_cart class file and saw that there where 2 querys that selectes items from the 'TABLE_CUSTOMERS_BASKET' I added 'ORDER BY customers_basket_date_added DESC' to thoose 3 files but it didnt had any affect on the listing.

 

line30: 
$product_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' ORDER BY customers_basket_date_added DESC");

line48: 
$products_query = tep_db_query("select products_id, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' ORDER BY customers_basket_date_added DESC");

 

am I missing something?

 

Jasper

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...