Search by

mhinspeya / lucky-spin-hyva

Inspeya Lucky Spin Extension lets you engage with your store visitors through interactive game experience and offer winnings to boost purchases.

Maintainers

Package info

git.modehaus.de/hyvae/inspeya-lucky-spin/

Homepage

Type:magento2-module

pkg:composer/mhinspeya/lucky-spin-hyva

Transparency log

Statistics

Installs: 29

Dependents: 0

Suggesters: 0

1.0.5 2026-08-21 12:34 UTC

This package is not auto-updated.

Last update: 2026-09-04 12:50:38 UTC


README

mhinspeya/lucky-spin-hyva

Module Information

ItemValue
ModuleMHinspeya_Spinwheel
Composer packagemhinspeya/lucky-spin-hyva
Version1.0.3
LicenseOSL-3.0
AuthorMHinspeya / Inspeya
Path (manual install)app/code/MHinspeya/Spinwheel
Admin routeinspeyaspinwheel
Dependencymhinspeya/backend-mod ^1.0

Overview

The Inspeya Hyva Lucky Spin module adds an interactive gamification experience to Magento 2. A customizable lucky-spin popup lets customers win discounts, coupon codes, free shipping, or other promotional rewards.

The module is built for Hyvä Themes (lightweight JS, Tailwind-friendly markup) and is configured from Magento Admin without code changes.

Key benefits

  • Increase visitor engagement with an interactive spin wheel.
  • Encourage newsletter sign-up / lead capture before the spin.
  • Improve conversion by rewarding visitors with exclusive offers.
  • Reduce cart abandonment with personalized discount incentives.
  • Create a fun shopping experience that supports retention.

Features

  • Fully compatible with Hyvä Themes.
  • Responsive design for desktop, tablet, and mobile.
  • Campaign-based popups (homepage, CMS, category, product, cart).
  • Weighted wheel slices (gravity %) mapped to Magento cart price rules.
  • Restrict display by store, customer group, device, date/time, and frequency.
  • Optional email / name / address fields before spinning.
  • Automatic coupon assignment from the selected cart price rule.
  • Global popup design (colors, radii, padding) in Stores → Configuration.
  • Duplicate campaigns (clone + slices, copy is disabled).
  • Audit log for campaign and configuration changes.
  • Spin user list with CSV / Excel export.
  • Translations: en_US, de_DE, de_AT, de_CH.

Requirements

  • Magento Open Source / Adobe Commerce 2.4.x
  • PHP 8.1 – 8.4 (>=8.1 <8.5)
  • Hyvä Theme (storefront)
  • Composer (if using Composer install)
  • Dependency: mhinspeya/backend-mod ^1.0 (Inspeya admin menu tab)
  • Writable Magento dirs: var/, generated/, pub/static/

Installation

Run all commands from the Magento root.

In production mode, run setup:di:compile and static-content deploy after enable/upgrade.

Option 1: Composer (recommended)

# 1) Install the Inspeya backend menu dependency (if not already present)
composer require mhinspeya/backend-mod:^1.0

# 2) Install Lucky Spin
composer require mhinspeya/lucky-spin-hyva

# 3) Enable and upgrade
bin/magento module:enable MHinspeya_BackendMod MHinspeya_Spinwheel
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

If your Composer repository is private, add it first (example):

composer config repositories.mhinspeya composer https://repo.example.com

Use the repository URL provided by Inspeya for your license.

Option 2: Manual (app/code)

  1. Ensure MHinspeya_BackendMod is installed and enabled (vendor via Composer, or app/code/MHinspeya/BackendMod).

  2. Copy this module to:

    app/code/MHinspeya/Spinwheel
    
  3. Run:

    bin/magento module:enable MHinspeya_Spinwheel
    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento setup:static-content:deploy -f
    bin/magento cache:flush
    
  4. Confirm status:

    bin/magento module:status MHinspeya_Spinwheel
    

    Expected: Module is enabled.

Do not install the same package in both vendor and app/code. Magento will throw a duplicate-module error.

File / cache permissions

If bin/magento cache:flush cannot clear files owned by the web server, flush as that user, for example:

sudo -u www-data bin/magento cache:flush

Or use Admin → System → Cache Management.

Hyvä Tailwind (if your theme compiles module CSS)

If the store theme includes module Tailwind sources, add:

app/code/MHinspeya/Spinwheel/view/frontend/tailwind/tailwind-source.css

Then rebuild the Hyvä theme CSS as you normally do.

Uninstall / Disable

bin/magento module:disable MHinspeya_Spinwheel
bin/magento setup:upgrade
bin/magento cache:flush

Composer uninstall (only if installed via Composer):

composer remove mhinspeya/lucky-spin-hyva
bin/magento setup:upgrade
bin/magento cache:flush

