Scratch & Win for Magento 2

Scratch & Win for Magento 2: a digital scratch card that reveals a prize drawn on the server, with prize chances, budgets, play limits, e-mail capture and a personal coupon for every win. Luma and Hyvä.

  • Magento 2.4.7 – 2.4.9
  • PHP 8.2 – 8.5
  • Hyvä and Luma
  • Version 1.1.0
$199

One-off payment, with 12 months of updates.

What is included

  • Install with Composer, or download a zip from your account
  • Licence for one production domain, staging and development copies included

No subscription or automatic renewal. Keep using the versions included in your update period. Update and licence details

Key features

  • Scratch with finger, mouse or pen, or press Reveal
  • Percent, amount, free shipping or your own cart rule
  • Live chances, prize limits per day and in total
See all features

Composer package commercegears/module-promo-scratch-win

  • Your budget, not luck

    Cap the number of prizes and their total value, and limit single prizes per day. When a prize runs out, the fallback prize is given.

  • Fair and safe

    The server draws each prize when the card is handed out and binds it to that card. Reloading shows the same card, and the code only arrives after scratching.

  • Leads that convert

    Visitors leave their e-mail address before scratching or after a win, and get a personal code they can apply to their basket straight away.

All features

What is included

Prizes and budget

  • Percent off, amount off, free shipping, no prize or your own cart price rule
  • Weights with live chance in %, fallback prize
  • Max. winners in total and per day per prize
  • Budget by number of prizes and by prize value
  • Minimum subtotal and validity in days per prize

Play limits and leads

  • Cards per day per browser, account, e-mail and IP address
  • Cards per person in total
  • E-mail before scratching or only after a win
  • Consent checkbox with newsletter subscription
  • Rate limit, honeypot, same-origin and optional reCAPTCHA v3 checks

Display

  • Pages: home, category, product, basket, CMS, search, other
  • Opens after seconds, on scroll, on exit intent or straight away
  • Floating tab, phones on or off, days before reopening
  • Cover colour or image, card and accent colours, all texts
  • Reveal threshold in %, Reveal button, reduced motion

Coupons and reports

  • Personal single-use codes with your prefix
  • Copy, apply to basket, optional automatic apply and e-mail
  • Results per card and prize, Promotions Overview
  • Preview link, duplicate, reset counters, CLI report

Feature tour

Everything your shoppers and your team see

01 / 05

A card visitors want to scratch

The card opens after a delay, on scroll, on exit intent or from a floating "Scratch & win" tab. Your colours, cover image, texts and prizes.

02 / 05

The code, ready to use

Winners copy their personal code or apply it to the basket in one click. With an empty basket it is applied when the first product is added.

03 / 05

Made for thumbs

On phones the card opens as a bottom sheet and is scratched with a finger. Hyvä and Luma are both supported.

04 / 05

Chances you can see

Enter a weight per prize and see its chance in % as you type. Limit prizes in total and per day and choose a fallback.

05 / 05

Know what every card brings

Views, cards played, prizes won per prize, codes used in orders, revenue and budget used, on the card's edit page.

Live demo

Try it before you install it

A full Magento store with the module installed, on Luma and on Hyvä. The admin demo signs you in with one click.

Compatibility

Requirements and compatibility

Compatibility of Scratch & Win
Magento2.4.7 – 2.4.9
PlatformsMagento Open Source and Adobe Commerce (one price)
Storefront themes Luma Blank Hyvä
PHP8.2 – 8.5
Latest version 1.1.0
composer.json requires php ~8.2.0||~8.3.0||~8.4.0||~8.5.0 ext-json * magento/framework ~103.0.7 commercegears/module-core ^2.0 free, installed by Composer with this module commercegears/module-promo-core ^2.1 free, installed by Composer with this module magento/module-backend * magento/module-catalog * magento/module-checkout * magento/module-config * magento/module-customer * magento/module-quote * magento/module-sales-rule * magento/module-store * magento/module-ui *

Installation

Up and running in minutes

After you buy, create a Composer key in your account. Then, in the root of your Magento project:

  1. 01Add the repository and your key (once per project)

    composer config repositories.commercegears composer https://repo.commercegears.com
    composer config --auth http-basic.repo.commercegears.com PUBLIC_KEY PRIVATE_KEY
  2. 02Install the module

    composer require commercegears/module-promo-scratch-win
  3. 03Enable it

    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento setup:static-content:deploy
    bin/magento cache:flush

    The last three are only needed in production mode.

