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.

Tagged: 

This topic contains 24 replies, has 3 voices.

Last updated by Bernat Torras 3 years, 3 months ago.

Assigned support staff: Bernat Torras.

Author Posts
January 22, 2017 at 4:58 pm #1187728

solonH

I am trying to: Set up PDF voucher for a product but I have some issues although the author of the plugin says that it's fully compatible with WPML.

URL of (my) website where problem appears: hidden link

Issues:
1) Some properties that I set at "Product Data" in English do not propagate in Greek translation and others appear locked. For example the "Voucher codes" do not propagate in Greek and the "Redeem instructions" are locked in Greek.
2) The vouchers for products I order when I am in English do not appear at My Account --> Orders when I am in the Greek webpage. However, the Orders appear fine besides that.

Steps to duplicate the issue:

January 23, 2017 at 10:36 am #1188127

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

Thank you for contacting WPML support.

#1
Can you please elaborate a little more so I can better understand?

Sometimes screenshots illustrating what you mean may go a long way to clarify what words fail to transmit so if you like make use of "upload an image" below the comment area.

#2
If you disable all non-related WPML plugins - keep WooCommerce active, switch to one of default themes, the problem persists or not?
NOTE:
+ Make a backup (both files and database) for your site before updating/proceeding anything (Always a good practice!).

I look forward to your reply.

Thanks

January 23, 2017 at 11:11 am #1188175

solonH

Hi Shekhar,

Thank you for your message. I asked for Bernat Torras since we worked together many times before and knows my site. Can you please assign the ticket to him?

Thanks again.

January 23, 2017 at 12:48 pm #1188288

Bernat Torras

Hi @solonh,

Mi team mate Shekhar re-assigned me your ticket. Let's see if we can find the origin of your issue and fix it as quick as possible! 🙂

