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: 

This topic contains 3 replies, has 2 voices.

Last updated by Bruno 3 months, 1 week ago.

Assigned support staff: Bruno.

Author Posts
July 3, 2019 at 2:50 pm #4137659

joachimS-9

I am trying to: Im trying to put a product in the cart of our shop using a custom link

/natures-premium/?lang=en/?add-to-cart=11029

But when I click on the button it redirects me to the german version of that site and without putting a product in the cart.

When I'm trying this on the German Version, it works all fine.

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

Notice, that only the Beard Soap (first product) got these Link behind the Add-to-cart-Button

I expected to see:
Put that product in cart an "redirect" to the current page

Instead, I got:
Redirect to the german version of the page

July 3, 2019 at 8:39 pm #4138903

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us.

Since this is only changing one of the products, please as a test, could you disable all non-WPML plugins, switch to the default theme and see if the problem persists?

This will help us know if there is any compatibility problem. If the problem is fixed, please, enable the plugins one by one to see if there is any compatibility problem between these plugins.

Thank you.

July 3, 2019 at 8:49 pm #4138933

joachimS-9

Hi, thanks for your answer. Of course it is not possible to turn off the plugins. The website is an existing one with a well running online shop. I can not take the entire page offline because of this error.

This is a bug that has already occurred with others. Years ago:

https://wpml.org/forums/topic/add-to-cart-button-redirecting-to-wrong-language-cart/

https://wpml.org/forums/topic/code-for-changing-languages-add-to-cart-buton-re-direct-to-cart/

https://wpml.org/forums/topic/custom-add-to-cart-link-not-working-with-languages/

https://wpml.org/forums/topic/english-add-to-cart-redirects-to-default-language-cart/

Meanwhile you should have a solution. The previous requests in this forum didn't help me because of all the hidden links.

Thanks for your help.

July 4, 2019 at 11:14 pm #4146437

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Yet it will be necessary to replicate this problem to see why this is happening. All the links you posted above (some very old ones) may not be directly related to the problem you are reporting.

Is it possible to replicate this in a testing environment? I'll need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Note:

*** Please, can I install the Duplicator plugin (or All in One Migration) to make a copy of your site and install it on my test environment? This will help me debug the problem.

*** Note: Please make a full backup of your site.

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thank you.

The topic ‘[Closed] Add to Cart-LInk does't work’ is closed to new replies.