Prefer a zip? Every version you are entitled to can be downloaded from My modules. More about Composer access

User guide

Setting up Scratch & Win

The user guide has its own page: how to install Scratch & Win, what each option does and how to use it in your store. Written for version 1.1.0; a copy ships with the module.

In the guide

Read the user guide

Changelog

Release notes

1.1.0

Latest
  • New: card texts and prize texts per store view, for example in German on a German store view
  • Improvement: a copied card keeps its texts per store view

1.0.4

  • Improvement: on phones the side tab is a small icon at the screen edge and covers less.
  • New: German translation, including the prize e-mail.

1.0.3

  • Fix: a won code that was already used or has expired is no longer offered with "Apply to basket"
  • Fix: the admin prize table fits on 1280 and 1366 px screens without scrolling sideways

1.0.2

  • Fix: the "Scratch & win" tab no longer covers the cookie banner; on phones it moves above it.
  • Improvement: demo links for the Luma and Hyvä storefronts and the admin demo.

1.0.1

  • Improvement: documentation screenshots updated.

1.0.0

  • New: first release with scratch cards that reveal a prize drawn on the server, with chances and budgets
  • New: play limits per browser, account, e-mail and IP address, and e-mail capture with consent
  • New: personal single-use coupons with copy, apply to basket and optional prize e-mail
  • New: results per card and prize, preview link, and a scratch card offer for Exit Intent
  • New: works on Luma and Hyvä with touch, mouse, pen and keyboard, and respects reduced motion

FAQ

Questions, answered

Something else on your mind? The developers who wrote the module answer before and after you buy.

Ask a question →

Already installed it? Open a support ticket

Is the prize decided in the browser?

No. The server draws the prize when the card is handed out, using your chances, prize limits and budget. The card only reveals it. The coupon code is sent to the browser after the card was scratched.

Can visitors get a better prize by reloading the page?

No. The prize is bound to the card. A visitor who reloads while a card is open gets the same card with the same prize again, and the play limits stop new cards.

Can I use the Black Friday example of 5%, 10%, 15% and 25% off?

Yes. Enter the four prizes with the weights 50, 30, 15 and 5. The Chance column shows 50%, 30%, 15% and 5% as you type. You can add a "no prize" row, free shipping, a fixed amount or a code of your own cart price rule.

How do I control the cost?

Set a maximum number of prizes and a maximum prize value per card, and limit single prizes in total and per day. When a prize runs out, the fallback prize is given; when the budget is used up, the card tells visitors that all prizes have been given away.

How often can a visitor play?

You choose per card: cards per day per browser, per customer account, per e-mail address and per IP address, and cards per person in total.

Do visitors have to enter their e-mail address?

Guests enter it either before scratching or only after a win, per card. Logged-in customers are never asked. A consent checkbox can be shown and made required; with consent the address can be subscribed to the newsletter.

Does it work on phones?

Yes. The card opens as a bottom sheet on small screens and can be scratched with a finger. Phones that support it give a short vibration. You can switch the card off for phones.

Is it accessible?

The "Reveal" button reveals the card for keyboard and screen reader users, the result is announced, focus moves to the "Copy code" button, and with "reduce motion" there is no confetti and no delay.

How does the customer use the code?

The card shows the code with "Copy code" and "Apply to basket". With an empty basket the code is applied when the first product is added. You can also apply it automatically and send it by e-mail. With Coupon Wallet installed, the code is listed in the customer account, mini basket, basket and checkout.

Can another customer use a won code?

No. Codes are personal and single-use by default: they work for the e-mail address or account that won them.

Does it work with Hyvä?

Yes. The card uses plain JavaScript and works on Luma and Hyvä themes. Checkout on Hyvä stores uses the Luma checkout.

Can Exit Intent show a scratch card?

Yes. Scratch & Win registers the offer type "scratch" in Promotions Core. Exit Intent can offer a card to visitors who are about to leave; the card's prizes, limits and reports apply.

Where do I see the results?

On the card's edit page (views, cards played, prizes won per prize, codes used, revenue, budget used), in CommerceGears > Promotions > Overview together with the other promotion modules, and with bin/magento commercegears:scratch:report.

Support

Help from the developers who wrote it

From the blog

Guides and articles