While setting up and testing my first OpenCart, I was very confused after creating my first test order that the Dashboard showed I had 55 Total Sales, when I only had 1. After pecking around I realized that my test order total was $54.85. So I realized that the Total Sales on the Dashboard is rounded up sales dollars. However, without displaying as currency, it is very confusing and misleading.
To display correctly as currency, make the following edit:
/ocart2/admin/view/template/dashboard/sale.tpl
Change line 10 from:
<h2 class="pull-right"><?php echo $total; ?></h2>
To:
<h2 class="pull-right"><?php echo '$' .$total; ?></h2>
If not using USD, change the '$' to your currency symbol.
To display correctly as currency, make the following edit:
/ocart2/admin/view/template/dashboard/sale.tpl
Change line 10 from:
<h2 class="pull-right"><?php echo $total; ?></h2>
To:
<h2 class="pull-right"><?php echo '$' .$total; ?></h2>
If not using USD, change the '$' to your currency symbol.
I could not resist, to try, to make it automatically displaying the active Currency,
and, to my surprise, it even worked on spot! But one could try, to define/declare the Symbol Variable,
instead of the Short Currency word, about the same way, I assume.
Just keeping the 'H2' in line, was not possible, so, I changed to font-size 38px., to match
visually, more or less... (for OC v.2.2 - v.1.5.6.x uses it by default!)
Just to mention it!
Ernie
Here is simple VqMod!
currency_to_admin_dashboard.xml
and, to my surprise, it even worked on spot! But one could try, to define/declare the Symbol Variable,
instead of the Short Currency word, about the same way, I assume.
Just keeping the 'H2' in line, was not possible, so, I changed to font-size 38px., to match
visually, more or less... (for OC v.2.2 - v.1.5.6.x uses it by default!)
Just to mention it!
Ernie
Here is simple VqMod!
currency_to_admin_dashboard.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id><![CDATA[Add Currency Shortword to Admin Dashboard]]></id>
<version><![CDATA[OC v.2.x]]></version>
<vqmver><![CDATA[2.6]]></vqmver>
<author><![CDATA[Ernie - IP_CAM]]></author>
<file name="admin/view/template/dashboard/sale.tpl">
<operation error="log">
<search position="replace"><![CDATA[<h2 class="pull-right"><?php echo $total; ?></h2>]]></search>
<add><![CDATA[<div class="pull-right"><?php echo $currency_code; ?> <span style="font-size:38px;"><?php echo $total; ?></span></div>]]></add>
</operation>
</file>
<file name="admin/controller/dashboard/sale.php">
<operation error="log">
<search position="after"><![CDATA[$this->load->model('report/sale');]]></search>
<add><![CDATA[$data['currency_code'] = $this->config->get('config_currency');]]></add>
</operation>
<operation error="log">
<search position="after"><![CDATA[$sale_total = $this->model_report_sale->getTotalSales();]]></search>
<add><![CDATA[$data['currency_code'] = $data['currency_code'];]]></add>
</operation>
</file>
</modification>
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
For Version 2.3.0.2 this tpl file:
admin/view/template/extension/dashboard/sale_info.tpl
TL simgesi eklemek için bu eklentiyi kullanabilirsiniz: (Use this vqmod for Add TL symbol. Turkish Lira. You can change easily for $.)
https://www.opencart.com/index.php?rout ... 4%B1%C5%9F
admin/view/template/extension/dashboard/sale_info.tpl
TL simgesi eklemek için bu eklentiyi kullanabilirsiniz: (Use this vqmod for Add TL symbol. Turkish Lira. You can change easily for $.)
https://www.opencart.com/index.php?rout ... 4%B1%C5%9F
Hi Guys,IP_CAM wrote: ↑Mon May 09, 2016 2:29 amI could not resist, to try, to make it automatically displaying the active Currency,
and, to my surprise, it even worked on spot! But one could try, to define/declare the Symbol Variable,
instead of the Short Currency word, about the same way, I assume.
Just keeping the 'H2' in line, was not possible, so, I changed to font-size 38px., to match
visually, more or less... (for OC v.2.2 - v.1.5.6.x uses it by default!)
Just to mention it!
Ernie
Here is simple VqMod!
currency_to_admin_dashboard.xmlCode: Select all
<?xml version="1.0" encoding="UTF-8"?> <modification> <id><![CDATA[Add Currency Shortword to Admin Dashboard]]></id> <version><![CDATA[OC v.2.x]]></version> <vqmver><![CDATA[2.6]]></vqmver> <author><![CDATA[Ernie - IP_CAM]]></author> <file name="admin/view/template/dashboard/sale.tpl"> <operation error="log"> <search position="replace"><![CDATA[<h2 class="pull-right"><?php echo $total; ?></h2>]]></search> <add><![CDATA[<div class="pull-right"><?php echo $currency_code; ?> <span style="font-size:38px;"><?php echo $total; ?></span></div>]]></add> </operation> </file> <file name="admin/controller/dashboard/sale.php"> <operation error="log"> <search position="after"><![CDATA[$this->load->model('report/sale');]]></search> <add><![CDATA[$data['currency_code'] = $this->config->get('config_currency');]]></add> </operation> <operation error="log"> <search position="after"><![CDATA[$sale_total = $this->model_report_sale->getTotalSales();]]></search> <add><![CDATA[$data['currency_code'] = $data['currency_code'];]]></add> </operation> </file> </modification>
I was just wondering if there was an update to this vqmod? I'm looking to utilise this on my OpenCart website.
Any help would be greatly appreciated
Thanks
Jonathan
Simply go here: https://www.opencart.com/index.php?rout ... n_id=35486
Compatible with OC 2.3.x and 3.x
Compatible with OC 2.3.x and 3.x
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
No - which version are you using and how did you install?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Resolved here: viewtopic.php?f=202&t=208179#p739641
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Maybe resolved, just another approach - both should work.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Who is online
Users browsing this forum: No registered users and 71 guests