Hello everyone, im working on a very profesional looking account dashboard and i need to show in an icon how many products he ordered , only the number count, if he has 5 ordered items to show only 5.
Im using opencart 3.0.3.9
I know that at begining of version 3 total orders was changed total reward and i tryed to modify old extensions to show me number of total orders but it still shows me total reward, its extremely frustrating and im allmost gettin bald of how much hair i pulled from my hair.
any help would be much appreciated, thank you
Im using opencart 3.0.3.9
I know that at begining of version 3 total orders was changed total reward and i tryed to modify old extensions to show me number of total orders but it still shows me total reward, its extremely frustrating and im allmost gettin bald of how much hair i pulled from my hair.
any help would be much appreciated, thank you
I understand the frustration when things don’t work as expected. Let’s try to solve this together. To display the number of ordered items in the account dashboard on OpenCart 3.0.3.9, you’ll need to modify the code that handles the data for the dashboard. Here’s a general approach you can take:
OpenCart uses an MVC (Model-View-Controller) design pattern. You’ll need to locate the controller file that sets the data for the account dashboard view.
Once you’ve found the correct controller file, you’ll need to adjust the code to fetch the total number of orders instead of the total reward points. This will likely involve querying the database for the count of orders associated with the user’s account.
Update the View After adjusting the controller, ensure that the view file reflects the changes and displays the number of orders correctly.
Dog Near Me
And in the view file, you would display the total_orders variable where needed.
If you’re not comfortable making these changes yourself, you might consider reaching out to a developer familiar with OpenCart or seeking assistance from the OpenCart community forums. There are also extensions available that might fit your needs, so exploring the OpenCart marketplace could be beneficial.
OpenCart uses an MVC (Model-View-Controller) design pattern. You’ll need to locate the controller file that sets the data for the account dashboard view.
Once you’ve found the correct controller file, you’ll need to adjust the code to fetch the total number of orders instead of the total reward points. This will likely involve querying the database for the count of orders associated with the user’s account.
Update the View After adjusting the controller, ensure that the view file reflects the changes and displays the number of orders correctly.
Dog Near Me
Code: Select all
// Assuming you're in the relevant controller file for the account dashboard
public function index() {
// ... other code ...
// Fetch the total number of orders for the logged-in user
$this->load->model('account/order');
$data['total_orders'] = $this->model_account_order->getTotalOrders();
// ... other code ...
$this->response->setOutput($this->load->view('account/dashboard', $data));
}
If you’re not comfortable making these changes yourself, you might consider reaching out to a developer familiar with OpenCart or seeking assistance from the OpenCart community forums. There are also extensions available that might fit your needs, so exploring the OpenCart marketplace could be beneficial.
Last edited by David081988wise on Wed Apr 17, 2024 12:30 pm, edited 1 time in total.
If you tell us exactly what you've tried so far it would help.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Thanks alot David081988wise
Thanks alot, it works now like a charm, with some adapting it finaly works and now i get it how to modify next what i have in mind, i expected get only mockery but there are in the world and kind people like you,thanks alot for your kindness... this dashboard is gonna be amazing
Thank You!!!!!!!!!!!!!!
When i will finish it i will post a image with finished dashboard to see what u helped me create:d
Thanks alot, it works now like a charm, with some adapting it finaly works and now i get it how to modify next what i have in mind, i expected get only mockery but there are in the world and kind people like you,thanks alot for your kindness... this dashboard is gonna be amazing

When i will finish it i will post a image with finished dashboard to see what u helped me create:d
And i hit another wall:))) i wanted in dashboard account details like name surname, address, phone and email, i made all work except the address:( all the other i did how i did on total orders and it worked, i studied all related address pages nothing works, it can only show me the address id but address_1 or shipping_address, or payment, on getAddressId shows me the output 7 which is the id but i cant change it to another cause it gives fatal error, i wanna learn it as i did with the help on total orders, can you pls help me, even a few hints will be apreciated cause i can start from there to dig up what im i missing... Thank you
Later edit:d i figured it out how simply it was to redirect all account subpages to main page, it is so damn easy, a public comunity to help others, what a laugh, if u pay i will help if u dont nope:D. only vultures areound here and some realy nice exceptions who love to help other ppl in trouble... thakns and goodbye so called opencart comunity, Daniel made all free and vultures charges for his work... thanks again to the one who helpedadycobra2003 wrote: ↑Thu Apr 18, 2024 5:34 amAnd i hit another wall:))) i wanted in dashboard account details like name surname, address, phone and email, i made all work except the address:( all the other i did how i did on total orders and it worked, i studied all related address pages nothing works, it can only show me the address id but address_1 or shipping_address, or payment, on getAddressId shows me the output 7 which is the id but i cant change it to another cause it gives fatal error, i wanna learn it as i did with the help on total orders, can you pls help me, even a few hints will be apreciated cause i can start from there to dig up what im i missing... Thank you
Well, you seem to forget, that Opencart only serves one single purpose, namely, to create income, for most everybody around. So, better don't complain, nobody told you, to come here, by expecting something, what does not exist, but be happy, to still frequently find somebody, willing to assist for free.
Good Luck!
Good Luck!
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 19 guests