Naveenbos
Naveenbos

Reputation: 2562

Why does the OpenCart SubTotal and Order Total are appear twice?

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?

Upvotes: 10

Views: 6439

Answers (4)

John Magnolia
John Magnolia

Reputation: 16793

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>

Upvotes: 1

Kai Feng T
Kai Feng T

Reputation: 3

the subtotal is your product cost and the total is the amount with the tax or vat.

Upvotes: 0

vishal ramani
vishal ramani

Reputation: 69

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.

Upvotes: 2

AndyGaskell
AndyGaskell

Reputation: 552

It might be worth checking what you have set-up under "order totals". In the admin, go to "Extensions" -> "Order Totals". In there you can view, edit and sort the various order totals. If it is not instantly visible which one it your duplicate, then perhaps disable them one at a time, then see the result during checkout, and then you'd be able to see which of these totals is the one you don't want.

Upvotes: 0

Related Questions