Number of pieces to be extracted

  • Posts: 69
  • Thank you received: 5
2 years 5 months ago #342200

-- url of the page with the problem -- : www.politikchronist.org
-- HikaShop version -- : 4.6.0
-- Joomla version -- : 3.10.9
-- Error-message(debug-mod must be tuned on) -- : Number of pieces sold to be extracted

Hello,
I think I am too stupid to use the report tool. This is my problem: We have agreed with writers, to pay per book sold over the online-shop a certain royalty. Now I wanted to extract number of pieces sold per author/supplier but do now know how to parametrize the report tool to get this information out of the system. Any help available?
Best regards

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #342204

Hi,

It seems that you're using brands as authors on your website.
However, there is no mechanism in HikaShop to be able to know the sales per "brand".
The only option would be adding an extra feature to the reporting tool to support brands, or the development of a custom plugin.

Usually, this is done with HikaMarket having authors as vendors, HikaMarket allows you to easily know the sales for each vendor. But that's too late now that you're using brands as authors.

The following user(s) said Thank You: politikchronist

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 5
2 years 5 months ago #342209

Yes we are using supplier as authors. Thanks for the comment.


Update: Would it be possible to get the number of orders, in which one can found an item of the said author? I realized that I can get a list of orders, but it's a lot and I would like to avoid having to count it by hand.
Thanks in advance.

Last edit: 2 years 5 months ago by politikchronist. Reason: Workaround search

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #342219

Hi,

I don't see a nice way of doing this via the interface provided in the backend.
The best will be to run a MySQL query like below directly from your PHPMyAdmin:

SELECT c.category_name, sum((op.order_product_quantity) AS sales FROM #__hikashop_category as c LEFT JOIN #__hikashop_product AS p ON c.category_id =p.product_manufacturer_id LEFT JOIN #__hikashop_product AS v ON p.product_id = v.product_parent_id  LEFT JOIN #__hikashop_order_product AS op ON op.product_id=p.product_id OR op.product_id=v.product_id LEFt JOIN #__hikashop_order AS o ON op.order_id = o.order_id WHERE o.order_status in  ('confirmed', 'shipped');
you need to replace the #__ with the table prefix of your tables.
As you can see, that's a complex MySQL query.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum