1. What this module does

The module remembers the price of every product at the moment a customer adds it to the cart. When the customer comes back and the price has changed in the meantime — you edited it, a promotion ended or started — the cart and the checkout say so at the top of the page: "The price of Hummingbird T-shirt (Size: M) has changed from €24.00 to €29.00 since you added it to your cart." Next to the product, the old price is shown crossed out.

Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.

2. Installation

  1. Download the module from My account → Order history at addonspresta.com.
  2. In your Back Office, open Modules → Module Manager and click Upload a module.
  3. Drop the ap_cartpricealert_v1.0.0.zip file and wait for the confirmation.
  4. Click Configure on the module card.

The module works right after installation: rises and drops of any size are shown in the cart and in the checkout.

If you have shell access, you can also unpack the zip into modules/ and run php bin/console prestashop:module install ap_cartpricealert from the shop folder, then clear the cache.

3. How it works

The reference price. When a customer adds a product to the cart, the module remembers its unit price as the customer sees it at that moment. When the customer changes the quantity of a product, or adds or removes another combination of it, the module takes the current price again for every line of that product, because a quantity discount may depend on how many units are in the cart. Products added while the module was disabled get their reference at the next change of the cart.

What counts as a change. On the cart page and in the checkout, the module compares the current unit price of each line with its reference. Only changes made on the shop side count: the product price, specific prices, catalog price rules, a promotion that started or ended, a new tax rate. Vouchers, cart rules and shipping are not part of the comparison, and free gift products of cart rules are left out.

