Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Sean Dooley 283 posts 522 karma points
    May 26, 2022 @ 14:10
    Sean Dooley

    Retrieve abandoned cart via email link

    Currently planning an abandoned cart functionality based off the code snippet from

    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.

  • Matt Brailsford 3872 posts 20650 karma points MVP 9x c-trib
    May 26, 2022 @ 14:53
    Matt Brailsford

    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

Please Sign in or register to post replies

Write your reply to: