Skip to content
  1. Docs
  2. Customer notifications
  3. Stock Notification

Stock Notification

How to set up Stock Notification in the Trust theme for OpenCart 3: subscription form, cron mailing, custom email, subscribers list.

3 min read

When a product is out of stock, the visitor sees a subscribe button instead of "Buy". They leave contact details and get an email (and an SMS if SMS Notify is connected) when the product is back in stock. This way you don't lose customers because of a missing item.

Back-in-stock subscription window

Open Octemplates → Modules → Stock Notification.

Settings

Stock Notification settings

General

  • Status — when disabled, the module shows no subscribe button on out-of-stock products and sends no emails.

Subscription form

For "Name" and "Phone" choose a mode: "Disabled" — no field, "Enabled" — the field is shown but optional, "Enabled and required" — can't subscribe without it. Email is always in the form. The phone is needed if you want to send SMS; it is validated by the country masks from the theme settings.

Admin notifications

  • Notify administrator about new request — when someone subscribes, an email with the product name and a link is sent to the given address.
  • Email for notifications — separate several addresses with commas.

Customer mailing

  • Notify immediately when a product is edited — after a product with stock above zero is saved in the admin, its subscribers are mailed right away without waiting for cron. A secret key is required.
  • Secret key — any string that protects the cron address from outsiders. The mailing doesn't work without it.
  • Cron command — appears after the key is saved. Add it to the hosting task scheduler (for example once a day) if stock is updated by import or bypassing product editing in the admin.

Tip. If you change stock manually in the admin, "Notify immediately" is enough. Cron is needed for imports and warehouse sync.

Customer email

Email template settings

By default a standard email from the store language file is sent. To write your own, enable "Custom email template" and fill in the subject (1+ characters) and the text (30+ characters, tags excluded) for every store language. You can insert shortcodes into the subject and text:

ShortcodeReplaced with
[customer_name]Customer name
[product_name]Product name
[product_link]Link to the product page
[store]Store name

Subscribers

The "Subscribers" tab holds all subscriptions with filters by email, phone, product and status. At the top are counters: total subscriptions, those waiting for stock, and those where the customer has been notified.

Subscribers list

  • User / Email — name, email, phone; a "guest" mark for unregistered customers;
  • Product name — a link to the product;
  • Subscription Date and Notification Date;
  • Status — "Pending" or "Processed". After the email is sent the subscription becomes "Processed" and stays in the list.

You can delete subscriptions one by one, selected or all at once. Subscriptions of logged-in customers are also visible in their account.

How it works

  1. Subscription

    On an out-of-stock product page the visitor clicks the subscribe button and enters an email (plus name and phone if those fields are on). The subscription appears as "Pending".

  2. Stock check

    Cron finds products with stock above zero that have subscribers and mails them. With "Notify immediately" on, the mailing also runs after a product is saved.

  3. Customer email

    The subscriber gets an email, and an SMS too if they left a phone and SMS is connected.