verbb / wishlist

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

Be able to update a wishlist when sharing it #133

Closed boboldehampsink closed 6 months ago

boboldehampsink commented 6 months ago

What are you trying to do?

I would like to see that passing, for example, fields[custom] to share-by-email would not only include it in the email template, but also save it to the wishlist (provided this field is in the fieldlayout).

What's your proposed solution?

Add the saving of the list element to the share by email controller action

Additional context

No response

engram-design commented 6 months ago

I'll see what I can do here, but I would think that sharing a list is a specific action to share, and not to update anything about the list or items. But I can see how it might make sense to do so.

We do currently support having fields available in your email template - just in case that's not working.

boboldehampsink commented 6 months ago

@engram-design I went ahead and created a PR for this (#134) - It doesn't really change the functionality of sharing, only when the list is yours it gets updated.

I have a use-case for this in which a client can request a quote of their wishlist - and it works by explicitly sharing their wishlist with the shop owner. But for that they also have to add contact data, which I've added fields for in the wishlist field layout. With this update, I can share the list with the shop owner and also save contact data to it at the same time.

engram-design commented 6 months ago

Why, thanks for the PR! I must admit, I hadn't actually looked into how to implement it, but judging from that PR, it wasn't too difficult at all. Appreciate it!

boboldehampsink commented 6 months ago

Cool, thanks!