-
Notifications
You must be signed in to change notification settings - Fork 67
Cart handling requirements / ideas for discussion #537
Comments
My cart shows categories only from default language product, meaning only in that language, while viewing with any language. I wasnt aware there are standing issues regarding cart, but i am very curious as we soon publish a website with this. |
@dirad cart is not related to categories, it merely shows cart contents (products) in the correct language. There are no particular standing issues other than some possible compatibility issues with some third party plugins. |
@Jon007 Thanks for replying. Can you point me in the right direction to solve this? |
@dirad no I can't, I have no idea what you mean, this issue is about products in the cart, |
Thank you for breaking this down @Jon007 Imo, the first option is more appealing to me, but with a small change. When the user changes the language the cart should be emptied. Is there any reason that you might need your products in another language? I can think many edge cases that can go bad. I think we need to drop the current behavior of the plugin in order to reduce the overall complexity. Keeping a 1 to 1 connection between products in different languages is hard. Let alone, polylang is built in order to be able to create two complete different sites with no connection whatsoever. I am willing to implement this (if we agree on this), but I don't know how polylang changes the locale behind the scenes. I searched for a hook on language change but I didn't find anything. I can dive deeper in the polylang source to find a solution. Any pointers are welcome. |
|
I completely agree with both of your statements. I'll try to explain a bit better what I mean. When I said keeping 1 to 1 connection between languages, I didn't mean programmatically but as an end user. You don't always have the same products for all of your languages (You usually you do, but there are also cases that some people don't want some products in all languages). Regarding the two separates sites, you are right, I don't know why somebody might do this but he can do that if he wants to. I just gave it as an edge case. I wrote these examples as the reasoning for my proposal. What do you think about clearing the cart on language change? |
it could be an option, but I'm not sure what is the use case, it what situation that option is desirable. |
Cart handling has caused a number of issues and requests to turn it off over the years, because:
So there are multiple possible approaches here:
One relatively easy solution is to make the cart handling a feature option such that the current behaviour can be turned off.
Some cart handling may still be needed though to make sure cart items don't just disappear when when changing language.
Comments/votes welcome.
The text was updated successfully, but these errors were encountered: