Page 1 of 1

Add VAT in basket, not on product pages

Posted: 30 Nov 2015, 14:38
by AndyH
Hello aimeos team,

I'm creating an B2B shop where the prices on product detail pages should be shown without Value Added Taxes (which is common in B2B).

The current hint "Incl. 19% VAT" should be replaced by "plus VAT". I assume this can be done by overriding the client/html templates.

Where I have no idea how to start is how should the VAT be added to the Sub-total in the basket. Is there allready a configuration available in aimeos or is there a best practice?

Thank you again for your help!

Best wishes
Andreas

Re: Add VAT in basket, not on product pages

Posted: 30 Nov 2015, 15:14
by aimeos
AndyH wrote:The current hint "Incl. 19% VAT" should be replaced by "plus VAT". I assume this can be done by overriding the client/html templates.
It's much easier! This string is part of the translation and you can change it by overwriting it in TypoScript:
https://aimeos.org/docs/TYPO3/Overwrite_translations

The translation domain is "client/html" and the string is "Incl. %1$s%% VAT" (https://github.com/aimeos/aimeos-core/b ... lt.php#L26)

Re: Add VAT in basket, not on product pages

Posted: 30 Nov 2015, 15:55
by AndyH
This works like a charm.

Do you have also a tip for me how to do the calculation in the basket?

Re: Add VAT in basket, not on product pages

Posted: 30 Nov 2015, 17:10
by aimeos
AndyH wrote:Do you have also a tip for me how to do the calculation in the basket?
Unfortunately, that's not as easy as the previous question.

The good thing is the tax calculation is done only in one place:
https://github.com/aimeos/aimeos-core/b ... efault.php

But the main problem is the payment. In your own country, your customer has to pay the price including VAT even for B2B, customers from other countries don't. There's no single solution that handles all variations (incl. mixed B2B+B2C) perfectly yet.

Re: Add VAT in basket, not on product pages

Posted: 01 Dec 2015, 16:47
by AndyH
Thanks for the hint. This seems to work.

Re: Add VAT in basket, not on product pages

Posted: 05 Dec 2015, 10:42
by marksyl
hi!
this way:?

Code: Select all

 plugin.tx_aimeos.settings.i18n.en.0 {

      domain = client/html

      string = taxrate

      trans =Incl.  VAT

    }
lg thanx marksyl

Re: Add VAT in basket, not on product pages

Posted: 05 Dec 2015, 11:40
by aimeos
marksyl wrote:

Code: Select all

 plugin.tx_aimeos.settings.i18n.en.0 {
      domain = client/html
      string = taxrate
      trans =Incl.  VAT
    }
No, the string needs to be the original value "Incl. %1$s%% VAT":

Code: Select all

 plugin.tx_aimeos.settings.i18n.en.0 {
    domain = client/html
    string = Incl. %1$s%% VAT
    trans = plus VAT
}

Re: Add VAT in basket, not on product pages

Posted: 05 Dec 2015, 13:00
by marksyl
thank you very much, it works!