Jlenting Posted May 26, 2008 Share Posted May 26, 2008 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 More sharing options...
spooks Posted May 26, 2008 Share Posted May 26, 2008 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 More sharing options...
Jlenting Posted May 26, 2008 Author Share Posted May 26, 2008 Look at the shopping_cart class, you`ll need to add order by customers_basket_date_added descto 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 More sharing options...
Jlenting Posted May 27, 2008 Author Share Posted May 27, 2008 Anyone else ever done this or knows how todo this? Link to comment Share on other sites More sharing options...
burt Posted May 27, 2008 Share Posted May 27, 2008 http://www.clubosc.com/reversing-the-order...t-contents.html When making code changes, do it the simplest way possible... Link to comment Share on other sites More sharing options...
Jlenting Posted May 27, 2008 Author Share Posted May 27, 2008 http://www.clubosc.com/reversing-the-order...t-contents.html When making code changes, do it the simplest way possible... Very cool, tnx alot Burt. Its working like a charm. Easy solution when I see it now :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.