Skip Navigation

[Resolved] Displaying childs and synchronize with WPML

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by xavierC-2 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#538164

Hi,

Luo helped here (to understand the context) : https://toolset.com/forums/topic/auto-populate-cred-multilingual/

I've a Custom Post which has Woocommerce Product as child. But it's a multilingual website.

When I add a Product with a CRED Form which is on parent page, it adds a product with a parent. Then I've a View I use to display Children of the Parent on parent's page. It works great, but not for the multilingual part.

If I use the CRED Form while I browse in English, the parent of the Product is going to have the ID of the English Parent. So when I'm browsing in another language, the View doesn't display the children, because my parent in French for example doesn't any children. It's the original post in English which has all the translations.

Same thing if I add a Product in French, the view of the French parent will display its children, but their translations still have the ID of the parent in French and the English parent won't have children to display.

I think the problem is with my CRED Form made with the precious help of Luo, the translated products have the parent ID of the parent in the language used with the CRED Form, rather than having the ID of the translated parent.

Other way to explain :
1) Current situation. CRED Form used in French:
FR product has FR parent
EN product has FR parent
View on FR parent displays FR product
View on EN parent doesn't display EN product

2) It should be. CRED Form used in French or English:
FR product has FR parent
EN product has EN parent
Both View display the product, doesn't matter the language

Am I right ? How to fix this ?

I had in mind to set a custom field for the parent, to have a unique "serial number" for each parent, doesn't matter the language, number the product will have and then filter... but I didn't find how to have a View with a query like "if child has the same CF as the parent, then display". And I think it would be more correct to update the custom code Luo had the kindness to create in order to solve this.

#538469

Dear xavier,

I checked the credentials you provided in post:
https://toolset.com/forums/topic/auto-populate-cred-multilingual/#post-531449
It still works, I need details steps for the question:
the View doesn't display the children, because my parent in French for example doesn't any children. It's the original post in English which has all the translations.
How and where I see the problem, thanks

#538529

Hi Luo,

sorry I didn't update the test site with that problem.

I'll do it this evening.

Thanks.

#538846

Please update this thread when your test site is ready, and I need details as I mentioned above, thanks
https://toolset.com/forums/topic/displaying-childs-and-synchronize-with-wpml/#post-538469

#538883

Hi Luo,

Well. On the test site it works as expected. Something was wrong on my development version.

I say was because I think the problem was some translations were missing for the parents.

Anyway, sorry, it's my fault. Everything works as expected.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.