OpenCart 2.3–4.1 extension

Supreme Product Availability Rules

Stop selling chosen products, categories or brands to shoppers in chosen countries, postcodes or customer groups, with a clear message instead of an error page. Useful for age-limited, licensed or region-locked goods.

$20
Supreme Product Availability Rules — overview

What it does

  • Rules, up to 50. Each rule says "Do not sell here" (stop the shoppers who match) or "Sell only here" (stop everyone who does not match).
  • A match is: in one of the countries AND the postcode fits AND in one of the customer groups. An empty list does not narrow the match.
  • Postcodes, one per line: exact (SW1A 1AA), starts with (560*) or a number range (560001-560100).
  • What to stop: products (ids or model codes), whole categories (with their sub categories) or brands.
  • Two effects:
  • Hide: the product leaves category pages, brand pages, search results and the home page modules, and the product count is corrected. Its own page still opens, with your message instead of the buy button (no 404).
  • Block: the product stays visible but cannot be bought: the button is off and the cart refuses it with your message.
  • The cart page lists every line a rule stops, and the checkout (and the One Page Checkout page and the confirm step) sends such a cart back to the cart page.
  • The shopper's place comes from the address typed at the checkout, else the account address, else (a switch) the shop country.
  • Your own message per rule, or a standard text. All storefront text is in a language file you can copy and translate.

What it does not do

  • A shopper whose country or postcode is not known yet is not stopped by a rule about places until the address is typed at the checkout. It does not look up visitors by IP address.
  • The product count on a list is corrected from the first 1500 products of that list; a longer list keeps the shop's own count.
  • A hidden product can still be reached by its own address (with the message): it is hidden from lists, not removed from the web.

Tested

Installed and used through the real admin installer on OpenCart 2.3.0.2, 3.0.5.1, 4.0.2.3 and 4.1.0.4 (89 to 93 checks each, 0 failures), plus 21 checks of the rule engine on its own: hide and block on the category page, search, home page, product page and cart add; counts; country, postcode (prefix, exact, range), customer group and "sell only here" rules; categories with sub categories and brands; the cart box, the checkout gates; messages escaped; settings cleaned and capped; no admin session no save; status off; uninstall and reinstall. The signed-in customer address path and the page scripts of the rule editor were not driven in a real browser.

Note

Screenshots are not included yet.

Screenshots

Supreme Product Availability Rules — Admin settings part 1
Admin settings part 1
Supreme Product Availability Rules — Backend settings
Backend settings

More modules

You May Also Need.

Supreme One Page Checkout

Choose a two-column layout with the form beside the order summary, or stack the sections in one column. Configure the page heading, accent colour, secure-checkout badge and mobile layout. On phones, an optional sticky total bar keeps the order amount and Place Order button within reach.

See all OpenCart modules