Does anyone know how to change the sort order of the shopping cart dsiplay so that the products in the shopping cart will order by product ID number. By default, the new products added will go onto the top of the list, or the bottom of list.
Does anyone know how to change the sort order of the shopping cart dsiplay so that the products in the shopping cart will order by product ID number. By default, the new products added will go onto the top of the list, or the bottom of list.
Have a look at how the data is managed and displayed in these files...
The list is compiled here:
includes/classes/shopping_cart.php
function get_products
Modify the output:
includes/modules/pages/shopping_cart/header_php.php
$products = $_SESSION['cart']->get_products();
Sidebox display contents in a list:
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_shopping_cart.php
Shopping cart display contents in a list:
includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart.php
Loops through all products.
You could filter the output loops to display ordered by product_id... or filter the original product array.
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.