Post by Vector224 » Sun Sep 13, 2020 3:30 am

Just like the title said, I have searched the database looking for the number of product sold for each product, and I coudn't find it, any tips?

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by straightlight » Sun Sep 13, 2020 3:36 am

In your OC admin reports.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thekrotek » Sun Sep 13, 2020 3:53 am

You need to query "order_product" table for this.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Vector224 » Sun Sep 13, 2020 6:43 am

thekrotek wrote:
Sun Sep 13, 2020 3:53 am
You need to query "order_product" table for this.
I have looked at it before and I coudn't find anything related to the quantity sold . Here are all the raws in "order_product"

order_product_id
order_id
product_id
name
model
quantity
price
total
tax
reward

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by thekrotek » Sun Sep 13, 2020 12:00 pm

That's because you need to use MySQL to select products by ID and use COUNT().

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by kestas » Sun Sep 13, 2020 2:53 pm

I add OCMOD for this purpose. You can test and customize to your needs.

Attachments

Tested no the default OC3.0.2


Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by thekrotek » Sun Sep 13, 2020 4:34 pm

kestas wrote:
Sun Sep 13, 2020 2:53 pm
I add OCMOD for this purpose. You can test and customize to your needs.
This is wrong:

WHERE o.order_status_id > '0'

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by kestas » Sun Sep 13, 2020 4:45 pm

thekrotek wrote:
Sun Sep 13, 2020 4:34 pm
kestas wrote:
Sun Sep 13, 2020 2:53 pm
I add OCMOD for this purpose. You can test and customize to your needs.
This is wrong:

WHERE o.order_status_id > '0'
Yes, you’re right, but there’s a hint on how to do it. So you can use order_status_id where the product was actually sold.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by Vector224 » Sun Sep 13, 2020 11:57 pm

kestas wrote:
Sun Sep 13, 2020 2:53 pm
I add OCMOD for this purpose. You can test and customize to your needs.
Thanks for the OCMOD! But how I am suppose to use it? I have installed but not sure how it works. I need to accsess the quantly of product sold for each product and able to control it.

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by JNeuhoff » Mon Sep 14, 2020 12:36 am

straightlight wrote:
Sun Sep 13, 2020 3:36 am
In your OC admin reports.
Yes, in the admin backend at Reports > Reports > Products Purchased Report

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Vector224 » Mon Sep 14, 2020 1:43 am

JNeuhoff wrote:
Mon Sep 14, 2020 12:36 am
straightlight wrote:
Sun Sep 13, 2020 3:36 am
In your OC admin reports.
Yes, in the admin backend at Reports > Reports > Products Purchased Report
Thanks! ;)

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by kestas » Mon Sep 14, 2020 2:56 pm

Vector224 wrote:
Sun Sep 13, 2020 11:57 pm
kestas wrote:
Sun Sep 13, 2020 2:53 pm
I add OCMOD for this purpose. You can test and customize to your needs.
Thanks for the OCMOD! But how I am suppose to use it? I have installed but not sure how it works. I need to accsess the quantly of product sold for each product and able to control it.
The module allows you to see the quantity of products sold on the product page in frontend. This quantity shown above the price. If you use not default theme, can be that you need to customize this module.

Module for OC3.0.2. If you use another version you should also modify this module.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am
Who is online

Users browsing this forum: Baidu [Spider] and 24 guests