PS PrestaShop Beginner

Sticky Cart & AI Cross-sell Module — Installation and configuration

Installation, configuration and how the Sticky Cart & AI Cross-sell module works.

Updated Module version 1.0.0

Overview

The Sticky Cart & AI Cross-sell module (dfstickycart) adds a side cart drawer to your PrestaShop store that opens via Ajax on every add-to-cart, without reloading the page. It shows the cart contents, a free-shipping progress bar and a block of cross-sell recommendations computed from your real orders, with an optional AI layer.

The recommendation engine is fully self-hosted: the module works without any API key. AI is only an optional re-ranking layer.

Compatibility

  • PrestaShop 8.0 to 9.x
  • Single store and multistore
  • 5 languages: FR, EN, ES, DE, IT
  • No dependency (no Composer, no framework)

Installation

  1. In the back office, open Modules > Module Manager.
  2. Click Upload a module and select the dfstickycart.zip file.
  3. Once installed, click Configure.

The module automatically registers its hooks (actionFrontControllerSetMedia, displayHeader, displayFooter) and creates its cache table on install. Uninstalling drops that table.

Configuration

General

  • Enable the module: shows or hides the drawer and the floating button.
  • Drawer position: right or left of the screen.
  • Auto-open: opens the drawer on every add-to-cart.
  • Floating button: shows a permanent cart button with the item counter.
  • Primary color: accent color for the drawer, buttons and bar.

Recommendations

  • Enable recommendations: shows the cross-sell block in the drawer.
  • Number of products: number of suggestions displayed (3 by default).
  • Strategy: Auto (self-hosted engine only) or AI (re-ranking by artificial intelligence).
  • Empty-cart message: text shown when the cart has no items yet.

Free shipping

Enter the free-shipping threshold in the default currency. The progress bar automatically shows the remaining amount (“Only X € away from free shipping”) and converts to the customer’s active currency. Set 0 to hide the bar.

Artificial intelligence (optional)

  • Provider: Mistral by default, or any OpenAI-compatible service.
  • Endpoint: completion API URL (defaults to the Mistral chat endpoint).
  • Model: model name (for example a lightweight Mistral model).
  • API key: your key. It is never displayed again and is preserved if you leave the field blank on update.

If the key is missing or the API does not respond, the module silently falls back to the self-hosted engine. The drawer is never blocked by an AI error.

How the recommendation engine works

Suggestions are built from a product pool drawn from three sources, in priority order:

  1. Co-purchase (market-basket): products actually ordered alongside those in the cart, from valid orders (highest weight).
  2. Category affinity: products from the same categories as the cart.
  3. Bestsellers: fallback when history is insufficient.

The result is cached by cart composition for a configurable duration to limit computation. If the AI strategy is active, the artificial-intelligence layer re-orders this pool and generates a short personalised reason for each product.

Performance

The drawer content loads via Ajax only when opened: no extra request runs until the customer opens the cart. Cached recommendations avoid recomputing the engine on every display.

FAQ and troubleshooting

The drawer does not open

Check that the module is enabled, clear the PrestaShop cache (Advanced Parameters > Performance) and make sure your theme loads jQuery on the front end.

No recommendation appears

On a new store without order history, the engine relies on category affinity then bestsellers. Make sure you have active, visible products in the catalogue.

AI suggestions do not change

Results are cached by cart composition. Lower the cache duration during testing, or change the cart to generate a new cache key.

Was this page helpful?

Still stuck? Contact support