Skip to main content

MageMe EU Withdrawal | Hyvä Theme Compatibility

The base mageme/module-eu-withdrawal ships templates for the Luma frontend. If your storefront runs on Hyvä, install the companion mageme/module-eu-withdrawal-hyva to render the same flow in pure Tailwind v4 utility classes and Alpine.js components — no RequireJS, no jQuery, no KnockoutJS, no Magewire.

If you also use Hyvä Checkout (not Luma checkout), install the separate mageme/module-eu-withdrawal-hyva-checkout companion for the checkout-side pre-contract block and digital-waiver step — see Hyvä Checkout companion below.

Prerequisites

  • Magento 2: 2.4.4 – 2.4.9 installed and running.
  • Hyvä Themes 1.4 or newer: an active Hyvä-based theme (or a child theme inheriting from one). The Hyvä compatibility fallback is bundled in 1.4+ — no separate install needed.
  • MageMe EU Withdrawal base module: mageme/module-eu-withdrawal already installed and enabled. See Installation.
  • Tailwind toolchain: the standard Hyvä npm / Tailwind compile workflow in your theme's web/tailwind/ directory.
  • Server access: SSH and Composer.

Step 1: Install the companion module

composer require mageme/module-eu-withdrawal-hyva
php bin/magento module:enable Hyva_MageMeEUWithdrawal
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

Step 2: Recompile Tailwind in your theme

The companion ships Tailwind utility classes in its phtml templates. Your active Hyvä theme picks them up automatically via Hyvä's standard module discovery — but you still need to recompile the theme's CSS bundle so the new classes are included.

Run the standard Hyvä Tailwind compile in your active theme:

cd app/design/frontend/<Vendor>/<theme>/web/tailwind
npm install # if you have not already
npm run build-prod

For development with hot reload:

npm run watch

After compiling, hard-refresh the storefront. If utility classes are missing (grid-cols-, max-w-, lg: breakpoints, etc.), the compile did not pick up the companion path — see Troubleshooting.

What is covered

Everything the customer sees in the storefront flow is reskinned for Hyvä:

  • The landing page with the right-of-withdrawal accordion.
  • The guest lookup form (with reCAPTCHA if enabled).
  • The logged-in customer's orders list with eligibility badges.
  • Step 2 — item selection with live quantity steppers, return-reason dropdowns, and the seal-break questions.
  • Step 3 — Review and Confirm.
  • Step 4 — Success.
  • The withdrawal block on the customer's order-view page, with the per-request history and cancel-confirmation modal.
  • The "Withdraw from contract" navigation link in the customer account.

The companion is CSP-compatible — no inline event handlers, no eval(), fully compliant with Hyvä's strict Content Security Policy.

Accent colour follows your theme

The withdrawal flow uses your theme's accent (primary) colour automatically — the same colour your Hyvä theme already uses for its own buttons and links. A non-blue storefront gets a matching withdrawal UI with no configuration and no template overrides. If you change your theme's primary colour, recompile Tailwind (Step 2 above) and the flow follows suit. (Only the small amber "Demo" note on the lookup page is intentionally left un-themed.)

Hyvä Checkout companion

If your storefront runs Hyvä Checkout (not Luma checkout), install the separate checkout companion. It re-implements two checkout-side compliance touch points for Hyvä Checkout's Magewire-based runtime:

  • Pre-contract Annex I block (Art. 6(1)(h)) — renders inside the Hyvä Checkout payment step as a collapsed accordion with the right-of-withdrawal text and the model withdrawal form download.
  • Digital-content waiver step (Art. 16(m)) — appears as a custom step between Shipping and Payment, only when the cart contains a detected digital item. Blocks navigation until both consent checkboxes are ticked.

Install

composer require mageme/module-eu-withdrawal-hyva-checkout
php bin/magento module:enable Hyva_MageMeEUWithdrawalCheckout
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

Then recompile your Hyvä Checkout theme's Tailwind bundle so the new utility classes are included. Path depends on your theme; for the default Hyvä theme:

cd vendor/hyva-themes/magento2-default-theme/web/tailwind
npm install
npm run build

The companion auto-disables itself if Hyva_Checkout is not installed, so it is safe to keep in composer require without breaking a non-Hyvä-Checkout storefront.

When you do NOT need the checkout companion

  • Hyvä theme + Luma checkout (mixed setup) — the base module's checkout templates render natively under Luma, no companion needed.
  • Luma theme only — base module covers everything.
  • Breeze theme — a separate Breeze companion exists.

Troubleshooting

SymptomAction
Utility classes missing on the landing pageRecompile your theme's Tailwind bundle — see Step 2: Recompile Tailwind.
Customer-account link missingToggle Frontend → Placements → Show in My Account to Yes and flush cache.
Withdrawal block missing on the sales order viewConfirm the Hyvä companion module is enabled, then check that the order is in a state where withdrawal is possible (see Eligibility Rules).
Pre-contract block missing on Hyvä Checkout payment stepInstall the Hyvä Checkout companion. The base module covers Luma checkout only.

For unresolved issues, open a ticket on the companion GitHub repo or contact support@mageme.com.