Skip to content

Releases: dbltoe/EU_Withdrawal_Button

EU Withdrawal Button v1.1.1

Choose a tag to compare

@dbltoe dbltoe released this 06 Oct 01:46

Documentation only: EU Withdrawal Button Pro is out, so the readme's Pro section and README.md now say what it does and where to get it instead of calling it planned. No code or setting changes; Upgrade in Plugin Manager and there's nothing to set.

EU Withdrawal Button v1.1.0

Choose a tag to compare

@dbltoe dbltoe released this 05 Oct 15:24

EU Withdrawal Button v1.1.0 for Zen Cart 1.5.8 through 3.0.0 (PHP 7.4 through 8.5).

  • Withdrawal link in the order confirmation email. Every order confirmation now carries "To withdraw from this order, use our withdrawal page:" with a Withdraw From Contract Here link, just above the store's disclaimer, in the customer's language. New setting Withdrawal Link in Order E-Mail? (on). With Show Withdrawal Button To set to Selected Countries it follows the order's delivery country (else billing); an unknown country gets the link.
  • Notifiers for add-ons such as EU Withdrawal Button Pro, listed in docs/CUSTOMIZING.md. With nothing listening, the plugin works exactly as 1.0.0 did.
  • If you copied tpl_eu_withdrawal_default.php into your template, copy the new NOTIFY_EU_WITHDRAWAL_TPL_* lines into your copy.

Upgrading from 1.0.0: upload the zc_plugins/EuWithdrawalButton/v1.1.0 folder beside v1.0.0, click Upgrade in Plugin Manager (then Upgrade again on the confirmation page), then Clean Up. Settings and withdrawal statements are kept.

Support: https://www.zen-cart.com/threads/207395

EU Withdrawal Button v1.0.0

Choose a tag to compare

@dbltoe dbltoe released this 05 Oct 09:00

First release. Adds the withdrawal button EU distance-selling law requires from 19 June 2026 (Article 11a, Directive (EU) 2023/2673): a "Withdraw From Contract Here" button in every page's footer, a no-login withdrawal page with a Confirm Withdrawal step, an emailed acknowledgment of receipt with the date and time, and Customers > Withdrawals in the admin. Encapsulated plugin for Zen Cart 1.5.8 through 3.0.0, PHP 7.4 through 8.5; no template edits.

What's in it

  • A "Withdraw From Contract Here" button in the footer of every page, with no template edits: inside the footer through NOTIFY_FOOTER_AFTER_NAVSUPP (2.1.0+, ZCA Bootstrap 3.8.0), else just before </body> through NOTIFY_FOOTER_END and moved up under the footer links.
  • The withdrawal page (main_page=eu_withdrawal): name, order and email, an optional list of items, then a review screen with Confirm Withdrawal. No account needed; a logged-in customer's details and recent orders are filled in, and the button on an order's page opens the form for that order. One Page Checkout's guest placeholder is never treated as a customer.
  • The acknowledgment of receipt (Article 11a(4)) with the statement and its date and time in the Store Time Zone, and the store's notice, reply-to the customer. Both are sent after the statement is saved, so a mail failure loses nothing; a failure is recorded and can be resent.
  • Order matching: a customer's own order by number, anyone else's by number and email. Unmatched statements are saved and flagged, never refused.
  • The spam trap holds a statement: saved, the store told, but nothing emailed to the address given and nothing written to the order until staff send the acknowledgment.
  • A matched order's history note is hidden from the customer; an optional customer-visible line and status change.
  • Customers > Withdrawals: list, filters, search, detail, status, staff note, Send Acknowledgment. The staff note and search are registered with Zen Cart's admin request sanitizer, so quotes, ampersands and angle brackets arrive as typed.
  • Show Withdrawal Button To: All Visitors, or Selected Countries (EU 27 + IS, LI, NO by default) by the order's country, the customer's default address or a server variable (Cloudflare's by default). Unknown shows the button; the page always answers.
  • The two legal labels, verbatim from the directive, for English, Dutch, Finnish, French, German, Italian and Spanish, chosen by language code. Other text falls back to English for a store language with no translation.
  • Preview Email definitions for both emails.

Verified: 14 harnesses on PHP 7.4-8.5, 29/29 mutations caught, phpstan and php-cs-fixer clean against Zen Cart 3.0.0's own configs, and live guest and logged-in withdrawals on a 2.2.2 store.

Install

Unzip, copy zc_plugins/EuWithdrawalButton/ into your store's zc_plugins/ folder, then Modules > Plugin Manager > EU Withdrawal Button > Install. Full steps are in docs/INSTALL.md and the readme inside the package.