# Restore abandoned cart

**URL:** <https://forum.litium.com/t/restore-abandoned-cart/1990>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [April 14, 2021, 9:46am UTC](https://forum.litium.com/t/restore-abandoned-cart/1990 "2021-04-14T09:46:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickard.niklasson](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@rickard.niklasson](https://forum.litium.com/u/rickard.niklasson)\
**Post date:** [April 14, 2021, 9:46am UTC](https://forum.litium.com/t/restore-abandoned-cart/1990/1 "2021-04-14T09:46:03Z")

</div>

Hi,  
We would like to send out an email to the customer to remind them that they have an abandoned cart at certain times and include a link they can click to restore their cart content.  
Is this possible somehow?

The site is currently configured to store the cart for both anonymous and logged-in users but I’m not seeing any options of restoring the data on our own rather than relying on the cookie being present. We would like to have the functionality available on all devices when the link is clicked (using some type of cart identifier).

I know a similar functionality is available for Klarna but that seems to rely on the data for the entire OrderCarrier being stored by the Klarna AddOn and we are looking for a more general solution if possible.

I’ve looked at using the cart data stored for the cookie-support but everything looks to be internal functionality.

Litium version: 7.6.1

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [April 14, 2021, 10:09am UTC](https://forum.litium.com/t/restore-abandoned-cart/1990/2 "2021-04-14T10:09:47Z")

</div>

Where are the email addresses coming from? Do they exists as persons in Litium?

The shopping cart table has a column `LastUpdatedUserID` which corresponds to a user in Litium. A solution a different project used was to resolve the system id of the user via an identifier in the link and then add an attribute on the controller that would fetch the carts system id for that user and create the necessary cookie. Litium would then see that the cookie was there and load the correct cart.

---

<div class="post-metadata">

**Author:** ![rickard.niklasson](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@rickard.niklasson](https://forum.litium.com/u/rickard.niklasson)\
**Post date:** [April 14, 2021, 11:52am UTC](https://forum.litium.com/t/restore-abandoned-cart/1990/3 "2021-04-14T11:52:20Z")

</div>

The functionality will be used together with a Voyado implementation so the email address could have been identified via a previous newsletter signup or some other interaction on the site where they supply a email address ([Introduction](https://integrate.voyado.com/web-activity-tracking/track-shopping-cart-changes/)). The users do not necessarily exists as persons in Litium.

> [@NilsN](#):
>
> The shopping cart table has a column `LastUpdatedUserID` which corresponds to a user in Litium. A solution a different project used was to resolve the system id of the user via an identifier in the link and then add an attribute on the controller that would fetch the carts system id for that user and create the necessary cookie. Litium would then see that the cookie was there and load the correct cart.

Interesting, so if we have the “ShoppingCartId” connected to the email we should be able to recreate the cookie and therefore the cart content by simply setting the “LitiumShoppingCart”-cookie to that guid value? That sounds reasonably simple and worth testing.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [May 12, 2021, 11:52am UTC](https://forum.litium.com/t/restore-abandoned-cart/1990/4 "2021-05-12T11:52:32Z")

</div>

Closed on May 12, 2021, 11:52am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
