How my payment plugin can add additional row of tax per bill in the cart?

Started by dimafromtomsk, October 13, 2016, 11:17:07 AM

Previous topic - Next topic

dimafromtomsk

How my payment plugin can add additional row of tax per bill in the cart? And recalculate 'total'.
This tax should be applyed only when is selected my payment plugin. Thanks a lot for someone who could answer this question.

K&K media production

You can apply tax rules inside the config of your payment plugin.

dimafromtomsk

Inside .xml file? What is the right format? Will they automatically apear in the cart?

K&K media production

no

virtuemart backend -> shop -> paymentmethods

choose your payment method and on the second tab are settings for tax

dimafromtomsk

I got it already. But how can i add more than one tax rule? My client wants alternate tax an duty to apear in the cart. So as i see there should be to tax per bill rules applyed. I've tried to copy the field tax_id in the config(xml) and past it renamed as tax_id2. So i renamed also all identifiers related(in language ini) etc. And added additional row to db on plugin initialization. But only thing that happened is weird dissapearance of tax rules in plugin config tab. Remained only 'no rules' and 'default rules'.Everything else working fine.

K&K media production

You can have multiple rules ... one with 10% and another with 20%.

On Payment configuration choose "default rules".

In this case both rules are applied to your payment fee.