Jump to content

Cart always showing tax without login


al_foto

Recommended Posts

Running version 1.5.2.0 I have set all groups to VAT Excl. and Display tax in cart to No

 

But the checkout process always displays the VAT amount and adds it to the total amount without having loged in. 

 

As far as I remember this was different before but I can't remember what I may have changed. Only change done is setting more VAT rates for all different EU countries (new EU rules). 

 

Please, I need urgent help to solve it as I have many customers getting VAT applied before login 

 

Link to comment
Share on other sites

Ok, I have been working on this for some hours. It seems it can't work the way I want because there is only one setting, PS_TAX, which enables or disables taxes. This setting modifies $use_taxes in the cart templates and therefore shows the mentioned lines. 

 

But I have modified both templates from the default theme in the following way.

 

In shopping-cart.tpl I have replaced all 
{if $use_taxes}

with

{if $use_taxes and $logged}

This way only after the user has logged in ($logged seems to be a smarty variable with this purpose) and we know the address, VAT will be applied or not (depending on address).

 
 
In order-payment.tpl I have added at line 165
{if $use_taxes and ($total_tax > 0)}
<tr class="cart_total_tax">
<td colspan="5">{l s='Total VAT / IVA:'}</td>
<td colspan="2" class="price" id="total_tax">{displayPrice price=$total_tax}</td>
</tr>
{/if}

If tax amount is over 0 then it's shown before redirecting to payment page. 

 

I believe this is the best way to not loose customers by adding unwanted taxes before login in and also informing about taxes amount after having loged in. 

 

I hope this helps someone and any suggestion is welcome, specially for the translations in order-payment.tpl as I couldn't find where they are located. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...