This thread is resolved. Here is a description of the problem and solution.
Problem:
The client reported an issue where a visitor (not logged in) adds a translated product to the cart, but the default language product is added instead. This problem occurred after making changes to the visibility of the English language and the product translation settings in a Woodmart theme environment.
Solution:
We resolved the issue by enabling the "Language filtering for AJAX operations" option in WPML > Languages. This solution worked for both logged-in and logged-out users, ensuring that the correct language product is added to the cart. We confirmed that enabling this option should not cause any performance issues, so no further troubleshooting is necessary.
If this solution doesn't look 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.
Tagged: Bug
This topic contains 20 replies, has 2 voices.
Last updated by Kor 1 year, 1 month ago.
Assisted by: Kor.
Author | Posts |
---|---|
October 25, 2023 at 4:27 pm #14663229 | |
nikolaosM |
Hello, I found out that when a visitor (not logged in user) is adding a translated product to the cart, the default language product is added in it. I am using woodmart theme and I have enabled the sidecart to open when a user adds a product in the cart. I used to have english language hidden for visitors and product + product variation to be translatable and if there was no translation the default language product sould show. Our customers had start to translate some product with the above settings active. Today we decided to show the english version to the visitors so we "unhide" the english language and changed the product + product variations to show only the translated in the front end. After doing this we run some test to check if everything is working fine and and even when we were loggen in with an admin account we were able to see the translated product in the cart, when we tried it from an incognito window as visitors when we press add to cart to an english variation the greek on was added in the cart and the buttons in the sidecart were redirect us to the greek versions of the pages "Cart" and "Checkout". As you can understand the theme adds products in the cart using ajax (I don't know if ths has anything to do with it). We have also cleared the cache without any changes. Why is this happening only for the logged out users of the e-shop? How can I fix it? Thanks! |
October 26, 2023 at 4:05 pm #14672573 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for contacting WPML support. Please could you update all WPML plugins to the latest version? Then, I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified. Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements. Your upcoming reply will be treated with confidentiality and will only be visible to you and me. ✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup. |
October 31, 2023 at 2:58 pm #14701397 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thank you for getting back to me. Apologies, could you please provide a step-by-step guide on how to reproduce the issue? I've verified the languages on this page: hidden link , and it appears that the English (EN) language is still hidden. I've logged in and attempted to add a product to the cart, then switched languages, and everything seems to be functioning correctly. Should I unhide the English (EN) language and attempt to add a product in that language to identify the issue, or is there another way you suggest to replicate it? |
November 1, 2023 at 8:55 am #14706001 | |
nikolaosM |
1) unhide the language. |
November 2, 2023 at 8:17 am #14713199 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your reply. I can see the issue now. However, it seemed to work fine when I refreshed the page. This could be caused by a 3rd party plugin. Do you have a staging site where we can perform full troubleshooting? I would like to deactivate some 3rd Party plugins to see if it fixes it. |
November 3, 2023 at 7:51 am #14723155 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your reply. Could you please update the sitekey on this staging site? I'd like to update the WPML plugins. hidden link |
November 3, 2023 at 8:26 am #14723273 | |
nikolaosM |
You are ready. Although I don't think this problem has to do with updates as you saw on the live site. |
November 3, 2023 at 5:30 pm #14727765 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your reply. We apologize for the inconvenience, but in order to proceed with troubleshooting, we kindly request a site snapshot. Alternatively, with your permission, we can create a snapshot on our own. For this purpose, we typically recommend using the free plugin "Duplicator." If you are already familiar with how Duplicator works ( https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded. To assist you further, please follow these instructions: Refer to the instructions provided by WPML on how to provide supporters a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/ If the archive file exceeds 400MB in size, please utilize Duplicator's file filters to exclude the cache, wp-uploads directory, media, and archive files. Once you have the archive file, please share the link with us. You can use services such as Google Drive, Dropbox, or similar platforms as the snapshot file will likely be large. Please note that your next reply will be private, visible only to you and me. You can paste the link to the file there. Rest assured that once the issue is resolved, I will delete the local site. |
November 7, 2023 at 6:57 pm #14751115 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your reply. I've requested access to your files and could you please grant it? |
November 8, 2023 at 8:26 am #14753489 | |
nikolaosM |
Just did it! |
November 10, 2023 at 8:37 am #14773379 | |
nikolaosM |
Hello, Any updates? I have been waiting for two days now! |
November 10, 2023 at 8:41 am #14773453 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your reply. I apologize for the delay. Just letting you know that I'm still checking on this and I will come back to you as soon as possible. |
November 11, 2023 at 2:41 pm #14782207 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
I appreciate your patience. I have imported the site into my local development environment, and I've found that the issue still persists. However, when I attempt to recreate the problem from scratch, it works without any issues. Therefore, it appears that the problem is specific to your website setup. I will need to escalate this matter to our 2nd Tier support for further assistance. I will get back to you once I have received their feedback and recommendations. Here is our test site hidden link Product page : hidden link |
November 15, 2023 at 9:04 am #14805767 | |
nikolaosM |
Hello, Any news? I have been waiting for 4 days now. |
November 15, 2023 at 5:31 pm #14819443 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your patience. I've checked the report and it's still under investigation. I apologize for the delay and I will come back to you once I have feedback. |