Percentage of sales from location on map
Posted: Sun Aug 09, 2020 3:36 am
Hello Team,
I would like to display the percentage of sales from each location in the tooltip on the map when you hover. I am using 3.0.3.2.
This should be
ocmod could be used:
In
We could add the calculation at the end, I just cant figure out how to gather the data on the total orders, I already have the orders for the current location here
Thanks
I would like to display the percentage of sales from each location in the tooltip on the map when you hover. I am using 3.0.3.2.
This should be
Code: Select all
current number of orders for the location / total number of completed orders across the store * 100
Code: Select all
<file path="admin/view/template/extension/dashboard/map_info.twig">
<operation error="log">
<search><![CDATA[ label.html('<strong>' + label.text() + '</strong><br />' + '{{ text_order }} ' + json[code]['total'] + '<br />' + '{{ text_sale }} ' + json[code]['amount']);]]></search>
<add position="replace"><![CDATA[label.html('<strong>' + label.text() + '</strong><br />' + '{{ text_order }} ' + json[code]['total'] + '<br />' + '{{ text_sale }} ' + json[code]['amount'] <br> CALCULATION HERE );]]></add>
</operation>
</file>
Code: Select all
admin/view/template/extension/dashboard/map_info.twig
We could add the calculation at the end, I just cant figure out how to gather the data on the total orders, I already have the orders for the current location here
Code: Select all
+ json[code]['total']