Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 13 replies, has 2 voices.

Last updated by Lauren 3 years, 2 months ago.

Assigned support staff: Lauren.

Author Posts
May 8, 2017 at 2:10 pm #1270850

FilippoZ1

I am trying to: Translate Woocommerce Variable products

URL of (my) website where problem appears: fortunatiantonio.it

I expected to see: variations of a product to respect the tax option "same as parent" even in translated products

Instead, I got: Default tax is used in second language products, no respect of the "same as parent" option.
Instead, taxes are correctly translated if I specific a tax rate in any single variation (but this is really not handy).

Steps to duplicate the issue:
- add a variable product
- add some variations
- specify a tax rate (different from the default one) in the general product options
- specify "same as parent" in variations tax rate option
- translate the product
- visit website in both language
- add the product to cart in both language
- look different tax rates in original language (tax is the one I specified in general product options) and translated language (tax is the default one of Woocommerce)
- go back and edit the original product, adding the specific tax rate in any single variation
- now taxes are correcty calculated on variable products.

May 8, 2017 at 2:12 pm #1270852

FilippoZ1

PS: if you need access to the website, I already provided all details on this thread
https://wpml.org/forums/topic/bundle-translations-lose-the-filter-variation-option-on-bundled-items/

May 9, 2017 at 5:43 pm #1272055

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

Please go to WPML -> Translation Management -> Multilingual Content Setup and scroll down to the Custom Field section. Click "Show System Fields" and then search for your "tax" fields. Set these fields to Copy instead of Translate or Don't Translate. This should now copy the tax settings to your translated products.

Please let me know if you need any further assistance and I will be happy to help.

May 10, 2017 at 8:46 am #1272513

FilippoZ1

Hi Lauren,
actually that fields are already set to "copy" , and their radio field is inactive (even if I would, I could not change it).

And I think this is an standard behaviour of WCML, as even when editing a translated product in standard wp edit screen, they can't be changed.

I have investigated further, and it looks like first time I translate a product, taxes are correctly copied, but if I update the original product tax, this is not updated in the translated product (I also looked at the db).

NOTE: this happens ONLY if I set taxes of single variations on "same as parent", if I set tax directly on variations they are correctly copied on translations.

But setting taxes on variation level it's really unpractical and error prone.

Please let the compatibility team have a look, I'm quite sure this is not a bad setup issue

May 10, 2017 at 9:54 pm #1273319

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I tested this on a clean install and was unable to reproduce the issue. Here are my steps, so you can confirm that I tested the same way you did.

1. Create a new product called "variable product" and set the product tax class to something other than standard (I set up a reduced tax rate 3.75 and used that for the test).
2. Create the variations, add the price for each variation at $10.00 and set the tax class for each variations as "Same as parent".
3. Translate the product using the translation editor, copy all fields and save the translation.
4. Go to the front end of the site and add the product in English. When I view the cart, the tax amount is $0.38
5. Remove the test product. Change the language to Spanish. Add the translated product to my cart. When I view the cart, the price is the exact same, tax amount is $0.38.

Can you please let me know if you did any steps differently? If not, to best troubleshoot the issue, please make a snapshot of your site using the Duplicator plugin: https://wordpress.org/plugins/duplicator/. This will allow me to try and duplicate the error so that I can run further tests without interrupting your live site.

Once the snapshot is complete, either upload the snapshot ZIP file and the installer.php file to a file sharing service such as Dropbox (and share the link in your reply) or right click the Duplicator links in your wp-admin and paste in your reply.

Please note: It is important to reduce the size of the package so please exclude some paths like /cache or /uploads and also exclude archives and media files.

I will also need the username and password of an account that was created BEFORE creating the duplicator package.

I will enable the next reply to be private so only you and I have access to it!

May 11, 2017 at 6:45 pm #1274207

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for setting up the test site. I was still unable to reproduce the issue. Here's what I did on your test site.

1. Create a variable product called "Laurens Test Product" and add the color attribute as variables. For the general tab I set the Tax Class to standard.
2. Under each variable for this product, set the tax class to "same as parent".
3. Translate the product to English.
4. At this point, when I view the products on the front end, the taxes are the same for both languages, so it works correctly.
5. Go back to the Lauren Test Product and on the general tab, change the tax class to "Ridotta" and leave the variations alone. Click update.
6. Go back to the frontend and again, when I check both languages, after adding the product to the cart, both languages show the reduced tax fee.

