Display on two conditions either/or

Let’s say a user has a favourites list and a shopping cart. Any items added to the shopping cart are also added to favourites. When a user removes an item from their cart, it remains in favourites (until they explicitly remove it from that list).

The product page shows different buttons depending on what user lists that product is on. If it’s neither on favourites nor in shopping cart, then there is a button to “add to favourites” and another button to “add to shopping cart”. If it’s on favourites but not in cart, the options are to “remove from favourites” and “add to cart”. I can’t figure out a way to stop showing “remove from favourites” when the product is in the cart. I don’t want users to have an item in their cart that is not on their favourites.

Rephrasing… If the product is on favourites, then show “remove from favourites”, unless the product is in the cart.

Hope I’ve been clear. Is there a way to do this?

Sometimes visible. Visible IF current item > FavoritedBy > contains logged in user.

Yes, I got that part. But I don’t want to show “remove from favorites“ if the item is in the cart. (Items in cart are also on favorites.)

you might want to create simple cloneable app to show what you are doing and then someone might solve what you need.

this process can benefit others for their own use cases.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.