VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: dimafromtomsk on October 13, 2016, 11:17:07 AM

Title: How my payment plugin can add additional row of tax per bill in the cart?
Post by: dimafromtomsk on October 13, 2016, 11:17:07 AM
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.
Title: Re: How my payment plugin can add additional row of tax per bill in the cart?
Post by: K&K media production on October 13, 2016, 15:59:43 PM
You can apply tax rules inside the config of your payment plugin.
Title: Re: How my payment plugin can add additional row of tax per bill in the cart?
Post by: dimafromtomsk on October 13, 2016, 18:09:24 PM
Inside .xml file? What is the right format? Will they automatically apear in the cart?
Title: Re: How my payment plugin can add additional row of tax per bill in the cart?
Post by: K&K media production on October 14, 2016, 15:53:23 PM
no

virtuemart backend -> shop -> paymentmethods

choose your payment method and on the second tab are settings for tax
Title: Re: How my payment plugin can add additional row of tax per bill in the cart?
Post by: dimafromtomsk on October 15, 2016, 03:40:12 AM
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.
Title: Re: How my payment plugin can add additional row of tax per bill in the cart?
Post by: K&K media production on October 20, 2016, 01:48:48 AM
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.