Skip Navigation

[Resolved] Multilingual (WPML) Woocommerce products related to multilingual pages

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to relate multilingual Products to multilingual CPTs.

Solution: Use the Translation Manager to translate the Products first, then go to WooCommerce > WooCommerce Multilingual > Settings and switch back to "Native WooCommerce product editing screen" temporarily, edit the English Hotels and use the Product Relationship panel to select the parent English Congress. When you are finished assigning the parent Congress posts, go to WooCommerce > WooCommerce Multilingual > Settings and switch back to the Translation Manager.

This support ticket is created 6 years, 7 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.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Author
Posts
#631509

Okay I'm not able to pinpoint a problem here. I even deactivated WPML and all other plugins except Toolset and WooCommerce, and switched to Twenty Seventeen theme. The problem remains, so I have asked my 2nd tier support team for some additional investigation. I will let you know as soon as I have some information to share.

#632533

HI, this is Beda, I wanted to let you know that I am on this.

It will require time to fix up a local install as it seems a complex multisite that wasn't properly exported by Duplicator.

Maybe you could just zip up the folder where the WordPress Install is (of this site) and the respective Database?
If you can send me that I can quickly rebuild this, I think.

Another wise I will dig into the package I received.
It seems an exception, something that is not replicable in a new install or any other install.
Hence most likely it is due to either some other software, code or migration process, translation or mis-setting.

I will find out and update you, but this will not happen before tomorrow afternoon CET.

Thank you for your patience.

#632732

I can try but i'm not a system administrator.

What if i create a Kinsta panel access user just for you???
You can access everything via ssh or sftp

#632916

I should be able to work with that if I can send SSH commands and zip up contents in the FTP, to download them.
Is it possible to as well activate a plugin called "ARI Adminer" https://wordpress.org/plugins/ari-adminer/?
This will allow me to access the Database and export it.

Alternatively, native PHPMyAdmin will do too.

Or simply a zip of the database.

I will as well have the package you delivered already to us, together with all that I should be able to patch it together.
Please as well keep open the access to the live site you provided so I can log in and compare the settings.

I will be with you tomorrow again.

#634844

OK; I see that this system is massively outdated.
I suggest to as soon as possible updating all plugins, WordPress and themes that may need to, in order to be safe with your install.

I exported the Database and the Public folder.
Then I created a local install where I had to disable MultiSite and then edited the Database (user and site) + as well the WP-Config file to match the new install.
I added HTPPS just to have the same as you do.

The DIV "woocommerce-variation-price" is completely empty on the failing products:
hidden link:

<div class="woocommerce-variation-price">
  <span class="price">
    <span class="woocommerce-Price-amount amount">316,00<span class="woocommerce-Price-currencySymbol">€</span></span>
  </span>
</div>

hidden link

<div class="woocommerce-variation-price"></div>

The only difference I find is that the failing product is translated, the working one is not translated.
But for example "Real Fini Baia del Re" as well is not translated and has the same issue.

I see through in the translation of those products that variations are not translated even if the product is translated (Lux, for example)

There was a setting once for this in WooComerce:
https://toolset.com/forums/topic/problem-with-woocommerce-views-add-to-cart-always-reloads-page/
(Different issue but could be related)
That setting does not seem to exist anymore in WooCommerce?

In any case to solve this issue I:
- disabled all must use plugins and customizations to the WP-Config
- Updated WordPress and all plugins/theme
- activated just WPML And Toolset together with WooCommerce (and all related AddOn Plugins)

Strangely I needed to set up WPML + it's WooCommerce AddOn completely from scratch.

No products are on the lists, I needed to create new ones.

I am not able to replicate the issue with that product.
The ShortCode "{!{wpv-woo-buy-options add_to_cart_text="Acquista"}!}"

But my translations include the variations, something that I missed in some of the products of your live site.

I must try to solve this on your install or a staging copy of it, as locally it seems this issue is not even replicable on the very same install.

Can you try to:
- add a new product in a native language
- add variations as WooCommerce wants it
- translate the product

What happens with this product to the front end?

I also need to know if you get any PHP error when you enable PHP and AJAX debugging on the site:
(define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true ); define( 'SAVEQUERIES', true );)

I suspect there is a PHP fatal where you usually see the price, or some other error displayed.

Locally it's adventurous to even deploy the site, as you see it is not really helping.

