Get in touch
Sales and conversion · OpenCart

Double Opt-In Newsletter Subscription for OpenCart

Download for free
Version
v1.0.0
Compatibility
OpenCart 4.0.2 – 4.1.x
Platform
OpenCart
Double Opt-In Newsletter Subscription for OpenCart

What each licence includes

Feature Free Pro
Subscription only activates after clicking a link from the person's own inbox
Consent record: source, IP, user agent, request time and confirmation time
Subordinates OpenCart's stock tick box at registration and in the account area
One-click unsubscribe from any email
Four emails: confirmation, welcome, reminder, farewell
Per-language email text editing
One scheduled reminder for the unconfirmed
Subscriber grid with filters by status, source and period
CSV export with proof of consent, UTF-8 with BOM
Honeypot, signed timestamp and per-IP request limit
Auto-deletes unconfirmed requests after N days
One-off import of existing subscribers — by button, not on install

Stock OpenCart treats the tick box itself as consent. A customer ticks “Subscribe to newsletter” during registration, and customer.newsletter = 1 appears in the database immediately. No confirmation, no date, no trace of where that consent came from. An address someone typed into a stranger’s registration form can’t be removed from the list, and there’s nothing to prove the person actually agreed.

This module turns that tick box into a request. The flag only goes up after the person clicks a link from their own inbox — and that’s when a consent record appears in the database, complete with a timestamp, source, and IP.

Live demo

Demo store: oc.catcode.com.ua (OpenCart 4.1.0.3). Enter an address into the subscription form — a confirmation email arrives; until you click the link in it, the status in the admin stays “Pending”, and no newsletter email is sent to that address.

Demo admin: Extensions → Modules → Double Opt-In Subscription. There you’ll see a subscriber grid with status, source, and both dates.

What the buyer sees

The page shown after clicking the link in the email. It's rendered with the store's own template, so it inherits the look of your theme.
The page shown after clicking the link in the email. It’s rendered with the store’s own template, so it inherits the look of your theme.

In the footer (or wherever you place the form) — an email field, optionally a name field, and a button. After submitting, the person immediately sees: “Almost done — check your inbox and follow the link in the email. We won’t send you anything until then.”

The email itself has one action — a confirmation link. Clicking it opens a store page in your theme (using the standard common/success template, so the look inherits from the theme) reading “Subscription confirmed”. A short welcome email follows, already containing a one-click unsubscribe link.

If someone enters an address that’s already confirmed, they see “This address is already subscribed” — and get no further email. That’s deliberate: otherwise anyone could flood a stranger’s inbox with “confirmations” just by typing their address into the form.

What the admin gets

Subscriber grid: status, source (form / account), IP, request date and confirmation date — the same proof of consent that goes into the CSV.
Subscriber grid: status, source (form / account), IP, request date and confirmation date — the same proof of consent that goes into the CSV.
Module settings in the OpenCart 4.1 admin: the stock newsletter tick box is now subordinate to confirmation, plus link expiry and a form snippet for the theme.
Module settings in the OpenCart 4.1 admin: the stock newsletter tick box is now subordinate to confirmation, plus link expiry and a form snippet for the theme.

A dedicated subscriber grid in the module settings: address, name, status (pending / confirmed / unsubscribed / error), source (form, account, admin, import), language, IP, request date, and confirmation date. Filters by status, source, address, and period.

A “Resend” button for anyone who hasn’t confirmed. CSV export of all confirmed addresses — together with proof of consent (source, IP, both dates), in UTF-8 with BOM, so Excel doesn’t mangle names into garbled characters.

Per-status counters are always visible, so you see the real size of the list, not “how many people once ticked a box”.

How it works, step by step

  1. Someone leaves an address — in the module’s own form or via the stock tick box at registration or in the account area.
  2. A row is created in a dedicated table with status “pending”, a token, IP, user agent, language, and source. If the tick box was used at registration, the module pushes customer.newsletter back to 0 — until there’s consent, there’s none in the database either.
  3. A confirmation email goes out in the language of the storefront version the request came from.
  4. Clicking the link moves the row to “confirmed”, records the date, and raises the stock customer.newsletter flag, so the rest of the store sees the same picture.
  5. After a configured number of hours, anyone who hasn’t confirmed gets exactly one reminder. The row is marked “reminded” regardless of whether the email actually arrived, so a dead address doesn’t loop forever.
  6. Unconfirmed requests older than N days are deleted automatically. An address that never confirmed isn’t a subscriber, and there’s no reason to keep it indefinitely.