Database tables from db_schema.xml are not removed automatically on disable. Remove them only if you intentionally want data purged:

  • mhinspeya_spincampaignslist
  • mhinspeya_spinwheel_slices
  • mhinspeya_spinwheel_userlist
  • mhinspeya_spinwheel_freq
  • mhinspeya_spinwheel_audit_log

Admin menu & ACL

Parent menu: Inspeya (MHinspeya_BackendMod::mhinspeya)

MenuPathACL
Lucky SpinInspeya → Lucky SpinMHinspeya_Spinwheel::spinwheel
Spin SettingsInspeya → Lucky Spin → Spin SettingsMHinspeya_Spinwheel::config_spin
Spin User ListInspeya → Lucky Spin → Spin User ListMHinspeya_Spinwheel::postuser
Spin Campaigns ListInspeya → Lucky Spin → Spin Campaigns ListMHinspeya_Spinwheel::campaign
Audit LogInspeya → Lucky Spin → Audit LogMHinspeya_Spinwheel::auditlog

Stores configuration is also available at:

Stores → Configuration → Inspeya → Lucky Spin (spinwheel)

Configuration

1. Stores → Configuration → Inspeya → Lucky Spin

The module is disabled by default (spinwheel/general/enable = 0). Enable it here, then create at least one campaign.

General Settings (spinwheel/general)

FieldConfig pathDefaultDescription
Module Enablespinwheel/general/enableNo (0)Master switch. Popup blocks only render when this is Yes.
Homepage Popup Enablespinwheel/general/home_popup_statusYes (after setup patch)Allow campaigns with Display = Homepage.
CMS Page Popup Enablespinwheel/general/cms_popup_statusYesAllow campaigns with Display = CMS Pages.
Category Popup Enablespinwheel/general/catgory_popup_statusYesAllow campaigns with Display = Category pages.
Product Page Popup Enablespinwheel/general/product_popup_statusYesAllow campaigns with Display = Product Pages.
Cart Page Popup Enablespinwheel/general/cart_popup_statusYesAllow campaigns with Display = Cart Page.
Enable Wheel Soundspinwheel/general/enable_wheel_soundPlay spin sound on the wheel.
Show Fireworksspinwheel/general/show_fireworksShow fireworks on a winning spin.

Page-type toggles also control which Display options appear on the campaign form. If a page type is No, that Display option is hidden.

Checkout popup exists in code but is not exposed in the current configuration UI.

Popup Design (spinwheel/design)

Global look-and-feel for all storefront popups. Use Use system value / Use Default to restore config.xml defaults. Color fields use a color picker.

FieldConfig pathDefault
Heading Colorspinwheel/design/heading_color#000000
Text Colorspinwheel/design/text_color#000000
Text Field Colorspinwheel/design/field_text_color#000000
Placeholder Colorspinwheel/design/placeholder_color#64748b
Button Colorspinwheel/design/button_color#000000
Button Text Colorspinwheel/design/button_text_color#ffffff
Button Hover Colorspinwheel/design/button_hover_color#333333
Wheel Circle Line Colorspinwheel/design/circle_line_color#be8686
Slice Text Colorspinwheel/design/slice_text_color#000000
Text Field Border Colorspinwheel/design/field_border_color#000000
Button Border Radius (px)spinwheel/design/button_border_radius0
Popup Border Radius (px)spinwheel/design/popup_border_radius0
Form Card Border Radius (px)spinwheel/design/form_card_border_radius0
Text Field Border Radius (px)spinwheel/design/field_border_radius0
Text Field Border Width (px)spinwheel/design/field_border_width1
Text Line Heightspinwheel/design/line_height1.5
Form Padding (px)spinwheel/design/form_padding20

Saving this section is recorded in the Audit Log.

2. Spin Campaigns List

Inspeya → Lucky Spin → Spin Campaigns List

Create one campaign per popup placement (or more, using sort order when several match).

Grid columns: Campaign Id, Name, Is Active, Image, Display on, Sort Order, Valid From, Valid To, Identifier, Store Info.

Grid actions

  • Add New Lucky Spin Campaign
  • Row: Edit, Duplicate
  • Mass: Enable, Disable, Delete

Campaign form buttons: Back, Duplicate, Delete, Save and Continue, Save.

Duplicate clones the campaign and all slices. The copy name is {original} (Copy), identifier is unique, and status is disabled.

Lucky Spin Popup Detail

FieldRequiredNotes
NameYesAdmin label.
IdentifierYesLetters only, no spaces or special characters.
Campaign ImageYesjpg / jpeg / png, max 2 MB. Shown on the wheel popup.
StatusYesEnabled / Disabled toggle. Default enabled.
Select StoresYesMulti-select store views.
Valid FromYesDate + time (dd.MM.y HH:mm), Magento store timezone.
Valid ToYesDate + time, Magento store timezone.
Sort OrderNoLower number wins when several campaigns match. Digits only. Default 0.

Lucky Spin Popup Settings

FieldRequiredOptions / notes
DisplayYesHomepage, CMS Pages, Category pages, Product Pages, Cart Page (Checkout exists in code but is hidden unless enabled in config). Options appear only when the matching page popup setting is Yes.
Select cms pagesNoShown for CMS Display. Multi-select CMS pages.
CategoryNoShown for Category Display. Multi-select catalog categories.
Display on deviceYesAll Devices, Desktop, I-pad, Mobile.
Show Customer NameYesEmail only; First Name + Email; Last Name + Email; First & Last Name + Email; First, Last, Postcode & City + Email.
Display FrequencyYesEvery Visit; One Visit per hour; One visit per day; One visit per week; One visit per month.
Lucky Spin Hide PopupYesAlways Display; 10 / 20 / 30 / 40 Seconds.
User GroupNoMulti-select Magento customer groups (including NOT LOGGED IN).
When to showYesImmediately; Exit-Intent; After Time (seconds); When scroll down (%).
TimeIf When to show = After TimeSeconds to wait.
ScrollIf When to show = When scroll downScroll percentage.
Lucky Spin Popup positionNoCenter; Top Bar; Bottom Bar; Left Sidebar; Right Sidebar.
RangeNoDefault 20.
Title TextYes3–30 characters. Default: Play and win exciting discounts.
Subtitle TextYes3–50 characters.
Rules TextNoMax 120 characters.
Result titleYes3–50 characters. Default: Hooray! You have the discount voucher.
Result Sub titleYes3–50 characters. Default: Today is your lucky day!.
Result title last lineNo3–50 characters. Default: You can enter your discount code at checkout!.

Wheel slices

On the campaign form, select 3, 6, or 9 slices. For each slice:

FieldDescription
Select Cart price RuleMagento cart price rule used as the prize (coupon / discount).
Gravity (%)Win weight. Higher gravity = more likely. Weights are used together (weighted random).
ColorSlice color on the wheel.

Create cart price rules before assigning them to slices.

3. Spin User List

Inspeya → Lucky Spin → Spin User List

Customers who submitted the spin form. Columns: Id, First Name, Last Name, Post Code, City, Campaign Name, Coupon label, Store View, Created At.

  • Mass delete
  • Export CSV / Excel XML

4. Audit Log

Inspeya → Lucky Spin → Audit Log

Read-only history of admin changes. Columns: ID, Date, Admin User, Action, Entity Type, Entity, Entity ID, IP Address, Details.

Typical actions: campaign create / update / delete / duplicate, mass enable / disable / delete, and Stores → Configuration saves for Lucky Spin.

Customer experience

  1. Visitor opens a page where a matching campaign is allowed (module + page-type + campaign status, dates, store, group, device, frequency).
  2. Popup appears according to When to show (immediately, delay, scroll, or exit intent).
  3. Customer fills the fields required by Show Customer Name.
  4. Customer spins the wheel.
  5. A slice is selected using gravity weights.
  6. The linked cart price rule coupon / reward is shown (and emailed when configured).

Winning emails use template Spin To Win (spin_templatespinwheel.html). Sender is Magento Custom Email 1 (trans_email/ident_custom1).

Storefront pages

Popup templates load only when Module Enable is Yes:

PageLayoutTemplatePage-type config
Homepagecms_index_index.xmlspinpop.phtmlhome_popup_status
CMS pagecms_page_view.xmlcms-popup.phtmlcms_popup_status
Categorycatalog_category_view.xmlcat-popup.phtmlcatgory_popup_status
Productcatalog_product_view.xmlprod-popup.phtmlproduct_popup_status
Cartcheckout_cart_index.xmlcart-popup.phtmlcart_popup_status

Database tables

TablePurpose
mhinspeya_spincampaignslistCampaigns (schedule, targeting, copy, design leftovers).
mhinspeya_spinwheel_slicesWheel slices (rule, gravity, color) per campaign.
mhinspeya_spinwheel_userlistCustomers who spun.
mhinspeya_spinwheel_freqDisplay frequency tracking (IP / user / popup).
mhinspeya_spinwheel_audit_logAdmin audit trail.

Compatibility

  • Magento Open Source 2.4.x
  • Adobe Commerce 2.4.x
  • Hyvä Theme
  • PHP 8.1 – 8.4

Use cases

  • Promotional campaigns
  • Seasonal sales
  • Black Friday / newsletter capture
  • Cart-page last-chance offers

Test cases

Manual QA scenarios (admin, storefront, gravity, frequency, ACL, audit log, image URLs, and more) are in TESTCASES.md.

Support

For issues or questions, contact support@inspeya.com or visit https://inspeya.com.