VirtueMart Forum

VirtueMart 2 + 3 => Administration & Configuration => Topic started by: xvapolh on July 01, 2019, 17:24:23 pm

Title: Last product added in cart overwrite category's tax
Post by: xvapolh on July 01, 2019, 17:24:23 pm
VirtueMart 3.4.2 - Joomla! 3.9.8 - php 7.2.10

I've a "+60€ tax" in an event category : if i buy one or more product of this category, a DBTaxBill is created with +60€ in my cart. It works fine.
But if I add another product to my cart, like a book, the tax is overwriten and no tax appears.

I tried by creating a "0 € tax" for books, but this "0 € tax" stays as the last tax, when a book is the latest added product of the cart.
If i had another product of my event as a "last cart product", the "+60€ tax" appears.

Thanks
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on July 05, 2019, 09:52:58 am
With captures :


See my problem ?
Title: Re: Last product added in cart overwrite category's tax
Post by: jjk on July 05, 2019, 10:32:10 am
If you are located in the EU, your tax configuration might not be allowed. Which country's tax rules are applicable in your case?
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on July 05, 2019, 10:37:30 am
There's no country's tax rules. Just a category tax rules. Same rule for all country : if you take an event, it's +60€ on the bill.
Title: Re: Last product added in cart overwrite category's tax
Post by: Studio 42 on July 05, 2019, 11:22:52 am
And when you set it as a Vat tax (product)?
TaxBill is for all the bill, so it can change depending the cart content.
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on July 05, 2019, 11:25:37 am
It costs 60€ per product, not for the category.
Title: Re: Last product added in cart overwrite category's tax
Post by: Studio 42 on July 05, 2019, 13:00:20 pm
switch "DBTaxBill" to "VatTax" and check if it work
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on July 09, 2019, 09:12:12 am
There it is.
Title: Re: Last product added in cart overwrite category's tax
Post by: Studio 42 on July 09, 2019, 13:06:21 pm
So does it work or not ?
Because you have so many calculated thinks, that it's hard to know(shipment tax + reduction + product taxes)
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on July 09, 2019, 13:31:17 pm
It doesn't work. It put +60€ on each product of the category. I want +60€ once, for all the category (one or multi products added to cart).

My problem is : "why my +60€ tax (in one category) is overwrited by other category products, if they appears in the last position in cart ?
Title: Re: Last product added in cart overwrite category's tax
Post by: Studio 42 on July 09, 2019, 13:42:53 pm
Because the tax per bill check the rules in a product order then set it in the cart.
If you need specific rules, you have to create your own tax plugin.
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on July 11, 2019, 17:12:11 pm
Is there a possibility in calculationh.php to sum all the rules ?
Title: Re: Last product added in cart overwrite category's tax
Post by: Studio 42 on July 11, 2019, 23:13:33 pm
Do your own tax plugin. You can then do anything as you want.
You dont need to hack the core
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on July 17, 2019, 12:12:20 pm
Maybe there is a way to display my products by reference, in order to put them at the bottom of the cart ?
Title: Re: Last product added in cart overwrite category's tax
Post by: xvapolh on August 20, 2019, 09:28:53 am
Any idea to display the products by reference (sku) in cart ?