Jump to content

Incorrect shipping tax in cart when not logged in


Recommended Posts

When a new customer adds a product to the cart, the shipping is shown without tax (although it says tax is included).

As soon as the customer registers or logs in the correct shipping cost is displayed (including tax).

 

How do I resolve this?

I'm using version 1.5.2.0.

 

Please help!

/ Åsa

post-628354-0-09711000-1373465001_thumb.jpg

post-628354-0-21890300-1373465009_thumb.jpg

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

After few hours of searching I have found solution that has worked for me on Presta 1.5.2.

 

In classes/Cart.php find:

        // Select carrier tax
        if ($use_tax && !Tax::excludeTaxeOption())
            $carrier_tax = $carrier->getTaxesRate(new Address((int)$address_id));

and replace with:

        // Select carrier tax
        if ($use_tax && !Tax::excludeTaxeOption())
        {
            $address = Address::initialize((int)$address_id);
            $carrier_tax = $carrier->getTaxesRate($address);
        }

After this change the shipping cost for unlogged is shown with tax included.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...