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 31 replies, has 2 voices.

Last updated by Shekhar Bhandari 2 months, 1 week ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
June 25, 2019 at 8:50 am #4082369

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

Thank you for the feedback.

Could you please remove the custom code added to duplicate the ads for a moment and test the issue once?

Let me know how it goes.

Thanks

June 26, 2019 at 6:56 am #4089665

hlaingM

Hi,

So I tested with the removal of the custom codes (i.e. with the parent theme activated) using the following 2 products.

(a) Item posted in English (6/26)
(b) Item posted in 2nd language (6/26)

Here are my findings:
(1) Item posted in English can be purchased when the English language switch is ON, whereas it CANNOT be purchased, though the "Buy this product" button appears when the 2nd language switch is ON.

(2) Item posted in the 2nd language DOES NOT even appear in default English. But it can be purchased online.

Regarding (1), I looked at the backend, Products > All Products >.Item posted in English appears in English, but it is missing when the 2nd language switch is ON at the back-end.

That makes me wonder if we need to do something at (image attached) the WPML Settings> Multilingual setup> product so that the product can be copied to the 2nd language???
(or) change the product setting somewhere?

There at the backend, if you choose a product and scroll down, you will see "Custom Fields": woo_classify_product_ads_ID. It appears that the capability to purchase a product is probably related to that, according to what the developer of the wooclassify plugin said.

Thanks.

June 26, 2019 at 8:09 am #4090313

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

We have a setting "Translatable- use translation if available or fallback to default language" which you are using on ads, but this features only works for default language posts, so when an ad is posted on default language, it's available in secondary language but not vice-versa.

Being so, one of the ways to fix this is to use custom programming work and duplicate the posts/ads on every language available, this way the same product will be available in all languages.

Let me know if this helps.

Thanks

June 26, 2019 at 8:23 am #4090419

hlaingM

Hi,

Just for clarifications so that we are on the same page. I understand that you said that the ads can be copied from default English to the 2nd language. Our issue is apparently concerned with the copying of the product (Products > All Products >....) from the default language to another language. What wooclassify does is that it adds the ad you post as the product into the list of "All Products" at the backend.

Do you see in the image that "the product" is locked? Why is that locked? Can it be unlocked? From what I was told before, WPML is compatible with woocommerce which has the feature to add products into the list of "All Products". How do you usually do for that kind of product-duplicating issue (from default language to another language) with woocommerce?

Thanks.

June 26, 2019 at 8:27 am #4090451

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

I understand that the wooclassify is adding the ads as products.

Do you see in the image that "the product" is locked? Why is that locked? 

This is the default settings if you want to override you can click on the lock icon and change the settings accordingly.

From what I was told before, WPML is compatible with woocommerce which has the feature to add products into the list of "All Products".

Yes, WPML is compatible with WooCommerce.

How do you usually do for that kind of product-duplicating issue with woocommerce?

I don't see it as an issue. The products will not be duplicated in normal scenerio if you wish you can either duplicate it manually or use custom programming code to duplicate it automatically when a new product is added.

Let me know if this helps.

Thanks

June 26, 2019 at 8:38 am #4090485

hlaingM

Hi,

"This is the default settings if you want to override you can click on the lock icon and change the settings accordingly."
-My question/what I meant was if changing the settings at that lock icon can duplicate the products from an original language to another language???

-If it does NOT, do you have any sample/example custom codes or resources for duplicating the products from one language to another? Where/in which specific file(s) can those codes be added?

Thank you very much.

June 26, 2019 at 11:23 am #4092013

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

No, just changing the setting will not duplicate the products.

You will need to use some custom programming work, which is beyond the scope of our support.

At this point I would suggest you consider contacting one of our certified partners from this link:
http://wpml.org/documentation/support/wpml-contractors/

Before doing so please have a look also here:
http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

You will get the custom assistance you need to get on with your project.

Thanks

June 26, 2019 at 8:02 pm #4094971

hlaingM

Hi,

I will have my freelance developer to work on that. The other WPML representative, your colleague, gave me this for the duplicating the posts. Can I also get something like this for duplicating the (woocommerce) product if there is any?

https://wpml.org/wpml-hook/wpml_make_post_duplicates/

https://wpml.org/wpml-hook/wpml_admin_make_post_duplicates/

Thank you.

June 27, 2019 at 5:46 am #4096781

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

If you are trying to use the hooks are similar, products are also saved as custom post type so the above two hooks will work properly.

Let me know if this helps.

Thanks

July 6, 2019 at 6:18 am #4155075

hlaingM

Hi,

Could you please leave this ticket open? My developer uses the sample codes given in those 2 links, but he said that it is NOT working.

Are these codes updated ones? or are you sure those codes serve the purpose?

Thanks.

July 8, 2019 at 5:37 am #4159185

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

Sure, I will keep the ticket open.

The hooks are updated once and can be used to serve the duplicating purpose.

Thanks

July 8, 2019 at 7:47 am #4159607

hlaingM

Hi,

What did you mean by "The hooks are updated once"? Does it mean it has just been updated?

(or) they were already the updated codes?

Thanks.

July 8, 2019 at 8:46 am #4160163

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

I mean they were already the updated codes.

Thanks

July 11, 2019 at 1:33 pm #4190279

hlaingM

Hi,

This issue is related to our discussion regarding the purchase of the woocommerce product. You mentioned that WPML is compatible with woocommerce.

hidden link
hidden link

At those links, you can purchase a product and add the desired quantity of the products to the basket located at the top-left headbar. After you finished adding your product to the basket, you want to browse for more products or you want to switch a language.

The issue is that switching a language makes the products in your basket disappear. You can test that issue at the links provided.

You can test it by registering yourself to open an account (or) I can give you an account's credentials to test that issue.

Awaiting your reply. Thank you.

July 11, 2019 at 2:26 pm #4190817

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

In default, the cart will be reset when you switch a language or currency, but you can use the settings as mentioned in the following documentation and set it different.

https://wpml.org/documentation/related-projects/woocommerce-multilingual/clearing-cart-contents-when-language-or-currency-change/

Let me know if this helps.

Thanks