So, perhaps you can give me the name of a product where you are seeing this happen? Also, on my test site I used the translation editor to translate the product. On your test site, I see you are using the native woocommerce editor. It didn't seem to make a difference on my test runs, but might be something worth changing on your end. You can change this setting in WooCommerce -> WooCommerce Multilingual -> Settings.

Please let me know if you need any further assistance and I will be happy to help.

May 12, 2017 at 12:25 pm #1274807

FilippoZ1

For example this product with id 266 (Crema di Tartufi Bianchetti)
has tax "ridotta"
but its translation (Bianchetto Truffle Cream)
has tax "standard"

NOTE: at the beginning all products had standard tax, I noticed this just recently because I had to update taxes on several products.
I did not check every single product, but it looks like it does not happen on all products.

On some products, after had set tax rate at variation level, the translations got correctly updated, and correct values are still there after i set back original product variations on "same as parent".

PS: sorry if I did just give you an id and did not post a link, but you know... just a small seo precaution.

PS2: I also use just WCML translation editor t translate products, I just enabled the standard edit screen to check fields evaluation.

May 12, 2017 at 6:57 pm #1275139

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I just checked this product that you mentioned, Crema di Tartufi Bianchetti. In both languages, when I add this product to the cart, I see a tax amount of €2,64 IVA. Perhaps it is a caching issue when you see an incorrect amount right after the update? If you are still seeing a different amount, could you please send me a screenshot?

May 15, 2017 at 10:36 am #1275957

FilippoZ1

Hi Lauren,
here it is

1) screen for italian cart: hidden link - tax is 1,47€
2) screen for english cart: hidden link - tax is 2,92€

in both carts I have removed details for shipment address (different adresses have different shipping cost, and would be difficult to understand taxes in cart)
and I also avoided (in checkout page) to set COD payment method (available only for italy anyway) because it adds up a taxed fee.

correct tax is 1,47€

PS: sorry there are some layout glitches after latest updates, but should not bother your testing.

May 15, 2017 at 8:56 pm #1276646

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

This is very strange because I am not seeing at all what is in your screenshots. When I add the exact same product to my cart, in English or in Italian, the tax amount shows at 2,64. It looks like this:

€29,00 (inclusi €2,64 IVA stimate per il Stati Uniti (US))

Do you see this happening when you are logged in and also if you are logged out?

If you temporarily change the tax settings to add the prodoct price exclusive of tax, does the tax amount show the same?

If you deactivate all other plugins other than WPML and WooCommerce, do you see any different behavior? Please also update WooCommerce and WPML plugins prior to this test. Thanks!

May 16, 2017 at 9:12 am #1276922

FilippoZ1

Hi Lauren,
If I try as non logged or logged does not change the result.
Maybe it's a country related issue? My taxes are extimated for Italy, while yours for USA.
But: italy and usa shoud have the same tax!

Before changing any setup to WC or WP, I would like you to have a look at a debug page we've managed to put online.

You need to login as admin (credentials I gave are ok)
and go to this url:
STAGING-SITE-URL/wp-content/plugins/bulk-woocommerce/examples/list-products.php

Here it lists all published products, along with some attributes.
Among them there'is the tax class ($product->get_tax_class()).

As you can see, in english language products, tax class attribute is always empty, both on simple and variable products.

I don't know if this is normal, but if it is, I would assume that WPML hooks dynamically into cart object to calculate taxes on the fly for translated products instead of really "copying" tax class attribute to translations when creating them (as WPML settings on custom fields shows). But this is weird, because all other attributes (like dimensions and weight) are normally copied on translations.

May 16, 2017 at 5:42 pm #1277544

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for sharing this product page info with me. I see that some of the products have an empty tax class, but many do not. For example, the one that I most recently created shows tax classes for all languages. Can you note anything different you did when creating the products that are showing the empty tax class?

I still think it will be best to disable all non WPML plugins (aside from WooCommerce) and switch to a default theme on your test site simply because this will eliminate a chance of it being a compatibility issue.

June 13, 2017 at 1:00 pm #1297317

FilippoZ1

Please don't close this topic, I'm still investigating the issue. Unfortunately I have other things more urgent, but I'll come back on this in a few days.

thanks

June 13, 2017 at 7:53 pm #1297711

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for the update, this ticket remains open for now.

The topic ‘[Closed] Woocommerce: product Variations Taxes ignores "same as parent" option’ is closed to new replies.