What is ignored. A price that differs because of the customer's own action is not an alert — the module silently takes the current price as the new reference:

  • the customer switched to another currency;
  • the customer signed in (a guest becomes a customer and may get the prices of another group);
  • the country of the address taxes are calculated with changed (International → Taxes → Based on: the delivery or the invoice address; without an address, the visitor's country);
  • the customer changed the quantity.

How long the alert stays. The alert is shown on every visit to the cart and the checkout until the customer changes the quantity of that product (also by adding or removing another combination of it), removes it, places the order, or the price returns to the reference. The module adds no button to dismiss it for good; the close icon some themes show (Hummingbird) only hides it until the next page. After the time set in Remember prices for, the line silently takes the current price as its new reference.

Where it appears. At the top of the cart page and of the checkout, in the notification area of your theme, one entry per changed product (a list when there are several). Next to the unit price of the product, in the cart and in the checkout summary, "Was" and the old price crossed out. When the customer changes a quantity or removes a product on the cart page, the alert of that product disappears straight away, without reloading the page. A new alert appears at the next page load: prices change in your Back Office, not while the customer looks at the cart.

Shop settings the module follows.

  • Taxes: both states are supported — taxes enabled or disabled in International → Taxes, and prices with or without tax per customer group (Customers → Groups → Price display method). The module compares the price the way the customer sees it: with tax for a "Tax included" group, without tax for a "Tax excluded" group.
  • Catalog mode (Shop Parameters → Product Settings): while it is on, nothing is shown.
  • Re-display cart at login (Shop Parameters → Customer Settings): when PrestaShop gives a signed-in customer back the cart they left earlier, that cart keeps its reference prices, so a price change made in the meantime is shown. A cart filled as a guest takes new reference prices when the guest signs in.
  • Combinations and customizations are supported: every line (product, combination, customization) has its own reference, and the alert names the combination, for example "T-shirt (Size: M - Color: White)".

What the module stores. One table with the reference price of each cart line, deleted when the line is removed, when the order is placed and after the retention time. The module never changes a price, never keeps the old price for the customer and never blocks an order. It does not change native PrestaShop tables and does not connect to addonspresta.com or any other server.

4. Features and settings

Open Modules → Module Manager → Cart Price Alert → Configure. The Help box at the top links this manual and the module page at addonspresta.com in the language of your Back Office, gives our support address and shows the installed version.

Enabled

Turns the module on or off in the storefront without uninstalling it. When it is off, the module neither remembers prices nor shows alerts. Default: on.

Changes to show

  • Price rises and drops (default) — every change.
  • Only price rises — useful when you only want to warn customers before they pay more.
  • Only price drops — useful when you only want to point out a better price.

Minimum change

The smallest change that is shown, in percent of the old price, from 0 to 100 with up to two decimals (a dot or a comma). With 0 (default), every change of at least one cent — the smallest unit of the currency — is shown. With 5, a T-shirt that goes from €20.00 to €20.90 (4.5%) shows nothing, from €20.00 to €21.00 (5%) shows the alert.

Show in the cart / Show in the checkout

The pages where the alert and the previous price appear: the cart page and the checkout. Both are on by default.

Alert at the top of the page

Puts the alerts in the notification area of your theme, at the top of the cart page and of the checkout. Default: on. Turn it off when you place the alerts yourself with the widget {widget name='ap_cartpricealert'} in a template of your theme — otherwise they appear twice. The widget prints every alert of the current cart as a separate box wherever you put it; it follows Enabled, Changes to show, Minimum change and the messages, but not the page switches above.

Previous price next to the product

Shows "Was" and the old price, crossed out, next to the unit price of a changed product, in the cart and in the checkout summary. The text takes the style of your theme at that place. Default: on.

Price rise: alert type / Price drop: alert type

The type of notification of each direction: Warning, Information, Success or Error. The colour of the alert comes from your theme (in Classic, for example, a warning is yellow and an error is red). Defaults: Warning for a rise, Information for a drop.

Message when the price rose / Message when the price dropped

The text of the alert, in every language of the shop. Defaults:

  • rise: "The price of {product} has changed from {old_price} to {new_price} since you added it to your cart."
  • drop: "Good news: the price of {product} has dropped from {old_price} to {new_price} since you added it to your cart."

These placeholders are replaced in the storefront:

  • {product} — the product name with its combination, for example "T-shirt (Size: M - Color: White)";
  • {old_price} — the price when the product was added;
  • {new_price} — the current price;
  • {difference} — the difference between the two, for example €5.00;
  • {percent} — the change in percent of the old price, rounded, for example 17%.

Prices are shown in the customer's currency, with or without tax as the customer's group sees them. A word in braces that is not on the list stays as written. The message is plain text: HTML tags are removed when you save. It can have up to 500 characters. The text in the default language is required; a language left empty uses it.

Remember prices for

How many days a reference price is kept, from 1 to 3650; default 90. After that time, the line takes the current price as its new reference without an alert, and older prices are deleted. The clean-up runs once a day, on the first cart change of the day, so no cron task is needed.

Status

The panel below the form shows how many cart lines have a remembered price in the shop selected in the header.

5. Multistore

Settings are saved for the shop or shop group selected in the Back Office header. Select All shops to set the same values everywhere, or a single shop to give it its own messages, pages and thresholds. In the All shops or group context only an employee who manages every shop of it can save. Each cart keeps its reference prices in its own shop, and the Status panel counts the lines of the shops selected in the header. One licence covers every shop of the installation.

6. Uninstall

Module Manager → Cart Price Alert → Uninstall removes the settings, the messages and the table of remembered prices. To keep them, use Disable instead.

7. FAQ and troubleshooting

I changed a price, but no alert shows in the cart. Check these points in order:

  • The reference is taken when the product is added or its quantity changed (also by adding or removing another combination of it). A product added after your change, or whose quantity changed since, already has the new price as its reference.
  • Enabled, Show in the cart or Show in the checkout, and Alert at the top of the page must be on.
  • The change must be at least the Minimum change and in a direction allowed by Changes to show.
  • Switching the currency, signing in or choosing an address in another country gives a new reference without an alert.
  • Catalog mode must be off.
  • Your theme must print notifications at the top of the cart. If it does not, use the widget (see below).

The alert disappeared after the customer signed in. A cart filled as a guest gets new reference prices at sign-in, because a signed-in customer may have other prices (customer group, country). A cart the customer filled while signed in and gets back at the next sign-in (Re-display cart at login) keeps its reference prices and shows the alert.

My theme has no notifications at the top of the cart. Add {widget name='ap_cartpricealert'} to the template of your theme where the alerts should appear, for example above the product list of the cart, and turn Alert at the top of the page off.

The alerts appear twice. The widget and Alert at the top of the page are both on. Turn Alert at the top of the page off, or remove the widget.

Does the module change prices or block orders? No. It only informs the customer. The cart is charged at the current price, and the customer can always order.

How does the customer get rid of the alert? By changing the quantity of the product, adding or removing another combination of it, removing it or placing the order. It also disappears when you set the price back to what it was.

A text is still in English in my Polish or French shop. Fill in both messages for that language in the module configuration. The word "Was" next to the old price is translated in International → Translations → Installed modules translations.

Can I change how the alert looks? Yes. Copy views/templates/front/notification.tpl, views/templates/hook/was.tpl or views/templates/widget/alerts.tpl to themes/<your-theme>/modules/ap_cartpricealert/ keeping the same subfolders, and edit the copy, or add CSS for the .ap-cartpricealert__message and .ap-cartpricealert__was classes to your theme. The module adds no styles of its own.

8. Updates and support

Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your settings are kept.

Support is included for 1 year from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.

You can return the module within 30 days of your order, as described in the Licence and Sales Policy at addonspresta.com. The module's code passes our AI-assisted security audit.

Back to User manuals

Loading...
Back to top