1. What this module does

Hide or show carriers by product, category, postcode, weight, cart value and customer group. PrestaShop limits a carrier by zone, by weight or price range, by customer group and, on each product, by the carriers ticked there. This module adds rules: each rule hides the carriers you choose, or shows only the carriers you choose, for the carts that meet its conditions — the products, categories and brands in the cart, the customer's groups, the delivery country, zone and postcode, the cart weight and the products total.

Typical uses: oversized goods only by courier, no parcel lockers for liquids, no next-day delivery for island postcodes, a pallet carrier only from 30 kg, free pickup only for the wholesale group. The checkout shows the carriers that are left. The Back Office warns you when a rule leaves carts without any carrier, and Test a cart shows which carriers a cart would see.

Works with PrestaShop 8.0 – 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore. It does not run on PrestaShop 1.7: the filter of the carrier list it relies on was added to PrestaShop in version 8.0.

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_carrierrules_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_carrierrules from the shop folder.

Nothing changes in your shop until you add a rule. After the installation the module is switched on, but its list of rules is empty ("No rule yet: customers see every carrier PrestaShop offers. Add a rule."). To set up your first rule:

  1. Open Modules → Module Manager → Carrier Rules → Configure (in a multistore, first select one shop in the Back Office header).
  2. Open the Rules tab and click Add a rule.
  3. Give the rule a Name, choose the Action (Hide the chosen carriers or Show only the chosen carriers), tick the Carriers, fill in the conditions the cart must meet and click Save.
  4. In the Test a cart tab, describe a cart and click Test: you see which carriers are shown and which rule hid the others.
  5. Open your shop, put products in the cart and go to the delivery step of the checkout.

3. How it works

Hide, or show only

Every rule has an action and a list of carriers:

  • Hide the chosen carriers — the ticked carriers disappear from the checkout; every other carrier stays.
  • Show only the chosen carriers — every carrier that is not ticked disappears; the ticked ones stay.

Rules only take carriers away. A carrier that PrestaShop itself does not offer for the cart — because of its zones, its weight or price ranges, its customer groups, or the carriers allowed on a product of the cart — never comes back, also not with Show only the chosen carriers. The rules work on the list PrestaShop has already built.

A rule follows a carrier you edit. When you change a carrier in Shipping → Carriers, PrestaShop may save it under a new ID, but it keeps the carrier's identity; the rule keeps applying to it. A carrier you delete is shown in the rule as "(deleted)".

Which rules apply

The rules are checked from the top of the list, for every cart and delivery address. Every rule whose conditions hold applies, not only the first one: the carriers hidden by all of them add up. A rule switched off is ignored.

Stop here. A rule with Stop here ends the check when it applies: the rules below it are not looked at. Use it for exceptions, and put exceptions above the general rules.

Example: rule 1 "Wholesale: pallet only" applies to the group Wholesale, Show only the chosen carriers with Pallet carrier ticked, and Stop here. Rule 2 "Heavy carts" hides Parcel locker from 30 kg. A wholesale customer sees only the pallet carrier, and rule 2 is not checked for them. Every other customer with a cart of 30 kg or more sees every carrier except the parcel locker.

Conditions

A rule applies to a cart when every condition you filled in holds. A list left empty or a field left empty is no condition, and a rule without any condition applies to every cart.

Products in the cart. Three lists describe a product: Product IDs, Categories and Brands. A product matches when it meets every list you filled in: its ID is in the list, one of its categories is ticked or lies below a ticked category (subcategories count, and any category of the product counts, not only its main one), its brand is ticked. Then choose when the rule applies:

  • At least one product of the cart matches — one matching product is enough;
  • Every product of the cart matches — all products of the cart must match.

A cart without products matches neither choice. Example: Categories Liquids, At least one product of the cart matches, Hide the chosen carriers with Parcel locker ticked: a cart with one bottle hides the parcel locker. With Every product of the cart matches the parcel locker would disappear only when the cart holds nothing but liquids.

To combine lists with "or" (a product of the category Furniture or of the brand BigBox), create two rules.