Maybe we can (we should, it's our only chance) proceed online, or on a staging site.

I suspect after above steps we will know already much more.
It may become required to disable plugins and theme.

#635327

Yea... multisite is a terrible idea.
This is surely last time a create such a site.
I had choose that solution because Kinsta hosting is very good but also very expensive and since the "viaggi" site is very simple and i also need a company page ...
Do you think could be a good idea to switch sites from multisite to single sites?
Is there a way to safely "move" a site from multisite to single site versions without content disruption?
This is what you have done locally?
What's the procedure to follow?

i'll try in the next few minutes to do what you asked me ...

#635478

- Added Beda Hotel in italian language
- Created 2 variations with different prices
The options prices are not visibile
- Translated the english version
The options prices are not visibile
After translation nothing changed
- Enabled in WPCONFIG: define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true ); define( 'SAVEQUERIES', true );
Loading italian or english Beda Hotel page shows No error in front-end screen nor in the errorlog.

Another option is to start again from the congressi.servizinoncomuni.it version.
I have a lot of work to do but it seems we are unable to fix the problem. Probably starting again from there is more easy to find where the problem is...

The kinsta version:
- was created using Duplicator to move the site from servizinoncomuni.it (if i remember well you had some trouble with duplicator)
- the products were translated and related to Congress using the method exposed by Christian in REPLY #630395
From that point, the price never appeared again in kinsta.
Really: i can't be sure if the price was there before trying to translate products but it was (and it is) there before moving to Kinsta so can't be a good idea restarting from there?
The problem is how to move the site without Duplicator.
Since i'm not an expert of this, i can move the files, but not the DB.
Also, i can't be here in the next few hours. I can be here again at 01:00 CEST time (a little bit tired bu t...) or tomorrow from 09:00 CEST time (did you work on sunday?)

#635562

I have added in the above private message the info to access staging env and previous site.

Thanks for now

Giorgio

#637344

I spent the weekend to move the "congress" site from multisite congressi.servizinoncomuni.it to a single site.
I'm working now in hidden link and it's a single site
It seems that the price problem is solved now.
Probably something went wrong with Duplicator in the first mirroring.

I still need help with the Hotel (prodotto) content template.
Setting it as translatable (as it needs to be), it loose something and the page get disrupt.
I had only few hours to sleep and i'm not really able to find the reason why this happen. Can you help with this?

English hidden link
Italian hidden link

Wordpress backend user and password are always the same
I had no time to prepare a new Duplicator package for you and i don't think i use again duplicator since the bad service i got from the product.
You can make test in the old congressi.servizinoncomuni.it since it is now the same as the new congressi.kinsta.com

PLEASE be careful with the new site since i need to go online in a few hours (as soon as we solve the hotel page problem!)

Thanks again for your help.

--------------
FYIO: Still happens also this problem:
https://toolset.com/forums/topic/woocommerce-product-list-problems-in-divi-theme/
It happens anytime you create a new hotel or you translate and relate to the congress an existing one.

#637466

Hi! I'm here again... more desperate that at the start and with very few sleeps done hours. I really really hope you can save me.

It seems to me that some errors are related to WPML and some to wp-types/View
Due to that, I asked for support also to your collegues at WPML.
https://wpml.org/forums/topic/multilingual-woocommerce-products-related-to-multilingual-pages/#post-1569426

Could you syncs with them and Tell me please if i Should continue here or at WPML support forum to get help and support about the actual problems?

These are the actual problems:

----1----
hidden link
hidden link
Why the English page is not listing the congress? They are signed in the map but not listed.
Why the unique congress listed have not the side image?

----2----
hidden link
hidden link
Why in the english page many of the Hotels are not showing the hotel image ?
Why the last Hotel in the list (Lux) did not show his name?
Why the out of stock produce the expected message in the list in the italian version and a different output (no price, no message, ...) in the english version?

----3----
hidden link
hidden link
Why the hotel images are not shown in the english version?
Why the page format of the english version did include the sidebar?

----4----
hidden link
hidden link
Why the english page is not the same as the italian one (buy button, image gallery...)?

#640629

----- UPDATE ------
I have decided to abandon the WPML plugin.
I think all the problems are WPML related.

In the spirit of collaboration and thankful for your efforts, since you are the same company, i'm happy to give you the possibility to make a deep research about what happens to me.
These are the site interested by this odyssea:
congressi.kinsta.com - single site with WPML and wptypes, extracted from multisite using WpMigrateDB
congressi.emiliaviaggi.kinsta.com - multisite with WPML and wptypes - all congress and some hotels are "translated"
congressi.servizinoncomuni.it - multisite with WPML and wptypes - only Esut18-IEA congress is translated and only 2 hotels are translated
For the next few days i don't delete or make any new change in these sites.
You can use this time to copy the sites locally to be able to deep the research on WPML on Multisite Woocommerce with DIVI and Wptypes. I think that your WPML collegues don't have to loose this opportunity.

