News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Multiple tax rules cannot be saved in product

Started by seagul, January 10, 2012, 21:51:39 PM

Previous topic - Next topic

seagul

Hi there,

I have four different tax rules (two with lower and two with higher tax depending on two different countries, i.e. 10%-EU, 10%-A, 20%-EU and 20%-A).
so the default values are all four of them.
If I want to change the tax rule for one product and I want to select manually only two tax rules, only one is saved. I can choose two tax rules and they are shown in the select field (see attachments). As soon as I save the product only one of the two rules is saved. (Both in FF and IE).

This is my link:
http://www.domain.com/administrator/index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=26
Using Joomla 1.7.3 and VM 2.0.0 (windows 7)
Have my own shop data.

Is there a fix?

Regards,
Seagul


[attachment cleanup by admin]

seagul

#1
ok, i did some research myself:
EDIT: (see below)

The problem is the function renderTaxList in helpers/shopfunctions.php
There is no code for multiple select like in the function renderShopperGroupList or renderCountryList.
/**
    * Renders the list for the tax rules
    *
    * @author Max Milbers
    */
   function renderTaxList($selected, $name='product_tax_id', $class='multiple="multiple"') {
......
   }


I just found out:
The problem seems to be that the field "product_tax_id" in the table "virtuemart_product_prices" is an integer. So, it can save only one value.
For example the multiple countries for one calculation methods are saved in a new table. I guess there is the table missing for multiple tax_id saving...


What is the chance that this is fixed rather soon? and Yes, I know everything is urgent  ;)

satnag29

you need to modify some code in ps_tax.php file..

whats your site URL ?

seagul


seagul

I think there is more missing. And there is no file ps_tax.php in VM2.

i.e.
The file tables/product_taxes.php is missing.
And the according functions to save the values.

jjk

#5
You need to set up only two tax rates! 10 percent and 20 percent, because only one of the two (austrian?) tax rates is applied to a product, not both. It makes no difference if you have to add 20 percent sales tax because your customer is located in Austria or if you mail the product to Germany or Great Britain or any other EU country. You still have to add 20 percent sales tax.

You probably overlooked that you can select the countries for which the tax is added in your tax configuration. In your case you have to select i.e. all EU countries, when you set up the 10/20 percent tax rules. The sales tax is then calculated depending on the shopper's country. This also covers, that there is no sales tax added when the customer is i.e. located in Switzerland.

Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

seagul

Thanks for your detailed reply! I really appreciate your information.
However, I have a shop with only prices including the tax. So, I would basically need only the final sales price.

But I have a rather complicated system of shipment rates because some products are sent from Austria and some from Sweden. So, I wanted to setup up shipment rates with the tax calculation system of VM2 and rename the label "tax" with shipment with language overrides. That would work perfectly well for this special virtuemart setup, if the multiple tax setup would work for one product. Then I could select a tax rate for a product that is sent from Austria with a tax/shipmet rate for national (Austria) shipment and a tax/shipment rate for EU countries.

For products sent from Sweden I could manually select the other tax/shipment  and save with the product.

I actually need to do it this way because the multivendor-solution of VM2 is not working yet.

But maybe you have another idea to solve this problem. I also thought of adding a new shipment method that is calculated like the standard shipment (weight, country, zip) and additionally with the manufacturer. I thought that would be easier as with the vendor.

Or maybe throught shopper groups? But I don't know how shopper groups can be linked to a user/shopper on signing up automatically.

Do you have an idea?
Thanks a lot in advance!

seagul

For whatever, I am using it.

I still think it is a bug. You should be able to select multiple tax rates/calculations for one product.

jjk

If you would assign multiple tax rules to a single product , even if you rename them, VM2 would use it to calculate the tax. How would you calculate/display the correct tax in the cart then? You can do something like this with the other options, i.e. with the 'Discount', if you make it "+" instead of "-", so the discount actually becomes a surcharge.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

seagul

I am just trying it with discount types and '+' operator. Which works fine but I also can save only one discount type for one product.  And I need i.e. one code for Austria and one for the rest of the EU.

This is the bug because I should be able to save more than one.

Milbo

No, you use the rules override.

You dont need to choose for every product the rule. You can do it per category. Just add your product in extra categories, not published. Just for calculation. For example in germany you use Food and nonfood to calculate 19 or 7 % (or is it 8 now?).
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

seagul

That is a really nice idea.

But I cannot select unpublish categories in the products and in the calculation rules. And if I publish the category, make a selection on the product, save the product and unpublish the category again. It works, but only until I next save the product because then the unpublished category is kicked out again.

Milbo

ahh, okey, hmmm I think I should change then the option :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

seagul

Yes, you should  :).

It is working like charm!!! :) I have published the categories now because my "shop main menu item" is linked directly to a category. So the other categories for my shipment rate setup are not shown.

So, for me it is "solved".