定制 tenbruggencate/legal-pages 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tenbruggencate/legal-pages

最新稳定版本:1.3.1

Composer 安装命令:

composer require tenbruggencate/legal-pages

包简介

Shopware 6 legal pages: drop-in privacy / terms / shipping / returns / disclaimer templates in nl-NL / en-GB / de-DE with merge fields.

README 文档

README

Ten Bruggencate Development

TenBruggencateLegalPages

Legal Pages

Dutch / English / German legal page templates with configurable merge fields for company details. Drop in, fill in the admin fields, ship.

License: MIT · Shopware: 6.7.x · PHP: 8.1 / 8.2

🇬🇧 English · 🇳🇱 Nederlands · 🇩🇪 Deutsch

📖 More context: Why we built this · How it compares

⚠️ IMPORTANT — this plugin provides TEMPLATE legal text. Have a legal professional (Dutch / German / EU consumer law) review your configured text before it's exposed to real customers. Templates are a starting point, not a guarantee.

Screenshots

Privacy page on desktop — branded title, locale-aware 'Last updated' date below the heading, sectioned body content with merge-field-resolved company details.

Privacy page with v1.2.0 "Last updated" timestamp

Privacy page on mobile — fully responsive, last-updated line wraps below the heading, body sections stack cleanly.

Privacy page — mobile (responsive)

What it does

Every Shopware store needs imprint, privacy, shipping, returns, and a disclaimer. Most shops either (a) copy-paste text from another site (legal risk) or (b) leave them as Lorem Ipsum until launch day (worse legal risk). This plugin ships sensible nl/en/de defaults based on Dutch EU-compliant consumer-law templates, with your company details merged in from the admin at render time.

  • Five pages, routable out of the box
  • Merge-field pattern — admin fills in company details once; every page picks them up
  • Three locales — nl-NL, en-GB, de-DE
  • Per-page toggle — disable pages you don't need (e.g. if you already have a custom privacy page elsewhere)
  • Per-page "Last updated" timestamp (v1.2+) — five new optional datetime config fields let you record when each page was last reviewed. Renders below the page heading as a localised line (Last updated 9 May 2026 / Laatst bijgewerkt op 9 mei 2026 / Zuletzt aktualisiert am 9. Mai 2026) using Twig's format_date('long'). Wrapped in <time datetime="YYYY-MM-DD"> for machine readers and Schema.org. Empty config hides the line

Install

composer require tenbruggencate/legal-pages
bin/console plugin:refresh
bin/console plugin:install --activate TenBruggencateLegalPages
bin/console cache:clear

Pages

RoutePathContent
legal.voorwaarden/legal/voorwaardenAlgemene Voorwaarden (Terms & Conditions)
legal.privacy/legal/privacyPrivacyverklaring (Privacy Policy)
legal.verzending/legal/verzendingVerzendinformatie (Shipping Info)
legal.retour/legal/retourRetourbeleid (Return Policy)
legal.disclaimer/legal/disclaimerDisclaimer

Configuration

Configurable per sales channel from Extensions → Legal Pages.

FieldPurpose
companyNameCompany name (e.g. "Mijn Webshop B.V.")
companyAddressFull postal address
companyEmailContact email
companyPhonePhone number
kvkNumberChamber of Commerce number (KvK)
btwNumberVAT / BTW number
returnDaysReturn period in days (EU minimum: 14)
shippingCostStandard shipping cost
freeShippingThresholdFree shipping above this amount
enableVoorwaarden / enablePrivacy / enableVerzending / enableRetour / enableDisclaimerPer-page kill switches

Merge fields

The following placeholders are replaced with your configured values at render time:

{companyName}, {companyAddress}, {companyEmail}, {companyPhone}, {kvkNumber}, {btwNumber}, {returnDays}, {shippingCost}, {freeShippingThreshold}

To override any page's template, copy src/Resources/views/storefront/page/legal/<slug>.html.twig into your theme and edit. The merge-field resolver runs against whatever HTML/Twig you ship.

