1. What this module does

Show availability texts and dispatch dates that follow your real stock levels. You write rules — for example "Only 3 left" from 1 to 3 in stock, "In stock" from 4, "On order" at 0 when orders are allowed, "Unavailable" at 0 when they are not — and limit them, when you want, to some categories, brands, suppliers or products. For every product the first rule that matches gives its status: your text in every language, a colour, an icon and, on the product page, a second line with the dispatch date counted in working days ("Ships on Friday, November 27"). The status is shown under the price on the product page, in quick view and on product tiles, and on the product page it follows the selected combination.

The module does not manage stock or warehouses, does not change whether a product can be ordered, sends no back-in-stock alerts, shows no carrier delivery dates and writes nothing into product feeds or e-mails.

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_stockstatus_v1.0.0.zip file and wait for the confirmation.
  4. Click Configure on the module card.

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

After the installation nothing changes in your shop until a rule exists. The module is switched on, but a shop without rules keeps the availability texts of its theme and does not even load the module's stylesheet. To start:

  1. Open the Rules tab of the configuration page (in multistore, first select one shop in the Back Office header).
  2. Click Create example rules. You get four rules to adapt:
    • "Only {quantity} left" — quantity from 1 to 3, amber, warning icon, dispatch line "Ships on {date}" with 0 working days (the same day before the cut-off time);
    • "In stock" — quantity 4 and more, green, tick icon, "Ships on {date}" with 0 working days;
    • "On order" — quantity 0 and less, only products that can be ordered when out of stock, blue, calendar icon, "Ships by {date}" with 5 working days;
    • "Unavailable" — quantity 0 and less, only products that cannot be ordered when out of stock, red, cross icon, no dispatch line.
  3. Change the texts, colours, icons and dispatch times to fit your shop (Edit on each row), add your own rules and put them in the right order (see "The first matching rule wins" in section 3).
  4. In the Settings tab, check the Working days, the Cut-off time and add your Holidays.
  5. In the Test a product tab, enter the ID or reference of a product to see which rule each combination gets, then open the product page in your shop.

3. How it works

The first matching rule wins. The rules of a shop form one list. For every product the module goes down the list from the top and takes the first switched-on rule that is shown in that place and matches the product's quantity, its order condition and the chosen products. That rule gives the status; the rules below it are not looked at. A product that no rule matches keeps the availability text of your theme. Put the specific rules above the general ones: a rule "Furniture: ships in 10 working days" must stand above "In stock — all products", otherwise furniture gets "In stock". Use the arrows Move up and Move down in the list to change the order.

Which quantity counts.

  • On the product page and in quick view: the stock of the selected combination. When the customer picks another combination, PrestaShop refreshes the price block and the status follows.
  • On product tiles: the total stock of the product, all combinations together. A tile says "in stock" as soon as any combination is in stock.
  • The quantity is the stock in your shop, not reduced by what the visitor has in the cart: "Only 3 left" says what the shop has, and the same tile is right for every visitor.
  • Packs count as PrestaShop counts the pack (its own stock or the stock of its products, as you set it on the pack). Virtual products count like any other product. In a shop group that shares its stock, the shared stock counts.
  • Orders when out of stock is the product's own setting, or the default of your shop in Shop Parameters → Product Settings when the product uses the default.

When no status is shown. The module shows nothing, and the theme shows what it shows without the module, when:

  • Enabled is off, or the place is switched off in the Settings;
  • the shop has no switched-on rule, or no rule matches the product in that place;
  • stock management is off (Shop Parameters → Product Settings) — PrestaShop then shows no availability either;
  • the shop is in catalogue mode, also in the variant that still shows prices: nothing can be ordered there;
  • the visitor's customer group does not see prices (Shop Parameters → Customer Settings → Groups);
  • the product is not available for order, or is discontinued.

Where the status appears.

  • Product page and quick view: under the price — in Classic between the price and the tax label, in Hummingbird under the tax label. This is the one place with a module hook in every theme, on the product page and in quick view.
  • Product tiles in every list (categories, search, brands, home page blocks, accessories): a line under the price, without the dispatch line. A product shown by another module in a block, also on a product page, gets the tile status too.
  • Cart lines are left alone.

