Skip Navigation

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.

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

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 13 replies, has 2 voices.

Last updated by Andreas W. 1 month, 2 weeks ago.

Assisted by: Andreas W..

Author Posts
March 7, 2024 at 2:51 pm #15385038

dimitriosM-2

I am trying to: Not do anything strange

Link to a page where the issue can be seen: hidden link

I expected to see: The variation page to appear after selecting all attributes

Instead, I got: It doesn't appear which ruins some JS code I got running. This issue didn't occur before 15th September 2023

image with var price.png
image without var price.png
March 7, 2024 at 2:54 pm #15385072

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I just visited your product in both languages and I was able to select an attribute and reach the checkout in English and Greek.

The only issue I see is that the attribute names are not translated.

Can you please revise and confirm if you need further assistance?

Best regards
Andreas

March 7, 2024 at 3:03 pm #15385098

dimitriosM-2

I have custom code that works for certain user roles in the page that needs the circled elements to appear. I am attaching screenshots.

The element <div class="woocommerce-variation-price"><span class="price"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">€</span>26,900.00</bdi></span> <small class="woocommerce-price-suffix">με ΦΠΑ</small></span></div> appears properly in greek pages but is missing in english pages.

This issue didn't happen for products added before last September.

yudo1.png
yudo2.png
image with var price.png
image without var price.png
March 7, 2024 at 3:15 pm #15385210

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

How exactly are you creating this custom code?

March 7, 2024 at 3:16 pm #15385212

dimitriosM-2

I don't see how that matters. The code works fine in older products.

March 7, 2024 at 3:22 pm #15385327

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

It matters when it comes to the translation. Please explain in detail how this code is implemented.

Are you using PHP or HTML?

March 7, 2024 at 3:25 pm #15385334

dimitriosM-2

The code is PHP functions inserted in the child theme. Changing the theme (thus disabling the custom code) still has the same issue. The variation prices don't appear on the last products of the site.

March 7, 2024 at 3:29 pm #15385343

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Could you please send me the code snippet?

March 8, 2024 at 7:40 am #15387444

dimitriosM-2

No, sorry I can't. It's not a small snippet. Plus, as I've said, the code is in a child theme and switching themes still has the same issue.

March 8, 2024 at 11:52 am #15388921

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again.

If you are unable to provide such a copy of the site for testing, please let me know on this ticket.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

March 8, 2024 at 2:09 pm #15389692

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

In the file functions.php of your Child Theme on line 758, I found the respective function and it uses HTML. You can not translate strings coming from HTML with WPML. The strings need to be coded in PHP.

See screenshot.

Guide:
https://wpml.org/documentation/support/translating-the-theme-you-created/

function.png
March 8, 2024 at 2:32 pm #15389853

dimitriosM-2

Feel free to use a different theme without custom code. I did and I still have the same problem. The latest products don't display their variation prices in english, only in greek.

March 8, 2024 at 2:45 pm #15389894

dimitriosM-2

I never said that I have trouble translating my custom code. I am having an issue with basic Woocommerce functionality. The strangest thing is that it works perfectly for older products but the newest ones have the following issue:

The site doesn't generate the code that displays the variation's price after the user selects the proper options. This is the price that appears before the Add to Cart button on the woocommerce product page.

I've tried updating all plugins and themes. I've even downgraded WPML to older versions. I've switched theme. Still the same problem.

This happens in new products as well.

March 8, 2024 at 3:35 pm #15390101

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

It looks ot me as if you declared some attributes directly as custom attributes on the product and such attributes can only be translated when translating the product with the WPML Translation Editor.

Please enable the WPML Translation Editor in the right sidebar of the original product and complete the translation to 100%.

If this does not solve the issue, let me know.

The topic ‘[Closed] Price of variation doesn't appear on translated product page’ is closed to new replies.