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 22 replies, has 2 voices.
Last updated by Bruno Kos 3 years, 2 months ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
April 12, 2022 at 1:27 pm #11004045 | |
alexanderT-35 |
Dear WPML Team, I am trying to add a Product (English) and its translation Product (German) into a coupon. So that the same coupon could be used on both languages of the website (on the same product, same SKU). At the moment in the coupon settings only an english version of the product can be added. The product window only shows the original product and not its translation (screnshot). When the coupon is done and the product is added - the coupon can only be added to the German version of the cart. Important: After looking into some threads on WPML forums I tried to make coupons translatable in WPML settings (WPML > Settings> Post Types Translation > Post types > Coupons (shop_coupon) > Unlock > Translatable). Now, when the product added to coupon settings it applies the coupon on german cart and not the original english, as it was exactly the opposite before: Coupon only worked on the english cart page. This appears as a glitch. In the past coupons had the option to add both products (the original and a translated version) or they simply worked in all languages. So that no matter which language the user is on, the same coupon could be applied. Looking forward to hear from you as soon as possible. Best, |
April 12, 2022 at 1:50 pm #11004199 | |
alexanderT-35 |
Dear WPML Team, Update: After some more fiddling with the website I realized that if you change the language in the cart the coupon is not being applied again and is being deleted. My sensible guess is that it has something to do with the links? Or what would you say it could be? Alexander |
April 14, 2022 at 7:41 am #11019145 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Thank you for contacting WPML support! So if I understand the issue correctly, simply said coupons do not work in the translated cart? Are you able to reproduce this problem here with only one product and only one coupon? If something else is needed feel free to install, but for coupon functionality it should do. Also you should not translate coupons - that's why we locked them, it is possible to translate them however but we do not advise this because translated products are in essence the same products as in original language with only different texts (while everything else is the same such as stock and shipping), and therefore it makes sense to translate them. Regards, |
April 17, 2022 at 3:56 pm #11035117 | |
alexanderT-35 |
Hi Bruno, Thank you replying, and sorry for a bit of delay, I do still need help with the issue ASAP. The problem is not limited to this coupons not working once the cart is changed to another language... If you go onto the home page: smileicon.eu and change the language to german it goes to smileicon.de/?_gl=1*12mtt6d*_ga*MTkzMzkxMTc1Mi4xNjUwMjA5NTY2*_ga_80FND1G3MG*MTY1MDIwOTU2NS4xLjEuMTY1MDIwOTcxNS4w, in this case english language disappears from the footer language menu. For this same reason the coupons were not working in the shop in my opinion. It seems my problem is not with the coupons themselves but something else instead and coupons are only a symptom of the problem. For this reason also I cannot change the language on a mobile phone. Depending on the page the language either changes to the correct language or the page simply reloads. I think it reloards when the page has that extra link addition. At the moment I have already reverted back to PHP 7.5, cleaned cache in the WPML troubleshoot page, disabled all plugins except WPML on the site but to no avail. I even left only one main menu as before I had a separate menu for mobile and desktop. Still nothing... I cannot wrap my head around the link being changed for a day now. I am not a developer and must do this for my own company but it seems to me that that link change must be the reason for both errors. Please take a look at the screenshots. I am using Enfold Theme. This has never happened before and I have never made any changes to how the menu and language changing works. Hope this is an easy fix and people already had this before. PHP version: 7.4.27 Looking forward to your reply. Best, |
April 17, 2022 at 4:01 pm #11035209 | |
alexanderT-35 |
P.S. I also changed the theme to Twenty Twenty-One and the link is no longer there |
April 17, 2022 at 4:28 pm #11035293 | |
alexanderT-35 |
More screenshots. The back and forth from one language to another is not stable, sometimes I get this after the domain:?xdomain_data= hidden link hidden link The link has now also changed, as you can see it is different to what it was before. |
April 17, 2022 at 4:51 pm #11035407 | |
alexanderT-35 |
Hi again Bruno, Sorry to bombard you with so many messages, but I am still trying to figure this out by myself. I tried removing the Google Tracking code and the link trail no longer appears. The language still does not change from a mobile device. Hope this helps to troubleshoot. Best, |
April 19, 2022 at 9:44 am #11043929 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, I checked all of this - for the language switching, if I try to switch language in the footer it works without issues. So that would indicate the menu switcher not working properly - can you set it not to use dropdown in mobile but listed flags as in footer only? Regards, |
April 19, 2022 at 10:51 am #11044525 | |
alexanderT-35 |
Hi, Thank you for getting back to me! Exactly, the footer switcher works fine unlike the drop down in in the main menu. The language switcher does seem to work if it is set to list. My problem is that if I keep it as a list on mobile, the language list will take a lot of space in the mobile menu especially if more languages are added. They need to be listed under a sub menu. Preferably like the planet language menu alternatively as a WPML default list menu. The thing is that it always worked but now decided to give up on me. (I've added the planet language list yesterday in case I had to get rid of the WPML switcher completely, the planet switcher is not an official WPML and it is only a link, it would be better if the WPML functionality could be kept). Looking forward to your reply. Alex |
April 19, 2022 at 12:39 pm #11045519 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Is this menu built with Enfold? Perhaps it is a compatibility issue with the type of the menu - something we could test in sandbox setup. I have not found such report in our archives though. Can you test this here? With one page translation only and one such menu. Regards, |
April 19, 2022 at 1:09 pm #11045937 | |
alexanderT-35 |
Hi Bruno, Strangely enough the language list work in the sand mode. Yet, I am not sure if all the settings in the sandbox and my installation are the same, yet what to look for. And as I have mentioned, I have turned all plugins off before and the error was still there. Would you have an idea of where could one look to maybe find it in settings? Looking forward to your reply. Best, |
April 19, 2022 at 1:30 pm #11046179 | |
alexanderT-35 |
I think it is worth noting that the sandbox is not using separate domains for languages and only one domain with /language. |
April 19, 2022 at 2:03 pm #11046477 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Can I ask you the following? In order to debug this issue, I will install Duplicator plugin, will create packages and will try this on my localhost and escalate further to 2nd tier. Please set menu in non-working state. I will exclude all the media files, etc, to keep the package minimal. https://wpml.org/faq/provide-supporters-copy-site/ Let me know if this is OK with you. If yes, I will need WordPress admin username and password so I could do this. I marked your next reply private so you can safely add this information. Please make a full backup of your site before sharing this info! Regards, |
April 19, 2022 at 4:51 pm #11047895 | |
alexanderT-35 |
Hi Bruno, Before you do anything, please check whether you experience the same problem on your mobile devices just to be 100% sure. Thank you. Alexander |
April 20, 2022 at 7:42 am #11051831 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Is it not this in fact? The code is exactly the same on sandbox and your site, however on your site you have this: .html_av-submenu-hidden #av-burger-menu-ul li ul { display: none; } This is either a menu setting or custom CSS or something similar, where it hides all the submenus. Can you check this or perhaps ask Enfold developers? Since you have to click on English menu item to open other languages, you automatically click on the English URL and this simply refreshes the page, so you are never able to get to any other language such as German. So clicking on the dropdown arrow in fact only means you clicked on English url. Does it make sense? Regards, |