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 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.3.11 or newer: an active Hyvä-based theme (or a child theme inheriting from one). The compatibility fallback that lets the companion replace the base templates comes with the Hyvä theme package — 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, withdrawal-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.

On Hyvä the flow consistently speaks of a withdrawal, not a return, and its buttons and headings are in Title Case: Find My Order, Select Items for Withdrawal, Continue to Review, Withdrawal Summary, Start Withdrawal on the order page, and "Your withdrawal request has been submitted!" after confirming. Return shipping, the return policy and the refund amount keep their names. The companion ships its own translations of these texts in all 22 languages; if you translated the old texts yourself, translate the new ones.

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; if the customer tries to continue without them, a message under the step tells them to confirm both boxes, and each box still missing is outlined with a short note under it saying what is required. The message stays until both boxes are ticked. The step's name in the checkout progress bar is translated into the store's language. If the address, the cart or the consent text changes after the boxes were ticked, both boxes are cleared and the current text is shown, so the customer confirms again. Changing only the quantity keeps the consent.

The companion works with Hyvä Checkout 1.3 and 3.x. Hyvä Checkout 3 itself needs PHP 8.2 or newer. On Hyvä Checkout 3 the companion runs natively, so it keeps working if you switch off Hyvä's Magewire 1 backward-compatibility module.

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.

Pro companions​

Two Pro features show something on the storefront, so each has its own Hyvä companion. Install the one for every Pro feature you use on a Hyvä storefront. Both come from the MageMe Composer repository, like the Pro modules.

Pro featureHyvä companionModuleCurrent versionNeeds
Seal Photos — the photo upload on the item selection stepmageme/module-eu-withdrawal-photo-hyvaHyva_MageMeEUWithdrawalPhoto1.0.3Seal Photos and the Hyvä companion above
Receipt Verify — the public verification pagemageme/module-eu-withdrawal-receipt-verify-hyvaHyva_MageMeEUWithdrawalReceiptVerify1.0.5Receipt Verify 1.0.4 or later

Install​

composer require mageme/module-eu-withdrawal-photo-hyva mageme/module-eu-withdrawal-receipt-verify-hyva
php bin/magento module:enable Hyva_MageMeEUWithdrawalPhoto Hyva_MageMeEUWithdrawalReceiptVerify
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

Leave out the package and module of a feature you do not use. Then recompile your theme's Tailwind bundle — see Step 2: Recompile Tailwind.

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.