Skip Navigation

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

Problem:
The client is experiencing an issue where adding 2x composite products to the cart on a translated page results in 4x components being added instead of the expected 2x. This problem does not occur on the original language page, suggesting it might be related to WPML.

Solution:
We recommend the following steps to address the issue:
1. Disable cart synchronization by setting it to the "Reset" option in the WooCommerce Multilingual settings. This can be done by turning on the "Prompt for a confirmation and reset the cart" option for language and currency changes.
2. Resolve the 404 image issue on the website. If uploading images for additional languages is not preferred, add the following code to the top of the .htaccess file and upload a placeholder.jpg to the site's root directory:

RewriteEngine on<br />RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f<br />RewriteRule \.(gif|jpe?g|png|bmp|webp) placeholder.jpg [NC,L]

After implementing these changes, please test to confirm that the issue is resolved.

If this solution does not seem relevant to your situation, please open a new support ticket with us.

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

Last updated by Shekhar Bhandari 1 year, 1 month ago.

Assisted by: Shekhar Bhandari.

Author Posts
November 28, 2023 at 1:57 pm #14940499

jeppeK-2

I am trying to: Add 2x composite product to cart in the translated page

Link to a page where the issue can be seen: hidden link
steps:
1. add this kit to cart
2. go to cart and change qty to 2 pcs instead of 1 pcs. it will now update all components to 4 pcs and not 2 pcs as expected.

I expected to see: 2 kits in cart

Instead, I got: 4 kit contents in cart

Only happens on translated page. Not in original language (Danish). Makes me believe it's WPML issue.

Skærmbillede 2023-11-28 kl. 14.56.05.png
November 29, 2023 at 2:59 am #14945783

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello @jeppeK-2,

Welcome to WPML support, I'd be happy to help you with this.

I can see the issue, it looks like a compatibility issue, If you disable all non-related WPML plugins, and switch to one of the default themes, the problem persist or not?

NOTE:
+ Make a backup (both files and database) for your site before updating/proceeding with anything (Always a good practice!).

Look forward to your reply.

Thanks

November 29, 2023 at 9:07 am #14947517

jeppeK-2

I cannot do this on my production site. And for some odd reason, we do not see this issue in the staging site right now.

Can you please let me know what could be the issue here? Where to look/update?

November 29, 2023 at 9:36 am #14948111

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

Strangely, it will be hard for me to tell the settings without looking at your site settings.

To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

December 4, 2023 at 2:42 pm #14988309

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

I see store pages aren't translated so I suggest going here and creating the pages. hidden link

Except this all settings seems to be configured correctly, so as mentioned previously this can be a compatibility issue.

If the staging site is working fine, and upto date you can also move the staging site to production to elimate the problem.

Look forward to your reply.

Thanks

December 13, 2023 at 8:25 am #15051635

jeppeK-2

Hi. Still looking for the cause of this issue, haven't found yet.

December 13, 2023 at 10:15 am #15052597

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

Have you tried disabling all non-WPML plugins, switching to one of the default themes yet, and checking whether the issue still persists or not?

Please remember to create a backup of your site (both files and the database) before making any updates or changes. This is always a good practice.

Look forward to your reply.

Thanks

December 14, 2023 at 1:22 pm #15063575

jeppeK-2

I have now managed to recreate the issue on staging site. Please try logging into staging site with previous information given.

December 14, 2023 at 1:24 pm #15063581

jeppeK-2

If you let me send private information again, I can send you the product link for you to see the issue live on staging site.

December 14, 2023 at 1:25 pm #15063591

Shekhar Bhandari
Supporter

Languages: English (English )

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

Enabled the private reply for you.

Thanks

December 14, 2023 at 1:40 pm #15063717

Shekhar Bhandari
Supporter

Languages: English (English )

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

Thank you.

I would need your permission to disable/enable plugins/themes on the stagings site also if needed creating a local copy to debug the issue further.

Look forward to your reply.

Thanks

December 14, 2023 at 7:40 pm #15068417

jeppeK-2

Yes you can do that.

December 15, 2023 at 6:35 am #15069587

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

I created a fresh new install to check this issue and I couldn't reproduce the issue there so it must be something within in the site.

I tried to create a package but since the backup of the site seems to be huge, I couldn't create one. Being so can you provide us wp-content & database backups? You should be able to create this using your hosting panel services.

Look forward to your reply.

Thanks

December 15, 2023 at 8:37 am #15070265

jeppeK-2

Yes please let me share this privately.

December 17, 2023 at 2:26 pm #15079043

Shekhar Bhandari
Supporter

Languages: English (English )

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

Enabled the private reply for you.