Post by jrr » Thu Sep 29, 2022 2:38 pm

How does the dashboard generate the percentages?

My Total Orders, Total Sales, & Total Customers are all correct, but the percentages for each box are wrong with Total Orders showing -300%, Total Sales -250%, and Total Customer also at -300%.

Also the World Map doesn't show any sales.

I have OC 3.0.3.6, running on PHP 7.3.33. This has been working for a couple of years, and I double checked admin permissions in the Users section were enabled for Dashboard.

I have done a bit of cleaning up (purging some bulky log files), and haven't looked at the Dashboard for a little while - so may have deleted some important file I shouldn't have.

Thanks!
Last edited by jrr on Sat Oct 08, 2022 3:35 pm, edited 2 times in total.

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by ADD Creative » Thu Sep 29, 2022 6:48 pm

They are generated by dividing the total order in the database by the values in the statistics.

What do you see under Reports - > Statistics? Can you refresh them?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by jrr » Thu Sep 29, 2022 8:46 pm

ADD Creative wrote:
Thu Sep 29, 2022 6:48 pm
They are generated by dividing the total order in the database by the values in the statistics.

What do you see under Reports - > Statistics? Can you refresh them?
I tried Refreshing the Statistics - no change:

Image

This is what I saw on the dashboard (Canada now shows 2 sales):
Image

Today the stats are slowly recovering as we get sales (World Map has gone back to no sales anywhere):
Image

Thanks for your time!

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by ADD Creative » Thu Sep 29, 2022 11:39 pm

Sorry, I misread you post and thought you were talking about the percentages in the sidebar.

The box percentage is calculated form ('yesterday's orders' - 'the day before yesterday's orders') / 'yesterday's orders'. So if you have more orders the day before yesterday than yesterday, you will get a negative number. I think!

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by jrr » Mon Oct 03, 2022 10:31 pm

Further to my question on how statistics are generated in the Dashboard - does anyone know how the Dashboard World Map gets its data to show sales by countries? Mine is now ignoring sales and shows just the basic map, and mousing over the countries does not show sales, just the country's name.
I can ignore it of course, but I assume because it is not working that something is broken and needs attention.
I don't see any errors that might be related in the logs...

Thanks!

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by ADD Creative » Mon Oct 03, 2022 10:45 pm

It uses getTotalOrdersByCountry in admin/model/extension/dashboard/map.php. The order status needs to be tick as one the completed order statuses in your settings. The SQL query groups all order by country.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by jrr » Sat Oct 08, 2022 3:29 pm

ADD Creative wrote:
Mon Oct 03, 2022 10:45 pm
It uses getTotalOrdersByCountry in admin/model/extension/dashboard/map.php. The order status needs to be tick as one the completed order statuses in your settings. The SQL query groups all order by country.
Ah, thanks! I see that when I go to admin/System/Settings/(store name)/Option/Complete Order Status and select "Processed" & "Shipped" & "(any choice we use to indicate sale is finished/shipped/picked up/...)" that the data now appears in World Map. Problem solved!

You know the little question mark explanation isn't much use as it says something like - Status Reached where customer can download product - doesn't say anything about how this is actually used.

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm
Who is online

Users browsing this forum: Bing [Bot], ravikumar22, Semrush [Bot] and 82 guests