1/ With the new php function the url after switching languages changes correctly.
2/ When changing language with products on the cart, notification only appears when the product is a bundle product (Image 1). For single products, no notification appear and the cart just get emptied automatically when changing language. Is that the normal behaviour? I think this notification of empty cart before switching language should appear always, no matter if this is a single/variable product or a bundle product.
This is the notification (Attached Image-1)
"Switching language?
You've switched the language and there are items in the cart. If you keep the Català language, the cart will be emptied and you will have to add the items again to the cart.
Keep Català | Switch back to Spanish"
3/ Following point 2 - when switching languages on bundle products, there is a "force_switch" function (action) that makes the cart to empty and the page gets clear on the new language.
e.g. url after switching language: hidden link
Instead on single/variable products after the switch lanaguage is done automatically, a notification to add again the products on the cart gets on top of the cart and product pages and never disappears - it also gets duplicated over and over again. (Attached Image 2)
I believe that the "force_switch" action, clears all products and thus no notifications are appearing after this action?
Can you please check on the Staging site: hidden link
and let me know something.