我正在使用OpenCart 1.5.1.3.1并且有一个简单的问题。在查看产品时,在产品页面上,我希望删除金额旁边的字符“$”,例如“$ 20.00”到“20.00”。
提前感谢一大堆!
答案 0 :(得分:1)
答案 1 :(得分:-1)
如何修复首先发送到视图的字符串:
在/catalog/controllers/product/product.php
中找到以下行(v1.5.6.4中的第315行):
$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
将其替换为:
$this->data['price'] = $this->currency->format($this->tax->calculate(6, $product_info['tax_class_id'], $this->config->get('config_tax')), '', '', false);
您可以在, '', '', false
的其他调用结束时添加相同的参数$this->currency
,以从其他项目中删除前缀/后缀(例如税)