i just want to ask what are the codes in catalog folder does i need to open if i want to descending the list of products that i added in the shopping cart in opencart. for example, i have three (3) products, product A = $3.00, product B = $2.75 and product c = $1.50,
I have tried to look and add an ORDER BY price DESC in $product_query at the cart.php (\system\library\cart.php) but I failed to order by the lists of products present in the shopping cart.
is there a solution that can I descend the lists of product in the shopping cart? thanks in advance
These are the PHP commands you need to be focussed on for OpenCart
Found in the /catalog/controller/checkout/cart.php
The files are also in
You need to edit
public function getProducts() {There are some more edits, just do a find in folder for those functions in the OpenCart zip. You can add your
ORDER BYand other functions within these SQL commands. I would advise downloading a OpenCart version that matches yours and keep the zip extracted – never touch the source so you can refer back to it, always save original work as .bk or .php.backup or .compress if using WordCompressUpdate
Not all the files are structured in the MVC format. Some files are in the system folders and some files and functions have been combined.