Search by

prestashopheaven / runtime-cart

georgevanengers

Cart helpers: the link that reopens a customer's cart from an email (PrestaShop's own recover_cart link, which also logs the customer in).

Package info

github.com/prestashopheaven/runtime-cart

pkg:composer/prestashopheaven/runtime-cart

Statistics

Installs: 106

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.1 2026-11-16 16:36 UTC

This package is auto-updated.

Last update: 2026-11-16 19:23:24 UTC


README

Cart helpers: the link that reopens a customer's cart from an email (PrestaShop's own recover_cart link, which also logs the customer in).

Use when

A module emails a customer a link back to their cart: an abandoned-cart reminder, a quote, a cart prepared by the merchant.

Install

composer require prestashopheaven/runtime-cart

Usage

use PrestaShopHeaven\Runtime\Cart\CartRecoveryLink;

$url = CartRecoveryLink::url($context->link, (int) $cart->id, (int) $customerLangId, (int) $cart->id_shop);

PrestaShop itself (FrontController::recoverCart(), 8.1 and 9) checks the token, refuses a cart that became an order or whose customer is gone, logs the customer in and opens the cart page. Anyone with the link is logged in as the customer: only send it to the customer's own address.

Read-only split of prestashopheaven/mono-runtime-commerce: changes, issues and pull requests go there. MIT License.