Cart weight and products total. Each has a field from and a field below; either can stay empty. "From" counts the value itself, "below" does not, so ranges follow each other without overlap: a rule from 0 below 30 and a rule from 30 cover a cart of exactly 30 kg once, with the second rule.

  • The weight is the cart weight as PrestaShop computes it, in the weight unit of your shop.
  • The products total is the products of the cart only — before discounts, without shipping — tax excluded or included as chosen in Settings, always in the default currency of your shop. A cart in another currency is converted with PrestaShop's exchange rate before the comparison.

Customer groups. A customer matches when any of their groups is ticked, not only their default group. A visitor who is not logged in is in the Visitor group, and a customer who orders without an account (guest checkout) is in the Guest group.

Delivery address. Three conditions:

  • Countries — the country of the delivery address. Before the customer gives an address, the country PrestaShop assumes for the visitor (by geolocation or the shop's default country) counts.
  • Zones — the zone of the delivery address as PrestaShop sets it: the zone of the state when the state has one, otherwise the zone of the country.
  • Postcodes — one per line or separated by commas. Spaces and hyphens are ignored, and letters are compared in upper case:
  • an exact postcode: 31-000;
  • a pattern with * for any characters: 31* is every postcode starting with 31, *AB every postcode ending with AB, HS* the Outer Hebrides;
  • a range FROM..TO: 30-000..34-999 is every postcode from 30-000 to 34-999. Both ends must have the same length, and the postcode must have that length too.

An address without a postcode never matches a postcode condition — also the cart before the customer has given an address. A rule with postcodes therefore takes effect at the checkout, once the address is known.

What the customer sees

The module adds nothing to your pages: the delivery step of the checkout lists the carriers that are left, and the shipping line of the cart uses one of them. A carrier hidden by a rule can neither be chosen nor used for the order, also when it was chosen earlier: PrestaShop then switches to a carrier that is left.

When the rules leave no carrier for the address, the customer sees PrestaShop's own message "Unfortunately, there are no carriers available for your delivery address." and cannot order. The module does not bring a carrier back in that case: the rules are your decision. It helps you notice it instead (next part).

Carts left without a carrier

  • In the list of rules, a rule that leaves every cart it applies to without a carrier shows "Every cart this rule applies to is left without a carrier." — a Show only the chosen carriers rule none of whose carriers is an active carrier of the shop, or a Hide the chosen carriers rule that hides every active carrier.
  • Above the list, when the rules really left carts without any carrier in the last 30 days, a warning gives their number and the last one: "Carts the rules left without any carrier in the last 30 days: 3. The last one: cart 1542 on 12/02/2026. Those customers could not order: check your rules with "Test a cart"." Only carts with a delivery address are counted.

Open the cart in Orders → Shopping Carts to see its products and address, then describe it in Test a cart.

Personal data, connections, failures

The module stores your rules and, for the warning above, the ID and the time of the carts left without a carrier (kept 30 days) — no personal data. It sets no cookie, keeps nothing in the visitor's browser, makes no outgoing connection (no licence check, no statistics, nothing to addonspresta.com or any other server), has no cron job and sends no e-mails.

If the module fails on a page, customers see every carrier PrestaShop offers, and one line at most per hour is written to Advanced Parameters → Logs, starting with "Carrier Rules:".

4. Features and settings

Open Modules → Module Manager → Carrier Rules → 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 are three tabs: Settings, Rules and Test a cart.

Settings

Saved for the shop or shop group selected in the Back Office header with Save; "Settings saved." confirms it. When the shop is in catalogue mode, the page warns you: "The shop is in catalogue mode: nothing can be ordered, so the rules change nothing."

Enabled

On after the installation. "Switched off, the rules change nothing and customers see every carrier PrestaShop offers. The rules stay."

Products total

"How the rules with a products total compare the cart: the products only, before discounts and without shipping, in the default currency of the shop."

  • Tax excluded (default)
  • Tax included

The choice applies to every rule of the shop that has a products total, and to Test a cart.

Rules

Rules belong to one shop: the tab works when one shop is selected in the Back Office header ("Rules belong to one shop. Select one of your shops in the header to manage its rules." otherwise). A shop can have up to 100 rules.

The list shows the rules in the order they are checked, with the columns #, Name, Action ("Hide: …" or "Show only: …" with the carriers), Conditions (one short line per condition, for example "At least one product: categories Liquids", "Weight: from 30 kg", "Postcodes: HS", or "Every cart" for a rule without conditions), Stop here and Enabled*. The buttons of each row:

  • Move up and Move down (the arrows) — change the order ("Order of the rules changed.");
  • Switch off / Switch on — a rule that is switched off stays in the list, greyed, and is ignored ("Rule updated.");
  • Edit — opens the form;
  • Delete — after the question "Delete this rule?" ("Rule deleted.").

Add a rule opens an empty form; it is hidden when the shop has 100 rules. The warnings of the list are described in section 3, "Carts left without a carrier".

The form ("Add a rule" or "Edit the rule") starts with the rule itself, followed by four panels of conditions — Products in the cart, Cart, Customer and Delivery address. "Every condition you fill in must hold for the rule to apply; an empty list or field is no condition. A rule without any condition applies to every cart."

The rule:

  • Enabled — the rule counts only when ticked.
  • Name — required, up to 64 characters, plain text (no < or >). "Only for you, in the list of rules and the test tool."
  • Action — Hide the chosen carriers or Show only the chosen carriers. "Rules only take carriers away: a carrier PrestaShop itself does not offer for the cart never comes back."
  • Carriers — the carriers of the shop, active ones first, the others marked "(inactive)". "Tick at least one. PrestaShop keeps a carrier's identity when you edit it, so the rule follows it."
  • Stop here: when this rule applies, the rules below it are not checked.

Products in the cart — "Leave everything empty to ignore the products. A product matches when it meets every list you fill in here."

  • Product IDs — "IDs of products of this shop, separated by commas or spaces, for example 12, 15, 48. Up to 500." The product ID is in the first column of Catalog → Products.
  • Categories — the category tree of the shop, subcategories indented. "A product matches when one of its categories is ticked or lies below a ticked category."
  • Brands — "A product matches when its brand is ticked."
  • The rule applies when — At least one product of the cart matches or Every product of the cart matches.

Cart — Cart weight and Products total, each with from and below, in the weight unit and the default currency of the shop (for example "Cart weight (kg)", "Products total (EUR)"). "From" counts the value itself, "below" does not, and either field can stay empty (section 3). Type a number with a point or a comma, up to 999,999,999; the products total with no more decimals than the currency has.

Customer — Customer groups: "A customer matches when any of their groups is ticked. A visitor who is not logged in is in the Visitor group, a customer who orders without an account (guest checkout) is in the Guest group."

Delivery address

  • Countries — every country of the shop, the active ones first, the others marked "(inactive)".
  • Zones — the zones of the shop.
  • Postcodes — up to 200 patterns, written as described in section 3.

Above every list with tick boxes, the line Ticked: shows what is ticked ("all" when nothing is, which means no condition; "none" for the carriers), and a list of more than ten entries has a field Type to filter the list.

Nothing is dropped behind your back. A carrier, group, country, zone, category or brand the rule has but the shop no longer has stays ticked as "#12 (not in this shop any more)"; untick it and save to remove it.

Click Save ("Rule saved.") or Cancel. When something is wrong, nothing is saved, "The rule could not be saved." appears above the form with the reason, and your values stay in the form:

  • "Enter a name of up to 64 characters." / "The name is plain text: remove the characters < and >."
  • "Tick at least one carrier."
  • "Enter the product IDs as numbers separated by commas or spaces." / "A rule can name up to 500 products." / "These IDs are not products of this shop: …"
  • "These postcodes cannot be read: …. Use letters, digits, spaces, hyphens and *, or a range FROM..TO whose ends have the same length." (a lone * is refused too: an empty field already means every postcode) / "A rule can have up to 200 postcodes."
  • "Enter the weights as numbers, for example 30 or 2.5." / "Enter the amounts of the products total as numbers, for example 100 or 99.50, with no more decimals than the currency has."
  • "The weight "from" must be lower than the weight "below"." and the same for the products total.
  • "A ticked list could not be read: something in it no longer exists. Reload the page and tick it again."
  • "A shop can have up to 100 rules."

Test a cart

"Describe a cart and see which carriers the rules leave. Only the rules of this module are checked: PrestaShop's own limits of each carrier (zones, weight and price ranges, groups, carriers of a product) still apply in the shop." The test works in the context of one shop and changes nothing. Fill in:

  • Delivery country — the active countries of the shop; the zone is the zone of the country;
  • Postcode — leave it empty to test a cart without an address;
  • Customer group — one group;
  • Product IDs in the cart — their categories and brands are read from the shop; IDs that are not products of the shop are left out and named;
  • Cart weight and Products total — as the rules see them (section 3).

Click Test. The answer is a table of every active carrier of the shop with Shown or "Hidden by rule #2 Heavy carts", the line "Rules that apply, from the top:" (or "No rule applies to this cart: every carrier stays."), and "No carrier is left: the customer could not order this cart." when nothing is left. When Enabled is off, the test still shows what the rules would do, with a note that nothing is hidden in the shop now.

5. Multistore

Rules belong to one shop: each shop has its own list, and you edit it with that shop selected in the Back Office header. Settings are saved for the shop or shop group selected in the header; values saved with All shops apply to every shop that has no value of its own. 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."). Test a cart works in one shop at a time.

Each storefront uses the rules and settings of its own shop. Deleting a shop deletes its rules. One licence covers every shop of the installation.

6. Uninstall

Module Manager → Carrier Rules → Uninstall deletes all the rules, all the settings and the list of carts left without a carrier, in every shop. The rules cannot be restored. Reset does the same and then installs the module again with the default settings — also without any rule. Write your rules down before you uninstall or reset. Your carriers, carts and orders are not touched, and customers see every carrier PrestaShop offers again.

Disable keeps the rules and the settings; while the module is disabled no carrier is hidden. Switching off Enabled in the settings does the same for one shop.

7. FAQ and troubleshooting

A carrier does not appear at the checkout, but no rule hides it. Type the cart in Test a cart: when the carrier is Shown there, the module does not hide it — PrestaShop's own limits do. Check the carrier in Shipping → Carriers: its zones (the zone of the delivery address), its weight and price ranges and what happens outside them, its customer groups, its maximum package size and weight, and the carriers allowed on each product of the cart (the product page, Shipping tab). The module can only take carriers away, never add one.

A rule does not hide the carrier. Describe the cart in Test a cart and check:

  1. The module is enabled in the Module Manager, Enabled is on in the settings of this shop, and the rule is switched on.
  2. A rule above it with Stop here does not apply to the cart first.
  3. Every condition of the rule holds — every filled list and field, not just one of them.
  4. A postcode condition needs an address with a postcode: before the customer gives an address, it never matches.
  5. The products total is before discounts, without shipping, tax as chosen in Settings and in the default currency.
  6. "From" counts the value itself, "below" does not: a rule below 30 kg does not apply to a cart of exactly 30 kg.
  7. With Every product of the cart matches, one product outside the lists is enough to stop the rule.

Customers write that they cannot choose any carrier. Look above the list of rules for the warning about carts left without any carrier, and for rows marked "Every cart this rule applies to is left without a carrier." Describe such a cart in Test a cart: the table shows which rule hid each carrier. Change the rules so that at least one carrier stays, or check whether PrestaShop's own limits had already removed the carriers the rules leave.

The rules work in the standard checkout, but not with my one-page checkout or express-payment module. The module filters the carrier list PrestaShop builds for the cart, which the standard checkout and modules that use it read. A one-page checkout, a quick-order or express-payment module (for example a "Buy now" button) that builds its own list of carriers is not filtered. Ask its author whether it uses PrestaShop's list of delivery options.

I changed a rule, but the checkout still shows the old carriers. The rules are read again on every page, so a reload of the checkout shows the change. If it does not, a caching module or a server cache keeps old pages: clear it, and clear PrestaShop's cache in Advanced Parameters → Performance. Cart and checkout pages should never be served from a full-page cache.

I edited a carrier. Do I have to change my rules? No. PrestaShop keeps the identity of a carrier you edit, and the rule follows it. Only a new carrier you create has to be ticked in the rules that should apply to it.

Nothing changes, and the shop is in catalogue mode. In catalogue mode nothing can be ordered, so there is no carrier to filter; the Settings tab warns you.

"The page has expired. Reload it and save again." The page was open for a long time, or you logged in again in another tab. Reload the page and save again.

A text of the module is still in English in my Back Office. Open International → Translations → Installed modules 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 rules 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; 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