Best selling products statistic does not work prop

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #173684

-- HikaShop version -- : 2.3.3

Hi i noticed something wrong on the best selling products statistic.
I have the total amount of some products too big. I have not sold all those products!
Do you have notice of the same issue with other users?
If not, could you explain better how does that type of statistic works?
For example when the amount is update?
If i try to make an order just for a test i don't see the amount update.


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #173701

Hi,

Thanks to give us a screenshot of you report configuration in order to try to reproduce the issue on our end.
The amount should be updated once the order has a confirmed status.

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #173822

Hi,
here you are the screenshot.


my site with Hikashop
www.lacasettabio.it
Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #173934

Hi,

In the filter of this report you don't have selected an order status, so all the products of all the orders statuses are displayed.
Even products in cancelled, or created orders, so as you said it don't represent the sol products.

You just have to add more conditions in the filters.

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174014

Hi,
it was setted on shipped.
On the screenshot i did not scroll down the menù.


my site with Hikashop
www.lacasettabio.it
Attachments:

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174015

So,
now i tested better it.
I buy two pcs of a same product, the total amount is 26 Euro.
The total amount on the statistic, before the purchase is 490 Euro.
When i set the order on shipped the amount on the statistic is 672 Euro!!!!!
if i set the order on cancelled the statistic amount come back on 490 Euro.

So the system adds 182 Euro insted of 26 :ohmy:


my site with Hikashop
www.lacasettabio.it
Last edit: 10 years 1 month ago by lacasetta.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 1 month ago #174117

Hi,

Can you please edit the file "administrator/components/com_hikashop/helpers/widget.php" and replace

		$query='SELECT *, '.$dataType.' as Total, COUNT(a.order_id) AS quantity FROM '.hikashop_table('order_product').' AS prod LEFT JOIN '.hikashop_table('order').' AS a on a.order_id=prod.order_id '
			.$leftjoin.' '.$filters.' GROUP BY prod.order_product_name ORDER BY Total '.$order.' '.$limit;
		$db->setQuery($query);
By
		$query='SELECT *, '.$dataType.' as Total, COUNT(a.order_id) AS quantity FROM '.hikashop_table('order_product').' AS prod LEFT JOIN '.hikashop_table('order').' AS a on a.order_id=prod.order_id '
			.$leftjoin.' '.$filters.' GROUP BY prod.product_id ORDER BY Total '.$order.' '.$limit;
		$db->setQuery($query);
I'm trying to reproduce your problem, I guess that a there is a aggregation missing which made a multiplication of the quantity (by 7 in your case).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174188

Hi,
i'm sorry but i don't have that file, as you can see on the screenshot attached here.

If it can to help you, the product where i had the test is that: www.lacasettabio.it/negozio-online/prodo...libro-vendita-online


my site with Hikashop
www.lacasettabio.it
Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #174201

Hi,

Jérome was talking about the file "administrator/components/com_hikashop/classes/widget.php"

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174315

ok, now, yes, I found it.
But I find the file already modified. Namely in the version hikashop_business_v2.3.3_2014-09-29_07-13-52 the change was made


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 1 month ago #174414

Ok. Then please replace the file administrator/components/com_hikashop/classes/widget.php with the one in this archive and see if that helps.

File Attachment:

File Name: widget_2014-10-05.zip
File Size:13 KB

Attachments:

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174441

Hi,
I'm sorry, the result does not change
:(


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174443

Hi,
i tried to create an identical new gadget.
Now when i have the tests
on the old one i have the issue
on the new one seems to work.
;)


my site with Hikashop
www.lacasettabio.it
Last edit: 10 years 1 month ago by lacasetta.

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174444

Could you explain what is "Data type" > Created or > Last Modified
on the Display box, please?
Thanks


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 1 month ago #174523

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 719
  • Thank you received: 3
10 years 1 month ago #174586

Hi,
i red the tutorial...
but the instrution are
Date Type: Choose here the date type used to generate the report. :blink:

I'd like to know what is the difference between:
> Created
> Last Modified
Thanks


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 12953
  • Thank you received: 1778
10 years 1 month ago #175560

Hello,
Sorry for the late reply, the Date Type option will enable you to choose the date which will be used to display your orders :
- Created : will display your orders on the Order creation date
- Last modified : will display your orders on the Order last modified date (the last time you modified your order).

Last edit: 10 years 1 month ago by Mohamed Thelji.
The following user(s) said Thank You: lacasetta

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

Time to create page: 0.110 seconds
Powered by Kunena Forum