Good afternoon,
In OC 3.0.2.0 the product list in the admin contains a currency symbol for the price of the product. This is not the case in OC 1.5.6 and OC2.0.2.0.
Some of my extensions have problems with this. Does anyone know why the currency symbol is added in OC3 and if it's possible to remove it from the overview?
Attached a screenshot from the Official Open Cart demo.
In OC 3.0.2.0 the product list in the admin contains a currency symbol for the price of the product. This is not the case in OC 1.5.6 and OC2.0.2.0.
Some of my extensions have problems with this. Does anyone know why the currency symbol is added in OC3 and if it's possible to remove it from the overview?
Attached a screenshot from the Official Open Cart demo.
Attachments
Screen Shot 2018-09-21 at 13.12.30.png (105.18 KiB) Viewed 1455 times
In admin/controller/catalog/product.php
find(line ~359):
replace with:
and find (line ~370):
replace wih:
This will remove currency symbol.
I'm not sure that can help you to get to work your modules...
find(line ~359):
Code: Select all
$special = $this->currency->format($product_special['price'], $this->config->get('config_currency'));
Code: Select all
$special = $product_special['price'];
Code: Select all
'price' => $this->currency->format($result['price'], $this->config->get('config_currency')),
Code: Select all
'price' => $result['price'],
I'm not sure that can help you to get to work your modules...
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
These lines:
can also be replaced with:
Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'));
Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'), false, true);
Last edited by straightlight on Sat Sep 22, 2018 8:49 pm, edited 1 time in total.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
No reason for currency format if you not need currency symbol (for product list in admin dashboard) as you know that only one default currency can be. So you can simply use previous suggestion...straightlight wrote: ↑Sat Sep 22, 2018 6:31 amThese lines:
can also be replaced with:Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'));
Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'), false, false);
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
@nongetjie:
My apologize. You only wish to remove the currency symbol and not to remove the currency decimal points. I have modified my last solution above accordingly and in accordance of the currencies API.
My apologize. You only wish to remove the currency symbol and not to remove the currency decimal points. I have modified my last solution above accordingly and in accordance of the currencies API.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester