All sections free during launch

Forget this device?

You’ll need your email again to copy code here. Your email and newsletter settings stay as they are.

Promotion

Scratch Card

Nine fields under silver foil. Visitors rub them free with the mouse or a finger, and three matching symbols unlock a discount code to copy or apply with one tap. You set the prizes and their chances, the browser remembers each visitor's card – and if you want an email for it, the card asks before scratching or right before the code.

Access
Free
Page types
Home, Landing pages
Compatibility
All Shopify 2.0 themes*
Styles
1
Customise
60 settings · 1 block type
  • Scratch card
  • Discount codes
  • Gamification
  • Email signup
  • Promotion
  • Newsletter

Installation

Takes about two minutes. No app needed.

  1. 01

    Create a new section

    In your theme code editor (Online Store → ⋯ → Edit code), click the sections folder, then “New File”, name it and hit Enter.

  2. 02

    Paste the code

    In the file that just opened, paste the code below. Then hit Save (top right corner).

    Note: Shopify shows no confirmation when a section saves – that’s normal.

  3. 03

    Add it in the theme editor

    Saved? Then reload the theme editor – otherwise the new section sometimes doesn’t show up. After that: Edit theme → Add section → . Everything else is in the sidebar – the Docs below explain every setting.

Code

One file. Copy it, paste it, done.

sections/werk-scratch-card.liquid

Locked

2517 lines · Liquid, CSS & vanilla JS

Free – just add your email

Every section is free during launch. Enter your email once and copy any code you like.

More like this

Docs

Every setting, what it does and where you see it. Plus how the card draws its prize and why the third match always comes last.

Home & landing pages1 look · light1–5 prizesDiscount codesOptional email stepEvery text editable

What you can change

Every numbered spot has its own chapter below.

12 chapters

* Built for Online Store 2.0 and tested in Shopify's Horizon and Dawn themes. Heavily customised or older themes can still clash with it – if something looks off, write us and we'll take a look.

Live preview

Copied. Now paste it into Shopify.

Takes about two minutes. No app needed.

  1. 01

    Create a new section file

    In Shopify: Online Store → ⋯ → Edit code. Click the sections folder, then “New File”, name it and hit Enter:

    werk-scratch-card.liquid
  2. 02

    Paste the code and save

    In the file that just opened, paste the code:

    {%- comment -%} werk · Scratch Card · v1.0.0 · werk.build/license – do not remove {%- endcomment -%}

    Then hit Save (top right corner).

    Note: Shopify shows no confirmation when a section saves – that’s normal.

  3. 03

    Add it in the theme editor

    Saved? Then reload the theme editor – otherwise the new section sometimes doesn’t show up. After that: Add section → search “Scratch Card”. Done.

Your browser blocked copying.

No worries – the code is selected below. Press ⌘ C (Ctrl C on Windows) and you’re good.

⌘C