Report showing incorrect amount

  • Posts: 275
  • Thank you received: 7
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
1 day 16 hours ago #366869

-- url of the page with the problem -- : eop-inc.com
-- HikaShop version -- : 5.1.6
-- Joomla version -- : 3.10.12
-- PHP version -- : 8.2.28
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : n/a

I've taken the "Weekly Performance" report and turned it into an annual report. It is showing one category as having over $30,000 worth of sales when it has only had about $1,200. Other categories appear to be correct. Where could this innacuracy possibly be coming from?

My report settings are:
Display: Type: Listing, Date Type: Created, Period 2025-01-01 to 2025-12-31
Filters: Order Status: Confirmed, Including Sub Categories Yes (No shows same result)
Options: Limit:100

All other settings are still at defualt

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

  • Posts: 83672
  • Thank you received: 13545
  • MODERATOR
1 day 11 hours ago #366871

Hi,

You're not providing the full picture. If you really used the "weekly performance" report and changed its display type to "listing" without changing its "type" from "sales" to something else, the report will display a listing of your orders in that period of time.
There will be no sums of sales, and no category information displayed.
Did you change the type to "categories" ?
Could you please provide a screenshot of the settings of your report ?
Could you activate the "debug" setting of the Joomla configuration, and on the page of the report settings, look at the debug at the bottom and provide the MySQL queries there ? At least the one loading the data of the report.

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

  • Posts: 275
  • Thank you received: 7
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
1 day 10 hours ago #366875

Sorry yes, Categories
snipboard.io/sJU20j.jpg

There are 55 queries being shown in the debug, not sure which one you need.

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

  • Posts: 83672
  • Thank you received: 13545
  • MODERATOR
1 day 1 hour ago #366876

Hi,

Since the report is calculating sales, search for the MySQL query on the hikashop_order table. There should be only one on this page so if you search for "hikashop_order" you should directly find it.

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

  • Posts: 275
  • Thank you received: 7
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
22 hours 37 minutes ago #366878

Is this the one you are looking for?

#32
SELECT *, SUM(order_full_price) as Total
FROM josdh_hikashop_order as a
LEFT JOIN josdh_hikashop_order_product as prod
ON a.order_id=prod.order_id
LEFT JOIN josdh_hikashop_product AS p
ON p.product_id=prod.product_id
LEFT JOIN josdh_hikashop_product_category as cat
ON cat.product_id=p.product_id OR cat.product_id=p.product_parent_id
LEFT JOIN josdh_hikashop_category as c
ON cat.category_id=c.category_id
WHERE a.order_type='sale'
AND a.order_status IN ('confirmed')
AND a.order_created > 1735707600
AND a.order_created < 1767157200
GROUP BY c.category_id
ORDER BY Total DESC
LIMIT 100

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

Time to create page: 0.062 seconds
Powered by Kunena Forum