Jump to content

Prestashop Stats Best-Selling Product Incorrect Price Sold


Recommended Posts

I upgrade from 1.5.2 to - Everything we well without a hitch. But I just noticed a problem that was carried from 1.5 to which I thought would have been fixed?


If you go to Stats > Best-Selling Products (/modules/statsbestproducts/)


Look at the column "Price Sold"

On mine its showing me the base price (before tax). But that's the problem, all my products have been discounted. So its show the wrong price here.


However the sales and orders - it showing the exact sale amount, but the product sold price is not correct. 

Can someone tell me how to fix this issue? I'm also using the latest module checked it on github and my files matched.


here's the line of code I think is the problem



Line 150

ROUND(AVG(od.product_price / o.conversion_rate), 2) as avgPriceSold,
Line 154
ROUND(IFNULL(SUM((od.product_price * od.product_quantity) / o.conversion_rate), 0), 2) AS totalPriceSold,
Link to comment
Share on other sites

  • Create New...