# DataFirefly Cart History & Restore Links: cart history and restore links

> Installation Install the module from Modules > Module Manager > Upload a module with the ZIP file. The same ZIP works on PrestaShop 1.7.8, 8 and 9. Installation creates four…

- Page: <https://www.datafirefly.com/en/documentation/dfcartrestore/>
- Language: en
- Last updated: 2026-11-18
- Other languages: [fr](https://www.datafirefly.com/documentation/dfcartrestore/index.md), [es](https://www.datafirefly.com/es/documentation/dfcartrestore/index.md), [de](https://www.datafirefly.com/de/documentation/dfcartrestore/index.md), [it](https://www.datafirefly.com/it/documentation/dfcartrestore/index.md), [pl](https://www.datafirefly.com/pl/documentation/dfcartrestore/index.md), [nl](https://www.datafirefly.com/nl/documentation/dfcartrestore/index.md), [pt](https://www.datafirefly.com/pt/documentation/dfcartrestore/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

## Installation

Install the module from **Modules > Module Manager > Upload a module** with the ZIP file. The same ZIP works on PrestaShop 1.7.8, 8 and 9.

Installation creates four tables (links, restorations, journal, rate limiting), adds the **Customers > Cart links** page and the **My saved carts** page of the customer account. No native table is altered: restored carts are ordinary PrestaShop carts.

### Upgrading from version 1.0

Upload the 2.0.0 ZIP over the old one. Settings and the restoration log are kept. A link validity of 0 (no expiry) becomes 90 days, because links now always expire.

Version 1.0 links stored nothing on the server, so they cannot be converted. They keep working during a transition period of at least 90 days, with their own expiry date, then stop. The configuration page shows the end date and a button to stop them right away.

## How a restore link works

A link never transfers a cart. When someone opens it, they see the products, then get a copy of them in their own cart.

- The original cart, its customer, addresses and order are never modified or shown.
- Nobody is logged into another account, unlike the native PrestaShop recovery link.
- Prices, promotions, stock and minimum quantities are those of the visitor, on the day of the restore.
- Free gift units, gift wrapping fees, payment link amounts and vouchers generated by other modules are recalculated, not copied.

![Preview of a shared cart with today's prices and availability](https://www.datafirefly.com/wp-content/uploads/2026/11/shared-cart-preview-dfcartrestore-en.webp)

The preview shows the products only, with today's prices and availability. Nothing is added before the visitor confirms.

## Creating a link from the back office

Open a cart in **Orders > Shopping Carts**. The **Restore links** panel at the top of the page lists the active links of the cart and offers **Create a restore link**. The customer page has the same button in the **Carts and restore links** block.

![Restore links panel on the cart page of the back office](https://www.datafirefly.com/wp-content/uploads/2026/11/restore-links-cart-back-office-dfcartrestore-en.webp)

Active links of the cart, who created them, when they expire, how many times they were opened and restored.

The dialog shows what the recipient will get, with today's prices and availability. Choose the options, then click **Create the link**:

- **Valid for**: from 1 to 365 days, 14 by default.
- **Single use**: the link stops working after the first restoration.
- **Reserved to the customer of the cart**: the visitor must sign in to that account. Otherwise anyone with the link gets an anonymous copy of the products.

![Link created with expiry, single use, QR code and sending by email](https://www.datafirefly.com/wp-content/uploads/2026/11/restore-link-qr-code-email-dfcartrestore-en.webp)

Copy the link, scan or download the QR code, or send it by email with a personal message.

The full link is shown only once. The shop keeps a fingerprint of it, like a password, and cannot display it again. If you lose it, create a new link and revoke the old one.

## Sending a link by email

Right after creating the link, enter the recipient (the customer's address is filled in) and an optional message, then click **Send the email**. The email uses the `dfcartrestore_link` template, in the language of the cart, and lists the products. The journal records the sending with a masked address.

![Email sent with the shop template and the list of products](https://www.datafirefly.com/wp-content/uploads/2026/11/cart-restore-email-dfcartrestore-en.webp)

The email sent to the customer, with the button, the expiry date and the list of products.

## What the visitor sees

The link redirects at once to a preview page whose address no longer contains the token. The visitor can untick products, then clicks **Add these products to my cart**. If their cart already contains products, they choose **Add to my cart** or **Replace my cart** (the replaced cart stays in My saved carts).

After the restore, a message lists the products added, the quantities changed (stock, minimum quantity, limit set by the shop) and the products not added with the reason: no longer available, out of stock, option to choose again or personalisation to fill in again.

## My saved carts

The **My saved carts** link appears in the customer account. The page lists the customer's carts with thumbnails, today's total, the availability of each product and the order reference when the cart was ordered.

![My saved carts page: restore a cart or add only some products](https://www.datafirefly.com/wp-content/uploads/2026/11/saved-carts-customer-account-dfcartrestore-en.webp)

Each cart can be restored in one click, or the customer ticks only some products.

- **Restore this cart**, or **Replace my cart** and **Add to my cart** when the current cart is not empty.
- **Add only the selected products** in the product details.
- Pagination, history period and display of ordered carts are set in the configuration.

![Saved carts on mobile](https://www.datafirefly.com/wp-content/uploads/2026/11/saved-carts-mobile-dfcartrestore-en.webp)

The page adapts to phones.

## Sharing a cart from the account

With **Share**, the customer creates a link for a colleague or a relative. A window explains that the recipient sees the products only, without the customer's name, addresses, orders or personalisation texts. The link is valid 7 days by default and is listed under the cart with a **Disable** button.

![The customer shares a cart: products only, link can be disabled](https://www.datafirefly.com/wp-content/uploads/2026/11/share-cart-link-dfcartrestore-en.webp)

The share window and the link ready to copy.

## Cart links page

**Customers > Cart links** gathers:

- the activity over 7, 30, 90 or 365 days: links created, links opened, restorations from a link or from the account, restorations followed by an order, active links;
- the links, filtered by status (active, expired or used, revoked), with a **Revoke** button;
- the restorations and the journal: who created, sent, opened or revoked each link.

![Cart links: activity, active links with revocation and journal](https://www.datafirefly.com/wp-content/uploads/2026/11/cart-links-dashboard-dfcartrestore-en.webp)

Plain counts of what happened in the shop: an order placed after a restoration is not necessarily caused by it.

## Settings

### Customer account

- **Show the cart history in the customer account**.
- **When the current cart is not empty**: let the customer choose (recommended), replace or add.
- **Show carts already converted into an order**, **Carts per page**, **History period (days)**.
- **Let customers share a cart** and **Validity of customer share links (days)**.
- **After restoring, send the customer to**: cart page or checkout. The cart page is always used when something was adjusted or not added.

### Restore links

- **Default link validity (days)**, **Single-use links by default**, **Reserve links of customer carts to that customer by default**.
- **Carts already ordered**: allow links (to reorder the same products) or refuse them.
- **Carry over voucher codes**: never, only when customers restore their own cart, or also for links. Only codes valid for the visitor are applied; codes reserved to another customer and codes generated by modules never travel.
- **Invalid link attempts allowed per 10 minutes** and **Keep the journal and ended links (days)**.

At the bottom of the page, **Revoke all active links** stops every link of the selected shops.

## Security

- Each link is a random 256-bit token. Only its SHA-256 fingerprint is stored, plus its last 4 characters to identify it in the lists.
- The token is moved into the encrypted PrestaShop cookie and removed from the address before the page is displayed, so analytics tags and Referer headers never see it. Pages are sent with `Referrer-Policy: no-referrer` and `noindex`.
- Nothing is added before a confirmation with a security token: mail scanners and chat previews that open links on their own never create carts.
- After 20 invalid attempts in 10 minutes (adjustable), links are refused for 10 minutes. No IP address is stored.
- A link only works in the shop of its cart.
- Restore links are refused while an employee is connected to a customer account (login as), during a password-less payment link session and in catalog mode.

## Permissions

Creating or sending a link requires access to Shopping Carts and Customers, and the Add permission on **Cart links**. Revoking a link requires the Edit permission on **Cart links**. An employee without access to the module does not see the panels.

## Personal data

Ended links and journal rows older than the retention period (365 days by default) are deleted automatically. When a customer is deleted, their links are revoked and their traces anonymised. The module answers the export and erasure requests of the official GDPR module.

## For developers

- `actionDfcartrestoreAfterRestore`: after each successful restore, with `id_cart_source`, `id_cart` and `origin` (`link`, `legacy` or `account`).
- `actionDfcartrestoreCustomizationCopy`: after a personalisation is copied, with `id_customization_source`, `id_customization`, `id_cart_source` and `id_cart`.

## Troubleshooting

### The panel does not appear for some employees

Check that their profile can view the module, Shopping Carts and Customers (**Advanced Parameters > Team > Permissions**).

### "This link is not valid."

The link was truncated by the email client, or it does not belong to this shop. Create a new link.

### "This link has expired", "has been disabled" or "has already been used"

The validity period is over, the link was revoked, or it was single use. Create a new link.

### "Too many attempts."

Too many invalid links were opened from the same address. Wait 10 minutes.

### The emails do not arrive

Check the email settings of the shop in **Advanced Parameters > E-mail** and send a test email.

## Compatibility

- PrestaShop 1.7.8 to 9.x with the same ZIP, PHP 7.1 to 8.5.
- Classic and Hummingbird themes.
- Multistore, multilingual and multicurrency.
- Back office, storefront and emails in French, English, Spanish, German, Italian, Portuguese, Polish and Dutch.
