Number of Product Orders not showing correctly

  • Posts: 6
  • Thank you received: 0
10 years 7 months ago #151103

-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.3
-- Browser(s) name and version -- : Chrome Version 33.0.1750.154 m


Hello,

I have a sales report on my site which should show the quantity sold of a product in a period of time.
The problem is the report is not showing the exact quantity of a product sold but only how often it is included in an order.

Like this:

Client 1 orders 2 pieces of product X
Client 2 orders 1 piece of product X

The quantity sold of product X is 3 an it was order 2 times. The sales report now should show that the exact quantity sold in this month is 3 right? But instead it shows that the quantity sold is 2 because it was ordered 2 times. It displays the times the product were orderd not the qunatity that were orderd.

But i need the exact amount of products sold not the amount of times someone has orderd it..

Greetings
NewAge

Last edit: 10 years 7 months ago by NewAgeWarrior.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 7 months ago #151158

Hello,
Can you show me how did you configured your report through some screenshots ?

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

  • Posts: 6
  • Thank you received: 0
10 years 7 months ago #151574

Hi,

i can try. But it will be difficult because i have it all in german.

What i have is a report as a table like this:



You see that for example the first line shows that the product is ordered 6 times. That is the amount of users who have ordered it. In fact two of them have ordered two pieces of it so it should be 8 and not 6. Know what i mean?

The configuration is complicated as i said, but i try with these screens:




They show the configuration of one of the products in the report. the general report is set to a table form. The products are set to "this month" as timescale and "orders" as value.

I hope it will clear up what i mean. Anyway thanks for the help :-).

Greetings
NewAge

Last edit: 10 years 7 months ago by NewAgeWarrior.

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

  • Posts: 2
  • Thank you received: 0
10 years 7 months ago #152562

The problem seems to be with the Table Display option.

If I select Column for the Display option, the result shows the quantity of products sold in each time interval (though not in total).
If I select Listing for the Display option, the result shows the quantity of products sold and the total sales value.
If I select Table for the Display option, the result shows the number of orders. (Some orders are for five or more of the same product).

Screenshots for these reports are attached. They all cover the same period and were constructed as far as possible in the same way.

The heading "Orders" causes some confusion. "Products ordered" or "Products sold" might be better.

John

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 7 months ago #152754

Hi,

I checked more in depth the issue (not easy with German text in the screenshots) and it appears that you selected "orders" in the "type" option of your table entry instead of selecting "sales" (the second one). Because of that it indeed display the number of orders with that product instead of displaying the total of the products bought.

I think I found a solution. Replace the code:

$select.='COUNT(DISTINCT(a.order_id)) as Total, a.order_currency_id';

with:
if(isset($widget->widget_params->filters['prod.product_id'])){
							$select .='SUM(prod.order_product_quantity) AS Total, a.order_currency_id';
						}else{
							$select.='COUNT(DISTINCT(a.order_id)) as Total, a.order_currency_id';
						}
in the file administrator/components/com_hikashop/classes/widget.php and that should work like you expect it to.

The following user(s) said Thank You: JohnA

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

  • Posts: 2
  • Thank you received: 0
10 years 7 months ago #153049

Hi Nicolas,

That fixed it thank you!

Kind regards,
John

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

Time to create page: 0.086 seconds
Powered by Kunena Forum