Home › Forums › WoodMart support forum › WMPL can not translate woodmart single product layout
WMPL can not translate woodmart single product layout
- This topic has 13 replies, 2 voices, and was last updated 7 months, 2 weeks ago by
Artem Temos.
-
AuthorPosts
-
July 13, 2024 at 11:10 am #583082
ipaybomParticipantMy WMPL always gets stuck when translating single product layout files.
Attachments:
You must be logged in to view attached files.July 14, 2024 at 7:05 pm #583230
ipaybomParticipantI have queried the log ,it is because of a control error in a single layout file, very similar to the following case, please let me know how to fix it, thanks!
https://xtemos.com/forums/topic/single-product-layout-stuck-in-translation-wpml/
Attachments:
You must be logged in to view attached files.July 14, 2024 at 7:23 pm #583233
ipaybomParticipant1. When I use the control: frequently bought together
This control causes WMPL to get stuck and keep trying to translate but it doesn’t complete properly.2. I’ve tested that when Product gallery uses “inherit from theme Settings”, it also causes WMPL to get stuck and not translate properly.
Attachments:
You must be logged in to view attached files.July 15, 2024 at 9:36 am #583283
Artem TemosKeymasterHello,
Please disable any plugins not directly related to our theme and provide us with your admin access details. We will log in to your dashboard and investigate the issue. Please ensure that you only keep the following plugins that are necessary for our theme to work correctly:
– WoodMart core
– WooCommerce
– Elementor/WPBakery Page BuilderThank you in advance.
July 15, 2024 at 10:26 am #583296
ipaybomParticipantExtra information
July 15, 2024 at 3:53 pm #583441
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
add_action( 'woocommerce_before_template_part', function () { global $product; if ( wp_is_json_request() && ! $product ) { $random_product = new WP_Query( array( 'posts_per_page' => '1', 'post_type' => 'product', ) ); while ( $random_product->have_posts() ) { $random_product->the_post(); $product_id = get_the_ID(); } wp_reset_postdata(); $product = wc_get_product( $product_id ); } } );
July 15, 2024 at 4:21 pm #583451
ipaybomParticipantAfter using this code, the translation works, but “Frequently bought together” is not displayed properly in other languages.
July 16, 2024 at 11:38 am #583630
Artem TemosKeymasterYou need to allow “FBT” translation first https://monosnap.com/file/ggF3rvIA2YZ3qv8zmEqqYiT1axISRw
Then you need to create these translations.July 16, 2024 at 1:15 pm #583668
ipaybomParticipantAfter my tests, it still doesn’t show up. Even after clearing the cache with wp -rocket, it doesn’t display correctly in other languages.
July 16, 2024 at 3:30 pm #583706
Artem TemosKeymasterWe have created a test translation (https://monosnap.com/file/XM5eGXaefiOCh8qPYfRGctmbPuRxtP), connected it to the product’s translation (https://monosnap.com/file/eptpjUqgkVO6HnSK2YAGz295Fq0KUd) and now it works correctly (https://monosnap.com/file/iojD3KLagCwobaPRJnA95OZtSOShtd)
Please test it from your end.
July 16, 2024 at 3:45 pm #583710
ipaybomParticipantPlease note the contents of the attached document.
July 16, 2024 at 5:48 pm #583739
Artem TemosKeymasterTry to do the following instead.
1 – Disable translations for Frequently Bought Together
https://monosnap.com/file/GaMGi96C2RN3n1FHzlXtaZeeOQGTpP2 – Enable copy translation of custom fields for
woodmart_fbt_bundles_id
https://monosnap.com/file/kOMplso0o4w9bKOrbJMql0uQqqp3iV3 – Save the product translations again
https://monosnap.com/file/l9TMeR0U85LnDLUV7VjLyG1ud6lW7xJuly 16, 2024 at 6:09 pm #583740
ipaybomParticipantThank you very much for your help, it works fine, thank you, very professional.
July 17, 2024 at 9:40 am #583847
Artem TemosKeymasterYou are always welcome. Feel free to contact us if you have any further questions.
-
AuthorPosts
The topic ‘WMPL can not translate woodmart single product layout’ is closed to new replies.
- You must be logged in to create new topics. Login / Register