I have OpenCart installed. The cart page shows Total and Subtotal twice. It will not show the final Total too. The gift voucher is also appearing even if a customer has not added it to their cart. Is their a solution? Do I need to edit my settings in the Admin?
Sub total is used for main price that does not include any tax or vat, and total shows final price that includes all things TAX, VAT and gift voucher or coupon.
and there may be you have not cleared cache from vqmod, so it may conflict your prices and place of prices that you have placed.
Assuming sub-total is ordered before total. This will check if they have the same value.
<file path="catalog/controller/" name="checkout/cart.php,checkout/confirm.php,module/cart.php">
<operation>
<search position="before"><![CDATA[
$this->data['totals'] = $total_data;
]]></search>
<add><![CDATA[
// Remove sub-total is same as total
foreach($total_data as $i => $result){
if($result['code'] == 'sub_total' && $total_data[$i+1]['code'] == 'total' && $result['value'] == $total_data[$i+1]['value']){
unset($total_data[$i]);
}
}
]]></add>
</operation>
</file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With