Standards

  • Performance — static template rendering; no DB queries at request time. Merge-field substitution is a single strtr() call.
  • SEO — every legal page ships with appropriate <meta name="robots"> defaults: indexable (search engines should see your terms & privacy), proper <title> and <meta description> derived from the page content, stable URLs.
  • GDPR — the privacy page template explicitly documents what you collect, why, and how long you keep it. Adapt the template to match your actual processing; don't leave the defaults unread. The plugin itself stores no visitor data — full data-flow documentation in GDPR.md.
  • WCAG 2.2 AA — semantic heading hierarchy (h1 / h2 / h3), proper lists for enumerated terms, keyboard-accessible <a> tags, no colour-only information. Live axe-core audit output + desktop + mobile screenshots: docs/ACCESSIBILITY.md.
  • Security — merge-field substitution is done on server-side; no user input reaches the templates. All admin-supplied values are escaped via Twig.
  • Uninstallplugin:uninstall --keep-user-data preserves every TenBruggencateLegalPages.config.* row (company name, VAT, KvK, per-page toggles); without the flag the destructive path clears them all. No owned tables.

Production-readiness checklist

A deliberately short list of things to verify before enabling the plugin on a customer-facing storefront. Not legal cover — the MIT license already disclaims warranty AND the templates ship with a "have a lawyer review before going live" disclaimer in their getting-started copy — but practical guidance an experienced operator would want anyway.

  • [ ] Have a legal professional review the rendered text for your jurisdiction. The defaults are based on Dutch / EU consumer-law templates; UK shops post-Brexit, Swiss shops, and shops outside the EEA need adjustments. The plugin's intro banner in admin already says "TEMPLATES, not legal advice" — heed it.
  • [ ] Fill every merge field that appears on a page you've enabled. An empty kvkNumber renders the literal string KvK: followed by nothing — visibly broken. The configuration UI flags blanks but doesn't block save.
  • [ ] *Set per-page `lastUpdated` dates (v1.2+) the moment you ship the reviewed text** — visible "last reviewed" dates are a soft trust signal for visitors and a hard one for consumer-protection authorities. Date-pickers in the admin take seconds.
  • [ ] Decide which pages you actually want. The five toggles (enableVoorwaarden, enablePrivacy, etc.) default to on; turn off any you have a custom version of elsewhere (e.g. an existing privacy CMS page) so the plugin's route returns 404 instead of competing.
  • [ ] Test on staging that the routes resolve. The plugin's routes are at /legal/voorwaarden, /legal/privacy, etc. — make sure your theme's footer links point at them (or your custom URLs, if you remap).

Compatibility

Core platform

ShopwarePHPStatus
6.7.x — tested against 6.7.8, 6.7.98.1, 8.2Stable
6.6.xNot supported
6.5.x and earlierNot supported

Database

EngineVersionNotes
MySQL8.0+Primary target; JSON functions used for config-row manipulation in migrations
MariaDB10.11+Tested end-to-end; earlier versions lack some JSON operator support

Browsers (storefront)

Evergreen browsers only — the two most recent stable releases of each:

BrowserDesktopMobile
Chrome / Chromium
Firefox
Safari✅ (macOS)✅ (iOS 16+)
Edge

Internet Explorer and legacy Edge are not supported. The plugin emits no runtime JS (where applicable) so graceful degradation on older browsers usually still renders content, just without progressive enhancements.

Admin browsers

Same evergreen matrix — the Shopware admin is Vue-based and has its own compatibility baseline that this plugin doesn't extend or narrow.

Development

ToolVersionScope
PHP≥ 8.1Runtime + test suite
Composer2.xDependency management
Node.js≥ 18Only needed if you edit SCSS and re-run the theme compile
Python≥ 3.9Only needed for the repo's asset-pipeline scripts (scripts/*.py)

Accessibility

WCAG 2.2 level A + AA — see docs/ACCESSIBILITY.md for axe-core audit output and per-page violations.

What we test before each release

  • Full PHPUnit unit suite against PHP 8.1 + 8.2 (source-inspection tests don't need a kernel)
  • PHPStan level 8 + PHP-CS-Fixer (@PSR12 + @Symfony)
  • Composer validate on every plugin
  • Live-DB smoke tests (plugin install → activate → route render → uninstall cycle)
  • axe-core audit on the primary storefront surfaces (see ACCESSIBILITY.md)

Related plugins

  • TenBruggencateMultiBrand — per-brand configuration: each sales channel carries its own companyName / kvkNumber / etc., so a multi-brand store renders each brand's legal pages with its own entity details
  • TenBruggencateMaintenance — legal footer links render in the maintenance footer so visitors can still reach imprint / privacy during downtime
  • TenBruggencateNewsletterLite/legal/privacy is the natural target for the privacyPageUrl config in NewsletterLite

Support

License

MIT © Ten Bruggencate Development

Legal template text in snippets is provided under MIT for reuse, but template text alone does not constitute legal advice. You are responsible for adapting it to your business and jurisdiction.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固