Vendr has _sessionManager.SetCurrentOrder() which would allow you to load any given order into the current users session (worth noting though, this would potentially loose any open order they may currently have, so worth contemplating if a "merge" feature is required here).
I have wondered about this myself though, and I think how I would have done it is before emailing a link to the customer, set a property on the order (something like "restoreToken") and then include that in the querystring along with the email address and have this link to a controller action which then validates that the given order does indeed belong to that customer email and that the order has the valid restore token on. This ensures people can't just go around restoring other orders into their own session.
Retrieve abandoned cart via email link
Currently planning an abandoned cart functionality based off the code snippet from https://our.umbraco.com/packages/website-utilities/vendr/vendr-support/102965-get-list-of-abondoned-carts#comment-321810.
As long as the cart has an email address we should be able to send email to the potential customer (GDPR?).
When the potential customer clicks the link in the email, they would be taken to the site and their cart would be retrieved.
Not sure if this is the best approach, so any advice would be greatly appreciated.
Vendr has
_sessionManager.SetCurrentOrder()
which would allow you to load any given order into the current users session (worth noting though, this would potentially loose any open order they may currently have, so worth contemplating if a "merge" feature is required here).I have wondered about this myself though, and I think how I would have done it is before emailing a link to the customer, set a property on the order (something like "restoreToken") and then include that in the querystring along with the email address and have this link to a controller action which then validates that the given order does indeed belong to that customer email and that the order has the valid restore token on. This ensures people can't just go around restoring other orders into their own session.
Hope this helps
is working on a reply...