verbb / wishlist

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

Adding a lineitem marked as type 'Donation' #112

Closed TomDeSmet closed 1 year ago

TomDeSmet commented 1 year ago

Describe the bug

When adding a lineitem from a cart to a wishlist it is marked in the CP as type "Donation".

edit It's weird I could add a lineItem to the wishlist. I can't reproduce it anymore as a lineItem is not found by Crafts getElementById as it return type as null. Very strange...

Steps to reproduce

  1. Add a lineitem to the wishlist
  2. Check the CP

Craft CMS version

4.2.5.2

Plugin version

2.0.2

Multi-site?

No

Additional context

No response

engram-design commented 1 year ago

Can you provide the code you're using to add a line item to your wishlist? Note that it'd be the purchasable element you're likely adding, not the line item itself (which isn't an element).

As for showing "Donation" I'm not sure what that's about, but likely related to the above. It might be that you're adding the variant, not the product element to the wishlist.

TomDeSmet commented 1 year ago

I would forget about this issue. Cannot reproduce it. I used the line items ID and it worked a few times until it didn’t. It doesn’t make sense either. I changed it to the purchasable item ID as that makes way more sense.