My last try was to disable/delete WPML.
I made a site copy with kinsta hosting template tool and, in that copy, i deleted WPML using the suggested procedure:
https://wpml.org/forums/topic/my-website-is-httpcarrieho-com-i-like-to-remove-wpml-completely-from-website/
The result was a true nightmare.
Congress posts became duplicated and corrupted: the DIVI editor didn't anymore in the post backend and the post body is filled by, what i think is, the DIVI shortcodes.
I don't spend other time to explain exactly what happens but really, the site was unusable.
The try was repeated for the 3 above site template. In any case was the same result.

So I have decided to abandon WPML and restart dev from congressi.servizinoncomuni.it where still exist a site version with only 2 Hotels and 1 Congress translated so is fast to correct.

I hope my english were sufficiently clear.
Thanks again for your effort up to here.
I don't think i need help anymore about this but please, leave the ticket open for other two days, just the time to verify the full situation. I'm really really tired.
Ciao

#642311

Hello Giorgio.

I apologise, I was on my weekend, (Sunday, Monday) and could not see your replies.

I read thru all of them carefully and will reply in detail.
I see that you made a hell lot of work and progress and still, I would like to shortly go into detail about everything.

1. https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-635327

I think this is a good starter:
hidden link

I did it locally, but as you saw I had issues with the data - refer to:
https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-634844

Strangely I needed to set up WPML + it's WooCommerce AddOn completely from scratch.
No products are on the lists; I needed to create new ones.

I see you succeeded anyway with the task.

2. https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-635478

A lot can go wrong during a Site migration.
Me personally even working in the field, if I have a significant migration I leave it to Server guys.
In private cases, this is the Host service I contract.

We have a DOC on the topic:
https://toolset.com/faq/how-do-i-migrate-a-wordpress-site-from-one-domain-to-the-other/

Duplicator is a useful tool, but some servers don't allow it to run as you need, and only the PRO Version claims to be able to migrate multisites.
But even then, a migration is done correctly (in my opinion) by someone who understands the server administration and database administration to the point.

Even if done right, things can get wrong. I have experienced this as well personally.
Simple internet disruptions can corrupt a database, for example, or a bit can get lost in a package and create issues.

I think this is confirmed by yourself here as well:
https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-637344

I spent the weekend to move the "Congress" site from multisite congressi.servizinoncomuni.it to a single site.
I'm working now in hidden link and it's a single site
It seems that the price problem is solved now.
Probably something went wrong with Duplicator in the first mirroring.

3. https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-637344
From here on we need to move onto new tickets.

This ticket here was about the price display issue that seems now not any more to be a case.
The other issue should be handled in a new ticket.

Content templates rarely are set as translatable, since you usually use WPML shortcodes to send the strings to translation in there, and not the entire Content Template, which as well includes HTML.
Of course, if you have for example different HTML each language then you translate the template.

But all this needs to be handled in new tickets.

4. https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-637344

I see Shane is assigned.
You can proceed there with the issue.

All following tickets you mentioned seem not related to this very issue reported here.

Could you sync with them and Tell me please if i Should continue here or at WPML support forum to get help and support about the actual problems?

This is how you can proceed to get the fastest, and best tailored support:
- report/ask one issue each ticket
- once the issue is solved, do follow up with new issues in new tickets

This will allow me to coordinate the work and give you a proper answer for each issue reported in.

This will benefit you by decreasing the time to solution and as well the clarity of the solution increases - which is crucial for later consultations.

Hence, to conclude:
- we can close this ticket here.
- for https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-637344:
It seems to me this is because you translate those templates, and with tit, the HTML and eventually other parts as well.
This seems to break the layout.
Please open up a new ticket after confirming the issue is not due to wrong translation.
- https://wpml.org/forums/topic/multilingual-woocommerce-products-related-to-multilingual-pages/#post-1569426, https://toolset.com/forums/topic/woocommerce-product-list-problems-in-divi-theme/
Please follow up on that ticket
- https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-637466 point 1,2,3,4 can be reported in one new ticket.
- https://toolset.com/forums/topic/multilingual-wpml-woocommerce-products-related-to-multilingual-pages/page/2/#post-640629
I hope this is not final as we can help you solve all the problems I think when we do it correctly and step by step, addressing the issues one by one, and then settling them