Unsubscribing works in one click from any email: following the link moves the row to “unsubscribed”, lowers the stock flag, and (optionally) sends a short confirmation, so the person keeps written proof.

What’s included in each licence

Free — the full confirmation cycle: form, confirmation email, welcome email, one-click unsubscribe, subordinating the stock tick box, subscriber grid, CSV export, honeypot and a per-IP request limit, retention. One limit: up to 200 confirmed subscribers.

Pro — removes the subscriber limit, adds an automatic reminder for the unconfirmed, and lets you edit the text of all four emails separately for each store language.

The licence is a one-off purchase tied to a domain. The licence is perpetual: you pay once, with no annual fees.

Pricing

The base version is free, no registration and no time limit. Pro is a one-off 1,290 UAH per domain. Pro trial — 7 days, switched on with one button in settings, key arrives by email.

Technical requirements

  • OpenCart 4.0.2 – 4.1.x (3.x and 2.3 versions are in development).
  • PHP 7.4+ (also runs on 8.0–8.3).
  • MySQL/MariaDB with InnoDB and utf8mb4 support.
  • Store mail configured (System → Settings → Mail): the module sends emails through the same transport as the rest of the store — no separate credentials needed.

Under the hood

A single dedicated table, cc_news_subscriber: one row per (store, address) pair, with status, token, and proof of consent. A unique key on the pair prevents duplicates, and a repeat request from the same address revives that same row with a new token — so the link from an old email stops working.

The token is 48 hexadecimal characters from random_bytes. The same token serves both confirmation and unsubscribing: once confirmed, it deliberately doesn’t change, because it’s exactly what the “unsubscribe” link in every future email relies on.

Form protection is a hidden honeypot, out of the document flow and off the tab order, plus a signed timestamp (an HMAC over the installation’s own parameters) that can’t be rewritten client-side. The stamp is valid for 24 hours, so the form survives full page caching. On top of that, there’s a per-IP hourly request limit and, optionally, the store’s own captcha.

Email texts live in a library rather than language files: an email is built from three different contexts (storefront, admin, scheduled run), and the email’s language is the subscriber’s language, not the language of the current request. An empty template field always falls back to the built-in text, and an unknown language falls back to English.

The module doesn’t touch a single core file: it works through OpenCart’s standard events and its own storefront routes.

Installation

  1. Extensions → Installer → upload the zip.
  2. Extensions → Modules → find “Double Opt-In Subscription” → click “+”. This step creates the table and registers the events and scheduled task.
  3. Open the settings, enable the module, and save.
  4. Insert the form wherever needed in the theme: {{ cc_newsletter }} in any Twig template.
  5. If the store already has subscribers via the stock tick box, click “Import existing subscribers”. Import runs once, manually only: it enrols them as confirmed, because the store already considers them subscribers, and it never brings back anyone who unsubscribed.

Version history

1.0.0 — first release: full double opt-in cycle, subordinating the stock tick box, four emails editable per language, subscriber grid with proof of consent, CSV export, scheduled reminders and retention, one-off import of existing subscribers.

Frequently asked questions

Will this break my registration?

No. The event handler is wrapped so that any error inside it never reaches the customer.

What if I don't want the module touching the stock tick box?

There's a "Don't touch" switch in settings — then only the module's own form is active.

What happens to existing subscribers?

Nothing, until you press the import button yourself. The module imports no one on installation.

How long does the confirmation link last?

72 hours by default, configurable.

Is data deleted when the module is removed?

No. The subscriber table is deliberately kept — it's proof of consent for every address.

Questions about the module?

Message us on Telegram — we reply within the working day. We will help with setup, compatibility and key activation.

@catcode_support

Not quite what you are looking for?

We build custom modules for WordPress, WooCommerce, OpenCart and Shopify. Tell us about your task and we will prepare an estimate.

Order a custom module