verbb / wishlist

A Craft CMS plugin for wishlists for your users to save things to
Other
11 stars 12 forks source link

Add option signature to remove function #113

Closed TomDeSmet closed 4 months ago

TomDeSmet commented 1 year ago

What are you trying to do?

You can add the same item with a different options object to a wishlist. But there is no way now to remove that item. Removing an item only checks the list and the element ID, but not the option signature. This means that the first item with the ID is removed from the list, but that could be the wrong one.

There is also not an option signature to check if an item is in a wishlist (to change the layout). So whenever a certain element is in the wishlist, it returns true even if it has a different options object.

What's your proposed solution?

Add an optional options object to these functions similar to the add function.

Additional context

No response

engram-design commented 1 year ago

Yep, good point!

TomDeSmet commented 1 year ago

When will 3.0 be released? Because this is kind of an acute issue for us.

engram-design commented 1 year ago

Likely not until early next year, sorry.

engram-design commented 4 months ago

Added in 3.0.0