Page 1 of 1
Currency symbol in admin product list
Posted: Fri Sep 21, 2018 7:27 pm
by nongetjie
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.
Re: Currency symbol in admin product list
Posted: Sat Sep 22, 2018 4:15 am
by kestas
In admin/controller/catalog/product.php
find(line ~359):
Code: Select all
$special = $this->currency->format($product_special['price'], $this->config->get('config_currency'));
replace with:
Code: Select all
$special = $product_special['price'];
and find (line ~370):
Code: Select all
'price' => $this->currency->format($result['price'], $this->config->get('config_currency')),
replace wih:
This will remove currency symbol.
I'm not sure that can help you to get to work your modules...
Re: Currency symbol in admin product list
Posted: Sat Sep 22, 2018 6:31 am
by straightlight
These lines:
Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'));
can also be replaced with:
Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'), false, true);
Re: Currency symbol in admin product list
Posted: Sat Sep 22, 2018 4:12 pm
by kestas
straightlight wrote: ↑Sat Sep 22, 2018 6:31 am
These lines:
Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'));
can also be replaced with:
Code: Select all
$this->currency->format($product_special['price'], $this->config->get('config_currency'), false, false);
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...

Re: Currency symbol in admin product list
Posted: Sat Sep 22, 2018 8:50 pm
by straightlight
@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.
Re: Currency symbol in admin product list
Posted: Mon Sep 24, 2018 3:03 pm
by nongetjie
Thanks guys, problem solved!