我想在购物车页面上显示每种产品的个别价格,含税和不含税。我配置了opencart以显示包含税的价格,但是我想添加一列以显示没有税的价格。我有Opencart 1.5.6。请有人能帮助我吗?我试图修改cart.php
和cart.tpl
,但我没有成功,$price_extax
显示购物车中所有产品的最后价格。谢谢。Opencart 1.5.6如何在购物车中显示价格,含税和免税?
在cart.tpl
我添加以下代码: 它显示了柱丝毫不差:
<td class="price"><?php echo "Price ex-tax"; ?></td>
它显示价格:
<td class="price"><?php echo $price_extax; ?></td>
在cart.php我添加以下代码:
$this->data['price_extax'] = $this->currency->format($this->tax->calculate($product['price'],$product['tax_class_id'], $this->config->get('config_tax'))/1.12); //My code (tax is 12%)
或许,如果你发布你试过有人能提供即兴修复或建议的代码vement。 – billynoah
这样做的目的是什么:'