I don't have experience with "WC PDF Vouchers" plugin, so I'll need to ask you for more details in order to get a good idea of what is happening. Could you provide us a detailed explanation of each issue (I'll ask you some questions for each point) and share us backend and ftp credentials to let us take a deeper look at it directly? I'll mark your next reply as private to let you share this data with us in a secure way.

1 - Based on your explanation, it seems like some fields are not set as translatable. Could you go to WPML>Translation Management>Multilingual Content Setup>Custom fields section and check if these fields appear there? If so, make sure you select the proper translation option for them (copy, translate, do nothing) to make you able to use these fields in your translated products.

2- Could you please provide us more information about it? Example urls and screenshots will help.

Thanks,
Bernat

January 24, 2017 at 12:19 pm #1189284

Bernat Torras

Hi @solonh,

I've taken a quick look at your site configuration and plugin code, and I think the main problem relies in the translation options provided by "woocommerce pdf vouchers" plugin. Just to try it, I'd suggest you to follow these points to check if you can get these issues fixed:

1- Edit wp-content/plugins/woocommerce-pdf-vouchers/wpml-config.xml file and search for "_woo_vou_codes" and "_woo_vou_how_to_use" fields.

2- You'll find a <custom-field> line for each one of them. I'd suggest you to set 'copy' as the action for "_woo_vou_codes" field and "translate" for "_woo_vou_how_to_use" field. Something like this:

<custom-field action="translate">_woo_vou_how_to_use</custom-field>
<custom-field action="copy">_woo_vou_codes</custom-field>

3- Save the file.

4- Try to edit any of your products and add voucher codes and "how to apply" information. Then, translate your product to your secondary language and check if voucher fields are copied and if you're able to translate the "how to apply" instructions.

If you're able to translate your product, try to purchase it and check if the voucher codes (and all the info) appear in the My Account-->Orders page.

Thanks,
Bernat

January 24, 2017 at 10:04 pm #1189905

solonH

Hi Bernat,

Unfortunately it didn't work. I still did not get the Voucher Codes in Greek and the Redeem instructions appears locked again.

Please feel free to try it yourself.

Thanks.

January 25, 2017 at 2:07 pm #1190502

Bernat Torras

Hi @solonh,

Could you try to go to WooCommerce>WooCommerce Multilingual>Settings and select "WPML Translation Editor" as your product translation interface? Once changed, try to translate a product (or edit a product translation) and check if "Woo vou how to use" field appears (it should appear and it shouldn't be locked there). If so, try to add a translation and check if everything else is working as expected.

Thanks,
Bernat

January 25, 2017 at 6:21 pm #1190766

solonH

Hi Bernat,

When I select "WPML Editor" I can no longer edit a Product in Greek the regular way. When I click to translate an english product it automatically takes me to WooCommerce>WooCommerce Multilingual>Products where you can only translate a limited amount of fields and I cannot even see the Product Data.

Thanks.

January 26, 2017 at 6:42 am #1191080

Bernat Torras

Hi @solonh,

This is the WPML translation editor and in case of products, it will only show you the fields that are set as translatable. The rest of your fields (even if they don't appear here) will be automatically synchronized to your translations). Could you try it and check if after translating a product this way, the voucher codes are copied to your translated product and if you can set a different "how-to-use" translation?

Thanks,
Bernat

January 26, 2017 at 9:43 pm #1191881

solonH

Hi Bernat,

I am not sure what you mean. How can I check if the voucher codes are copied and if I can set a different "how-to-use" translation, since I cannot even see the product with all the fields? 🙂 I can only see the WPML translation editor which doesn't display those fields.

If you mean that when I am done with the translation I should go back to WooCommerce>WooCommerce Multilingual>Settings and select "Native WooCommerce product editing screen" again, I did that. But I still get the same issues. The voucher codes are not copied and the "Redeem instructions" displays the english text and it is locked.

Thanks.

January 27, 2017 at 11:17 am #1192256

Bernat Torras

Hi @solonh,

Here are the steps that I'm suggestion you to follow in order to translate your products (and confirm that codes are copied):

1- Go to WooCommerce>WooCommerce Multilingual>Settings and select "WPML Translation Editor" option

2- Edit your original product ("PowerMaster 12,000mAh LED Dual-USB Power Bank" for example)

3- Click the Greek link to edit the translation

4- You'll be redirected to WPML's Translation Editor. There you should see only the fields that need translation (the rest will be automatically synchronized) including the 'how to use' field. Please translate it from there, mark the translation as complete and save it.

5- Go bak to WooCommerce>WooCommerce Multilingual>Settings and select "Native WooCommerce product editing screen" option.

6- Edit your translated product.

7- This time you'll be redirected to WooCommerce native editor. There you could check if the 'how to use' field has the translated value and if the voucher codes have been copied from your original product.

Could you check and confirm us if its working?

Thanks,
Bernat

January 28, 2017 at 10:51 am #1192871

solonH

Hi Bernat,

After I did what you suggested the Voucher Codes were copied and I was able to translate the "how to use". I placed a test order and everything worked fine with my coupon/voucher. The only problem is that at the WPML's Translation Editor in custom fields I can only write one single line in the translation of "how to use". I am supposed to write several detailed instructions in that field. What can I do about that?

Also, the changes I did at wp-content/plugins/woocommerce-pdf-vouchers/wpml-config.xml to make this work, I will have to do them every time I update the plugin right? That what not be a problem but I am just asking.

Thanks.

January 30, 2017 at 10:10 am #1193454

Bernat Torras

Hi @solonh,

Good to know its working now. You should be able to set any custom field style to textarea instead of the default simple line field by using "style" attribute. You can read more about this in wpml-config.xml documentation page (https://wpml.org/documentation/support/language-configuration-files/) but as an example, you could use something like this:

<custom-field action="translate" style="textarea" >_woo_vou_how_to_use</custom-field>

Can you try it and confirm us if the field appears as a textarea now?

In case you don't see it yet, try to complete the translation first, and then send it again for translation. Or you can also try to create a new test product and translate it to verify if it appears fine.

Yes, all modifications to this plugin file will be lost after updating the plugin, but I've reported our Compatibility team that this plugin needs some changes in its wpml-config.xml file (to copy the codes and make users able to translate the instructions and other fields) so they'll contact the plugin authors to update the file with the proper values. Then, if the user agrees, you should see these changes already applied in future updates.

Thanks,
Bernat

January 30, 2017 at 10:22 pm #1194305

solonH

Hi Bernat,

Unfortunately it doesn't appear as a textarea after I did the suggested change.

Also I would like to ask, if I update the plugin and all modifications to the plugin are lost what happens to the translated products? Is there a chance of messing up my completed translations or it won't affect the products I already translated?

Thanks.

January 31, 2017 at 10:09 am #1194607

Bernat Torras

Hi @solonh,

Ok, I'll escalate the issue to compatibility team to check if there's any conflict with these field styles...

Regarding your question, no, if a new update changes the translation options of the current wpml-config.xml file, the changes will only be applied to new translations. For example, in the case that one custom field set to 'translate' reverts to 'copy', you won't see it again in the Translation Editor when creating new translations (as it will be automatically copied to translations), but if you've already translated it in previous translations, they will still be there. Just take in mind that if a custom post is set to copy and you update a product, this field will get automatically copied to all its translations. So in short, these changes will only be applied when creating new translations or updating your products.

Thanks,
Bernat