Trader Information
Back to topOverview
Back to topMage2Expert Coupon Link is an extension for Magento 2 that converts any Cart Price Rule coupon code into a secure, shareable URL that applies the discount to the customer's cart automatically — no copy-paste, no manual entry, and no extra steps at checkout. Every link is built from an AEAD-encrypted, tamper-proof token so the raw coupon code is never visible in the URL; if the token is altered in any way the link is silently rejected at the server. The extension integrates directly into the Cart Price Rule edit page by adding a collapsible Coupon Link fieldset where merchants set per-rule options and copy the generated URL in a single click — no separate admin grid navigation is needed. Beyond simple coupon application, the extension can optionally add one or more catalog products to the cart before the discount is validated, enabling pre-loaded promotional carts that arrive at checkout with the correct items and price already applied. For email campaigns where customers may not yet have anything in their cart, the extension stores the pending coupon in the session and applies it automatically the moment the first product is added, so the discount is never lost. A native Magento widget makes it straightforward to embed coupon links in CMS pages, CMS blocks, and transactional email templates; in email contexts the widget can mint a unique single-use coupon code per recipient using Magento's own code generation and usage-limit enforcement. All configuration settings — redirect path, success message, error message, and optional popup image — are store-view scoped and fully manageable from Stores → Configuration → Mage2Expert → Coupon Link without touching any template files or writing custom code.
Features
- Token-Encrypted Shareable URLs — each coupon link encodes the coupon code in an AEAD-encrypted, base64url token. The raw code is never exposed. Any tampered or forged token is rejected before it reaches the quote, preventing coupon guessing and brute-force attacks.
- Coupon Link Fieldset on Every Cart Price Rule — the extension injects a collapsible Coupon Link section directly onto the existing Marketing → Cart Price Rules edit page. Merchants see a read-only Generated Link field with a one-click copy button, a per-rule enable/disable toggle, a redirect URL override, and the add-to-cart configuration — all without leaving the rule edit form.
- Per-Rule Enable / Disable Toggle — each rule independently controls whether its link is active. Disabling a rule's link does not affect the global module setting or any other rule's links, making it safe to pause individual promotions without disrupting site-wide campaigns.
- Add Products to Cart on Link Click — enable Add Products to Cart on any rule to specify a comma-separated list of product SKUs and per-SKU quantities. When the link is visited, those products are added to the quote before the coupon is validated, so cart-condition rules (minimum subtotal, required product in cart) evaluate against the newly added items. Failed SKUs are silently skipped and logged without blocking the coupon application.
- Empty-Cart Session Support — when a coupon link is visited with an empty quote, the coupon code is stored in the checkout session and the success message is shown immediately. An event observer fires on the next add to cart action and applies the pending coupon in the same save cycle — no customer action required and no opportunity for the discount to be lost.
- CMS & Email Widget — a native Magento widget registered via
widget.xml(is_email_compatible="true") renders a styled anchor tag anywhere in CMS pages, CMS blocks, or transactional email templates. Each widget instance independently configures the Cart Price Rule, link text, redirect URL override, product SKUs to add, and CSS class. - Unique One-Time Coupon Code Per Render — when Generate Unique Code Per Render is enabled on a widget instance, the block mints a fresh single-use coupon code on every render using Magento's native
SalesRule\Model\Coupon\Codegeneratorand saves it withusage_limit = 1. Each email recipient receives a link that only they can redeem, with usage enforcement handled entirely by Magento's existing coupon tracking — no custom table or cron needed. - Configurable Redirect Path — the global redirect path (default:
checkout/cart) is set in configuration. Individual Cart Price Rules and individual widget instances can each override the redirect independently, enabling promotions that land on a specific category page, landing page, or straight to checkout. - Customisable Success and Error Messages — both messages are editable in configuration with WYSIWYG support. The
{{coupon_code}}placeholder is substituted with the actual code at render time. An optional popup image (uploaded to media storage) can be shown alongside the success message for visual confirmation banners. - Per-Rule Redirect URL Override — each Cart Price Rule's Coupon Link fieldset has its own Redirect URL Override field that takes precedence over the module-level default when set, allowing different promotions to each redirect to the most relevant destination.
- Auto-Generated Coupon Length Setting — a numeric Auto-Generated Coupon Length field on each rule acts as the default code length for widget instances targeting that rule with unique-code generation enabled, without requiring per-widget length configuration.
- Master Enable / Disable Switch — a global Enable Module toggle in configuration suspends all coupon link processing (returning 404 for every link URL) without affecting Cart Price Rule data or the
mage2expert_couponlink_ruledatabase table. Re-enabling restores full functionality immediately. - Zero Core Code Modifications — the extension is built entirely on Magento's plugin (interceptor), observer, layout XML, widget, and UI component mechanisms. No class preferences, no rewrites, no patches. Safe alongside Magento upgrades and compatible with other extensions that extend Cart Price Rules.
How It Works
After installation, open any Cart Price Rule under Marketing → Cart Price Rules that uses Coupon Type = Specific Coupon and has a coupon code saved. Scroll to the Coupon Link fieldset at the bottom of the rule form. The Generated Link field displays the full shareable URL immediately — click Copy Link to copy it to the clipboard. Paste it into an email campaign, social post, QR code, or any other channel. When a customer visits the URL, the module decrypts the token, validates the coupon against Magento's standard rule engine, applies it to the quote, and redirects the customer to the cart (or the configured redirect path) with a success confirmation message. If the cart is empty at the time of the visit, the coupon is stored in the session and applied automatically when the first product is added.
Add Products to Cart
Enable Add Products to Cart in the rule's Coupon Link fieldset and enter a comma-separated list of SKUs in Product SKUs with matching quantities in Product Qtys. When the link is clicked, those products are added to the cart first — before the coupon is validated — so rules with cart conditions (for example, "subtotal at least $50" or "cart contains product X") evaluate correctly against the pre-loaded items. This is ideal for bundle promotions, gift-with-purchase offers, or any campaign where the customer should arrive at a pre-configured cart rather than adding items manually.
Empty-Cart Session Coupon
Email campaigns often reach customers who are not currently shopping. When a recipient clicks a coupon link with nothing in their cart, Mage2Expert Coupon Link stores the pending coupon in the Magento checkout session and immediately shows the success confirmation message so the customer knows the discount is reserved. The next time they add any product to their cart, an observer on the checkout_cart_product_add_after event picks up the pending coupon and applies it in the same cart::save() cycle — no extra click, no reminder, no lost discount. The session key is cleared after one-time application so the coupon cannot be re-applied from session state on a subsequent visit.
Widget — Unique Codes for Email
The Coupon Link by Mage2Expert widget is email-compatible and fully configurable per instance. In email templates, enabling Generate Unique Code Per Render causes the block to create a new coupon record tied to the selected Cart Price Rule on every render, with usage_limit = 1 so it can only be redeemed once. The rule must have Use Auto Generation enabled in its coupon settings; the widget checks for this and sets the flag automatically on first use. Generated codes are tracked inside Magento's existing salesrule_coupon table, so redemption counts and per-customer usage limits work identically to manually entered codes with no additional administration.
Use Cases
- Email Marketing Campaigns — embed a coupon link in a promotional email so recipients click once to apply their discount, removing the friction of manually entering a code at checkout and improving conversion rates for time-limited offers.
- Personalised One-Time Discount Codes — use the widget's unique-code-per-render feature in transactional email templates to give each customer a non-transferable single-use link, preventing code sharing while keeping the redemption experience seamless.
- Pre-Loaded Promotional Carts — combine the coupon link with the Add Products to Cart feature to create a single URL that puts the right products into the cart and applies the discount in one click — ideal for flash sales, bundle offers, or influencer campaigns with a specific product set.
- SMS and QR Code Promotions — short, encrypted links are well suited to SMS messages and printed QR codes where customers cannot type a coupon code. The token-based URL is unguessable so leaking one link does not expose the coupon code or allow enumeration of other codes.
- Welcome and Re-Engagement Flows — send a coupon link in a welcome email or win-back sequence. If the customer clicks the link before deciding what to buy, the empty-cart session support ensures the discount is automatically applied when they eventually add items, keeping the offer top-of-mind without requiring them to return to the original email.
- CMS Promotional Pages — place the widget in a CMS banner or landing page to create a prominent clickable call-to-action that applies a discount automatically, eliminating the need for a separate coupon code section in page copy.
Technical Specifications
Back to topSeller profile
Seller contact
Current Version
1.0.0
Adobe Commerce platform compatibility
Adobe Commerce (cloud): 2.4 (current)
Adobe Commerce (on-prem): 2.4 (current)
Magento Open Source: 2.4 (current)
Type
Stable Build
Updated
22 July, 2026
Categories
Extensions, Marketing, Email Marketing, Advertising
Quality Report
Back to topAll tests were conducted on the latest versions of Adobe Commerce that existed for the compatible release lines at the moment of the extension submission. Latest versions of all other software were used, as applicable.
Release Notes
Back to top1.0.0:
- Compatible with Adobe Commerce (cloud) : 2.4
- Compatible with Adobe Commerce (on-prem) : 2.4
- Compatible with Magento Open Source : 2.4
- Stability: Stable Build
-
Description:
Initial release — token-encrypted coupon URLs, Coupon Link fieldset on Cart Price Rule edit page, optional auto-add products to cart, empty-cart session coupon support, CMS & email widget with unique one-time code generation, configurable messages and popup image, master enable/disable switch.
Support
Back to topThe best place to start if you need help with a specific extension is to contact the developer. All Adobe Commerce developers have both a contact email and a support email listed.
Contact Vendor