The theme's own availability line. Your theme prints its own line next to the add-to-cart button ("In stock", "Out of stock"…). When the module has just printed its status for a product, it empties that line for that product only, so that the page does not say the same thing twice. Nothing is hidden with CSS, and nothing changes for products without a status. The theme's line stays next to the status when it tells the customer something the status does not:

  • the customer wants more than is left for them — PrestaShop's notice that there are not enough products in stock, or its backorder text when orders of out-of-stock products are allowed (the status and its dispatch date keep describing the units in stock);
  • the customer's own cart already holds the whole stock — PrestaShop 1.7.8 and 9 write their out-of-stock text there, PrestaShop 8 its last-items text;
  • the selected combination is out of stock but another one is available — PrestaShop's hint "available with different options" (on PrestaShop 9.2 it is printed under "Out of stock", so you see the theme's line, the hint and the status together).

When the text for products available later is empty (the product's own text, or the default in Shop Parameters → Product Settings), PrestaShop has nothing to say in the first case and only the status is shown: fill that text in if you allow orders of out-of-stock products.

Themes that do not show the status. A theme whose price block on the product page does not call the hook displayProductPriceBlock (Classic and Hummingbird do) shows no status there and keeps its own availability line. Your theme developer can place the status anywhere in the theme with the tag {widget name='ap_stockstatus' product=$product} (details in README.md); the tag does not empty the theme's own line, so the developer removes that line from the template at the same time.

Unhooking the module from the price block. If you remove the module from displayProductPriceBlock in Design → Positions, it prints no block of its own: on the product page and in quick view the status text goes into the theme's own availability line instead, with the theme's icon and colour and without the dispatch line. Tiles then show no status.

PrestaShop's "Out of stock" label on tiles and product images (shown when the shop setting to display it is on, orders of out-of-stock products are denied and the whole product is out of stock) is left alone. It never contradicts a status: it appears only for products that cannot be ordered.

Colours and icons. The text of the status keeps the text colour of your theme, so it stays readable whatever colour you choose. The colour of a rule is carried by its icon, or by a small dot when the rule has no icon.

The dispatch date. A rule with a Dispatch time in working days and a Dispatch line prints a second line on the product page and in quick view, for example "Ships on {date}". {date} becomes the day the order leaves when it is placed now:

  • the counting starts today when today is a working day and the Cut-off time has not been reached yet, otherwise on the next working day; at the cut-off time itself (14:00 with the default) the next working day is already used;
  • then the dispatch time is added in working days: days that are not ticked in Working days and the dates in Holidays are skipped;
  • 0 working days means today before the cut-off time on a working day, otherwise the next working day;
  • the time is the time zone of your shop (International → Localization), not the visitor's;
  • the date is written in the language of the page, with the day and the month name and without the year, for example "Friday, November 27" in English, "piątek, 27 listopada" in Polish, "vendredi 27 novembre" in French. This needs PHP's intl extension, which most servers have; without it the date is written in the numeric date format of the language, with the year. On PHP older than 8.1 a few languages whose long date has the year in the middle may keep the year;
  • the date is computed when the page is shown, so it moves on by itself after the cut-off time and at midnight.

Examples with Monday to Friday, cut-off 14:00 and the holidays 2026-12-24, 2026-12-25 and 2026-12-26:

  • 0 working days, Friday 27 November at 10:00 → "Friday, November 27"; at 15:00 → "Monday, November 30"; on Saturday → "Monday, November 30".
  • 1 working day, Friday at 10:00 → Monday 30 November; Friday at 15:00 → Tuesday 1 December.
  • 5 working days, Thursday 26 November at 15:00 or Friday at 10:00 → Friday 4 December.
  • 0 working days, Wednesday 23 December at 15:00 → Monday 28 December (24, 25 and 26 are holidays, 27 is a Sunday).

A dispatch line is never shown on product tiles: lists are often cached by other modules for hours or days, and a date there would go wrong. For the same reason {date} is refused in the status text, which tiles also show.

Caches.

  • The module keeps nothing beyond the page being shown.
  • Some modules cache their product lists (featured products, new products, best sellers…). Such a list keeps the status it was rendered with until its cache is cleared. PrestaShop clears it when a product is saved and when an order changes status; the module clears it whenever you save the settings or change a rule, and when it is enabled, disabled or uninstalled. You can clear it yourself in Advanced Parameters → Performance (Clear cache).
  • PrestaShop does not cache the product page. A full-page cache module or a CDN that caches HTML serves the status and the dispatch date of the moment it stored the page: exclude product pages from that cache, or clear it at least once a day just after your cut-off time.

What the module stores. The rules in two tables of its own and the settings in PrestaShop's configuration table, per shop. The module processes no personal data: it reads the stock and the catalogue, stores no customer data, sets no cookies, writes no files and does not connect to addonspresta.com or any other server.

4. Features and settings

Open Modules → Module Manager → Smart Stock Status → 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. Below it, three tabs open the sections Settings, Rules and Test a product.

Settings

Saved for the shop or shop group selected in the Back Office header with Save; "Settings saved." confirms it. When stock management is off or the shop is in catalogue mode, a warning above the form says that no status is shown.

Where the status is shown

  • Enabled — on after the installation. Off: the module shows nothing anywhere (also not through the widget tag), the theme prints its own availability texts again, and the rules stay.
  • Show on the product page — the status under the price, for the selected combination, with the dispatch line.
  • Show in quick view — the same in the quick view window of product lists.
  • Show on product tiles — the status under the price in product lists, for the total stock of the product, without the dispatch line.

A switch decides for the whole shop; in each rule, Show on decides for that rule.

Dispatch dates

  • Working days — the days on which you dispatch orders; Monday to Friday by default. At least one is required ("Tick at least one working day.").
  • Cut-off time — 14:00 by default, on a 24-hour clock (9:30 and 09.30 are accepted and saved as 09:30), in the time zone of the shop, which the field description names. From this time on, the counting starts on the next working day. Leave it empty when an order placed at any time of a working day leaves that day. A wrong value: "Enter the cut-off time as hours and minutes, for example 14:00, or leave it empty."
  • Holidays — the days on which you do not dispatch although they are working days: one date per line, written as YYYY-MM-DD, for example 2026-12-25. Each date counts once, in its year only: add the dates of the next year when you know them. Dates in the past do no harm. Up to 366 different dates. A line that is not a date is refused with the message "These lines of the holidays are not dates written as YYYY-MM-DD: …" followed by the lines; nothing is saved and your text is shown again for correction. The saved list is sorted and each date appears once.
  • Day of the week in dates — Yes (default): "Friday, November 27". No: "November 27". The field description shows both forms with today's date in your Back Office language.

Rules

Rules belong to one shop. In multistore, select one of your shops in the Back Office header; in the All shops or a group context the tab says "Rules belong to one shop. Select one of your shops in the header to manage its rules."

The list shows the rules in the order in which they are tried, with the sentence "For every product the first rule from the top that matches gives the status; a product no rule matches keeps the availability text of the theme. Put the more specific rules above the general ones." Columns:

  • # — the position;
  • Status — the icon, colour and text as the storefront draws them, in your Back Office language;
  • Quantity in stock — for example "1 – 3", "4 and more", "0 and less" or "Any quantity";
  • Orders when out of stock — Any, Orders allowed or Orders denied;
  • Products — All products, or the chosen categories, brands, suppliers and products by name (the first three of each, then "and … more"; IDs that no longer exist in the shop are counted as "(… not in this shop)" and never match);
  • Dispatch time — "Same working day", "1 working day", "5 working days", or a dash for none;
  • Shown on — Product page, Product tiles or both;
  • Enabled — Yes or No.

Buttons on each row: Move up and Move down (the arrows), Switch on or Switch off, Edit, and Delete after the question "Delete this rule?". Below the list: Add a rule, and Create example rules while the shop has no rule. A shop can have up to 100 rules ("A shop can have up to 100 rules."); with 100 rules Add a rule is gone. Every change clears the cache of product lists (see "Caches" in section 3).

The rule form (Add a rule or Edit; Save stores it and shows "Rule saved.", Cancel goes back to the list):

  • Enabled — a switched-off rule is skipped, as if it did not exist.

Status

  • Status text — one field per language; required in the default language of the shop, and a language left empty uses the default language. Up to 255 characters of plain text: the characters < and > are refused. Two placeholders: {quantity} — the quantity in stock (on tiles the total of the product), written with the number format of the language and never below 0; {days} — the dispatch time of the rule, allowed only when the rule has one. Any other text in braces is printed as typed. {date} is refused here ("{date} can be used only in the dispatch line: the status text is also shown on product tiles, which are often cached.").
  • Colour — written as #rrggbb (default #2fb36d), or chosen with Pick a colour. It colours the icon or the dot; the text keeps the colour of your theme.
  • Icon — one of ten icons (tick, box, truck, clock, calendar, warning, cross, star, information, lightning), or No icon (a dot). The icons are drawn by the module and take the colour of the rule.

Which products

  • Quantity in stock — from and to, whole numbers between −1 000 000 and 1 000 000. Both ends count: "from 1 to 3" matches 1, 2 and 3. Leave a field empty for no limit: only "from 4" means 4 and more, only "to 0" means 0 and below. Zero and negative quantities are allowed — a product that can be ordered when out of stock goes below 0 with every order. With both fields empty the rule matches any quantity.
  • Orders when out of stock — Any, Orders allowed (only products that can be ordered when out of stock) or Orders denied (only products that cannot). This is what lets "On order" and "Unavailable" both exist at quantity 0.
  • Products — All products, or Only the products chosen below. With chosen products the rule applies to a product that matches any one of the lists:

    • Categories — the product is in one of the ticked categories: any category of the product counts, not only its default category. Subcategories are not included: tick them too. The field shows what is ticked under Ticked:.
    • Brands — the product has one of the ticked brands.
    • Suppliers — the ticked supplier is the product's default supplier; its other suppliers do not count.
    • Product IDs — IDs of products of this shop, separated by commas, at most 200; the names of the listed products are shown under the field.

    Only the categories, brands and suppliers of this shop are offered ("This shop has none." when there are none). With All products the lists are not used and are emptied when you save.

Dispatch

  • Dispatch time in working days — from 0 to 60, or empty for no dispatch line. 0 means the same working day before the cut-off time.
  • Dispatch line — one field per language, up to 255 characters of plain text, for example "Ships by {date}": {date} is the dispatch date (see "The dispatch date" in section 3), {days} the dispatch time, {quantity} the quantity in stock. Shown only on the product page and in quick view, and only when the rule has a dispatch time. A language left empty uses the line of the default language. When no working day can be found within a year, a line with {date} is not printed.

Where

  • Show on — Product page and quick view, Product tiles, or both; at least one. A rule that is not shown in a place is skipped there and the next matching rule gives the status: for example a rule "Call us for the delivery time" shown only on the product page, above a general rule shown everywhere, leaves the general rule on the tiles.

When a value is wrong, nothing is saved and the form shows the messages above your values, for example "Enter the status text in the default language.", "Enter the colour as # and six hexadecimal digits, for example #2fb36d.", "The quantity "from" cannot be higher than the quantity "to".", "Tick at least one category, brand or supplier, or enter a product ID — or choose "All products".", "Some product IDs are not products of this shop. Check the numbers." or "Tick at least one place where the status is shown."

Test a product

Shows the stock PrestaShop has for a product and the status your rules give it right now. Enter a Product ID or reference and click Check: a number is a product ID, anything else an exact product or combination reference (up to 5 products with that reference). Only products of the selected shop are found; otherwise "No product of this shop has this ID or reference." appears.

For each product you get its name and ID, then:

  • one line for Product tiles (whole product: the total stock);
  • one line per combination for the Product page (up to 200 combinations; "Only the first 200 combinations are listed." above that), or one line when the product has no combinations.

Each line shows the Quantity in stock, the Orders when out of stock condition, the Rule that matches (its number in the list) and the Status as the storefront draws it, with the dispatch line as it reads now; "No rule matches: the theme shows its own text" when nothing matches. Texts and dates are in your Back Office language.

The test applies your switched-on rules only. It ignores the switches of the Settings, stock management, catalogue mode, whether the product is available for order and changes made by other modules attached to the module's event, so it can show a status that the storefront does not show (see "When no status is shown" in section 3).

Who sees it: every employee whose profile may configure the module can look up the stock of every product and combination of the shops they manage here, even without access to the catalogue. If a profile must not see your stock levels, do not give it the permission to configure the module.

5. Multistore

Settings are saved for the shop or shop group selected in the Back Office header. Values saved with All shops apply to every shop that has no value of its own; a shop whose settings you saved keeps its own values. In the All shops or a group context only an employee who manages every shop of that context can save ("Select one of your shops in the header to change the settings: in the All shops or group context they also apply to shops you do not manage.").

Rules belong to one shop and are managed in the context of that shop only; the Rules and Test a product tabs ask you to select a shop in the All shops or a group context. There is no copy of rules between shops: create the rules of each shop in that shop (Create example rules is there in every shop without rules). A shop without switched-on rules shows nothing and loads no stylesheet.

Each storefront uses the rules, the working days, the cut-off time and the holidays of its own shop. One licence covers every shop of the installation.

6. Uninstall

Module Manager → Smart Stock Status → Uninstall deletes the rules of every shop and every setting of the module, and clears the cache of product lists. Reset in the Module Manager does the same and then installs the module again with the default settings and without rules. What is kept: the declaration of the module's event for developers, so that other modules attached to it keep their place.

Disable keeps the rules and settings; while the module is disabled the theme shows its own availability texts. Disabling and enabling clear the cache of product lists too.

7. FAQ and troubleshooting

The product page shows no status. Check in this order:

  1. Enabled and Show on the product page (or Show in quick view) are on in the Settings.
  2. Test a product shows a rule for that combination. If it says "No rule matches: the theme shows its own text", no switched-on rule matches its quantity, its order condition and its products — or the matching rule is not shown on Product page and quick view.
  3. Stock management is on and the shop is not in catalogue mode (the Settings tab warns about both).
  4. The visitor's customer group sees prices, and the product is available for order and not discontinued.
  5. Your theme calls displayProductPriceBlock in its price block (Classic and Hummingbird do). If it does not, the theme keeps its own availability line: ask your theme developer to place the widget tag (section 3).
  6. If the status text appears in the theme's own line without the icon and dispatch line, the module was removed from displayProductPriceBlock in Design → Positions: attach it again.

If it still does not appear, look in Advanced Parameters → Logs for an entry starting with "Smart Stock Status:".

I see two availability lines. Usually on purpose: the theme's line stays next to the status when the customer wants more than is left, when their cart already holds the stock, or when another combination is available (see "The theme's own availability line" in section 3). Otherwise your theme prints its availability line before the price block, or your theme developer placed the widget tag without removing the theme's line.

The status on a tile is not the one on the product page. A tile counts the total stock of the product, the product page the selected combination: a T-shirt with 2 in size M and 10 in size L shows "In stock" on the tile and "Only 2 left" for size M. A rule can also be shown on only one of the two places (Show on).

A list on the home page shows an old status. That list is cached by its module (featured products, new products…). It is renewed when a product is saved, when an order changes status and when you change the module's settings or rules; clear the cache in Advanced Parameters → Performance to renew it at once.

The dispatch date looks wrong. Check the time zone of the shop in International → Localization (the Cut-off time description names it), the Cut-off time (at the cut-off time itself the next working day is used), the Working days and the Holidays (with the right year). 0 working days after the cut-off time gives the next working day. If the date is right in Test a product but old in the shop, a full-page cache or a CDN serves a stored page (see "Caches" in section 3).

The date is shown in numbers. Your server's PHP has no intl extension. Ask your host to enable it; until then the date uses the numeric format of the language.

The text of the status is not in the colour of the rule. That is on purpose: the colour goes to the icon or the dot, and the text keeps the colour of your theme, so that a light colour such as amber never becomes unreadable. A developer can change it in the module's template from your theme (README.md).

A language shows the text of another language. The status text or the dispatch line of that language is empty in the rule: fill it in. The example rules get texts in English, Polish, French, German, Spanish and Italian; other languages of your shop get the English text.

"{quantity}" shows 0 although the stock is negative. The quantity printed is never below 0. The rule still uses the real value: "to 0" matches −5.

The button "Create example rules" is missing. It is shown only while the shop has no rule. Delete the rules to get it back, or add your rules with Add a rule.

Can a product tile show the dispatch date? No. Lists are cached by other modules, so a date there would be wrong the next day. Tiles show the status text only.

Does the module stop orders of products that are out of stock? No. Whether a product can be ordered is set in PrestaShop (the product's own setting or Shop Parameters → Product Settings). The module only shows texts, and its rules can read that setting.

A text of the module is still in English in my Back Office. Open International → Translations → Installed module translations, select the module and your language, and check the translation.

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 and rules are kept.

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

Back to User manuals

Loading...
Back to top