1. What this module does
The module puts your own labels on products — "Bestseller", "Last items", "Free delivery", "Made in Poland" — right next to the "New" and "On sale" labels of your theme. Each label has its text in every language and its own colours, and a rule decides which products get it: all products, chosen categories, brands, a price range, low stock or a list of product IDs. Labels can start and end on given dates, and you decide their order.
Labels appear wherever your theme shows its own: on product lists, search results, the product page and quick view.
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
- Download the module from My account → Order history at addonspresta.com.
- In your Back Office, open Modules → Module Manager and click Upload a module.
- Drop the
ap_productlabels_v1.0.1.zipfile and wait for the confirmation. - Click Configure on the module card.
3. How it works
PrestaShop gives every product a list of flags, which the theme prints on the product image: "New", "On sale!", the discount, "Pack" and so on. The module adds your labels to the end of this list, in the order of your list of labels. Your theme prints them exactly like its own flags — same place, same font and shape — and the module only sets the colours you chose. If you leave the colours empty, the label looks like the theme's other labels.
A product gets every active label whose rule it matches and whose dates include the current moment:
- All products — every product.
- Products in categories — products assigned to at least one of the ticked categories. A product counts in every category ticked on its product page, not only in its main category.
- Products of brands — products of the ticked brands.
- Products in a price range — the price customers see, with taxes and discounts, compared in the default currency of the shop and rounded like the displayed price (to the cent). Customers paying in another currency see the same products labelled.
- Products with low stock — products with 1 up to the number you set in stock. Products that are out of stock do not get the label. This rule needs stock management in Shop Parameters → Product Settings; with it off, the label shows on no product. In product lists, the quantity of the combination shown there (the default one) counts; on the product page, the quantity of the selected combination.
- Chosen products — the product IDs you list.
Dates use the time of your shop (the time zone set in International → Localization). Some modules, such as featured products or bestsellers on the home page, keep their product blocks in PrestaShop's cache. The module clears that cache whenever you save, switch, move or delete a label, at the moment a label starts or ends and when you enable, disable or uninstall the module, so those blocks show the change too. The module does not change PrestaShop tables and does not connect to addonspresta.com or any other server.
Requirements. The module works with any theme that prints PrestaShop's product flags, as Classic and Hummingbird do. A theme that does not show the "New" and "On sale" labels will not show these labels either.
4. Features and settings
Open Modules → Module Manager → Product Labels & Badges → Configure. The Help box at the top links to this manual and to the module page at addonspresta.com, in the language of your Back Office.
List of labels
Each row shows the label in its colours, the rule, the dates and the status. Click the status to switch a label on or off. The arrows in the Position column move a label up or down: labels are shown on products in this order. Edit opens the label, Delete removes it after a confirmation. Add a label opens an empty form.
Text
Up to 32 characters in each language. Fill in at least the default language: languages left empty get the same
text. The characters < and > are not allowed.
Background colour and text colour
Hex colours such as #e4002b and #ffffff. Leave a field empty to keep the colour of your theme's labels.
Show on
The rule of the label. The fields of the chosen rule appear below it:
- Categories — tick the categories in the tree.
- Brands — tick the brands. Brands are added in Catalog → Brands & Suppliers.
- Price from / Price up to — in the default currency, taxes included. Fill in one field or both; an empty field means no limit.
- Items left at most — for example 3 shows "Last items" while 1, 2 or 3 items are left.
- Product IDs — IDs from Catalog → Products, separated by commas:
12, 15, 18.
Show from / Show until
Optional start and end date and time. A label for Black Friday can start on Friday at midnight and end on Monday evening. Times are set to the minute. The list shows "Ended on …" for labels whose end date has passed.
Active
Switches the label off without deleting it.
Hide the theme's New, On sale and discount labels
In Options below the list. When on, products show only your labels plus the theme's Pack, Online only and Out of stock labels. Off by default.
5. Multistore
Each label has a Shops field: tick the shops that should show it. The list shows the labels of the shop or shop group selected in the Back Office header; select All shops to see all of them. The order of labels is the same in every shop: an arrow moves the label next to its neighbour in the selected shop, and the other labels keep their order everywhere. The option to hide the theme's labels is saved for the selected shop or group, so each shop can have its own. In the All shops or group context only an employee who manages every shop of it can save. One licence covers every shop of the installation.
Employees limited to some shops see only the labels of their shops and can tick only their shops. A label also used by a shop they cannot access stays read-only for them: changing or deleting it would change that shop too, so only an employee with access to all its shops can do it.
6. Uninstall
Module Manager → Product Labels & Badges → Uninstall deletes all your labels and the module's settings. To keep the labels, use Disable instead.
7. FAQ and troubleshooting
A label does not appear. Check that the label is active, that its dates include the current time of the shop and that the product matches the rule. For the low stock rule, stock management must be on. Then clear the cache in Advanced Parameters → Performance.
The label appears, but without my colours.
Check that the colours are hex values such as #e4002b. A theme with very specific CSS for its labels may need
the colours in its own stylesheet: use the class ap-productlabels- followed by the label ID.
My theme does not show the label at all.
The theme does not print PrestaShop's product flags. Ask its author to add the standard
catalog/_partials/product-flags.tpl to product miniatures and to the product page.
Can I change how the labels look?
Yes. Each label has its own class ap-productlabels-<ID>; add CSS for it to your theme, for example rounded
corners.
The price rule labels a product with a different price than expected. The rule uses the price with taxes and discounts, converted to the default currency, even if your shop shows prices without taxes. The taxes are those of the customer: PrestaShop uses the country of the delivery address and, before the customer gives an address, the default country or the country it guesses from the browser language (International → Localization). A visitor from a country without taxes is therefore compared with the price without taxes, the same price they see.
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 labels and settings 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 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.