Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8628311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:30:25+00:00 2026-06-12T08:30:25+00:00

i just want to ask what are the codes in catalog folder does i

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:30:26+00:00Added an answer on June 12, 2026 at 8:30 am

    These are the PHP commands you need to be focussed on for OpenCart
    Found in the /catalog/controller/checkout/cart.php

    if ($this->cart->hasProducts() || (isset($this->session->data['vouchers']) && $this->session->data['vouchers'])) { // look for hasProducts
    
    $products = $this->cart->getProducts(); // look for this
    

    The files are also in

    system/library/cart.php
    system/library/product.php
    

    You need to edit public function getProducts() {

    $sql = "SELECT * FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id)";
    

    There are some more edits, just do a find in folder for those functions in the OpenCart zip. You can add your ORDER BY and 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 WordCompress

    Update

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just want to ask if is it okay that I use native PHP
I just want to ask if there is any PHP/MySQL datatype that can store
i just want to ask if where can we find the code that will
I just want to ask, I know that standart system calls in Linux are
i just want to ask if do i need to set something to enable
I just want to ask, how to prove that hibernate is doing lazy loading
I just want to ask that how can I display subsequent images on imageview.
i just want to ask about my html code here, i have a bit
Just want to ask if i can use Custom Validator in client side without
Just want to ask can netbean IDE get connected to clearcase remote client server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.