# magenerds/germanlaw

> This module provides general settings for german stores

`composer require magenerds/germanlaw`

Canonical URL: https://packagento.com/magenerds/germanlaw

## At a glance

- **Vendor**: magenerds (https://packagento.com/magenerds.md)
- **Latest version**: 1.3.1 — released 2023-06-29
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/magenerds/germanlaw and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require magenerds/germanlaw:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

This module provides general settings for german stores

## README

This extension provides basic configurations for your Magento store in order to be ready for the german market.   
It includes many system configuration settings, tax configuration as well as cms pages for legal information.   
It also shows legal notices for shipping costs after every price.

### Extension installation

The easiest way to install the Magenerds module is via composer

```
## add to composer require
composer require magenerds/germanlaw

## run magento setup to activate the module
bin/magento set:up
```

### Extension activation

At any time you can enable and disable this extension in the system configuration.   
You can do this by opening the backend menu ```Stores > Configuration```.   
There you will find the entry ```Magenerds > GermanLaw```.   
After clicking on it you see a dropdown box where you can enable/disable the module. Save the configuration and delete
the cache.

![GermanLaw-Activation](_images/gl_activ.png?raw=true "GermanLaw Activation")

### Extension configuration

You can configure the shipping notice either to be displayed after every price directly or in the footer whereas there
ist an asterisk (*) behind every price referencing to the footer.   
Go to ```Stores > Configuration and Magenerds > GermanLaw``` and then to Price display. There you can choose if you use
the asterisk or not:

![GermanLaw-Configuration](_images/gl_config.png?raw=true "GermanLaw Configuration")

You can also define the tax and shipping text being dispayed. Therefore you can use %s in order to define the tax amount
in the text.   
For defining the link to the shipping page you can use [ and ] before and after the word you want to use as a link.
**Example**: Inkl. %s MwSt., zzgl. [Versand] will lead to Inkl. 19% MwSt., zzgl. Versand whereas Versand is the link to
the shipping page.
The last configuration setting is the selected cms page which is the shipping page you want to link to.

### Installed CMS Pages

This extension installs 5 cms pages during installation:

* AGB
* Widerrufsbelehrung
* Impressum
* Versandkosten
* Datenschutzbestimmung

The cms pages have dummy content so you should fill them if you use them. The german law says you have to use them :-)

### Tax configuration

This extension installs the two german tax rates:

* 7%
* 19%

You can select them if you edit a product in the backend under Product details:

![GermanLaw-Tax](_images/gl_tax.png?raw=true "GermanLaw Tax-Config")

### System configuration

This extensions configures the system so that the store is ready for the german market. In detail the settings are as
follows:

* Default country: DE
* Locale code: de_DE
* State required: CA,EE,FI,FR,LV,LT,RO,ES,US
* Timezone: Europe/Berlin
* Weight unit: kgs
* Week’s first day: Monday
* Currency: EUR
* Sendfriend: Disabled as not allowed in Germany
* Newsletter subscription confirmation: Enabled
* Create customer account confirmation: Enabled
* Prefix options: Herr;Frau;Firma
* Show middlename: Disabled
* Show price including tax: Enabled
* Show discount including tax: Enabled
* Default country: DE
* Show agreements: Enabled
* Origin country: DE
* Origin postcode: empty

## Recent Versions

| Version | Released |
|---|---|
| 1.3.1 | 2023-06-29 |
| 1.3.0 | 2022-05-24 |
| 1.2.2 | 2020-10-20 |
| 1.2.1.1 | 2019-05-07 |
| 1.2.1 | 2018-12-12 |
| 1.2.0 | 2018-09-03 |
| 1.1.1 | 2018-06-07 |
| 1.1.0 | 2018-02-07 |
| 1.0.13 | 2017-11-19 |
| 1.0.12 | 2017-09-30 |

Showing 10 of 21 versions. Full release history on https://packagento.com/magenerds/germanlaw.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magenerds/dashboard | * |
| magento/framework | * |

## Quality

Latest release (1.3.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 74 | 4 errors, 70 warnings (ruleset: Magento2) — 37 auto-fixable with phpcbf |
| PHPMD | Warning | 4 | 4 rule violations (IfStatementAssignment:1, UnusedFormalParameter:1, CyclomaticComplexity:1, NPathComplexity:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 2 | valid; 2 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1 | 1 | – | – |
| 2.4.8 | – | 1 | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["magenerds/germanlaw"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

magenerds is a Magento 2 vendor on Packagento. See https://packagento.com/magenerds.md for their full catalogue.

