Flexible variant pricing with percentage calculations and fixed surcharges for Shopware 6.6/6.7.
Ideal for products with size-dependent or option-based pricing:
| Feature | Description |
|---|---|
| Percentage Calculation | Variant price = Parent product x Percentage |
| Fixed Surcharges | Add absolute EUR amounts (positive or negative) |
| Combined Mode | Use both percentage AND surcharge together |
| Per-Variant Activation | Controlled individually via Custom Fields |
| Storefront-Optimized | Only active in frontend, no admin overhead |
| Cart Integration | Correct prices also in shopping cart |
| Shopware 6.6 + 6.7 | Compatible with both versions |
Variant Price = (Parent Price + Fixed Surcharge) x (Percentage / 100)
Parent Product Price: 100.00 EUR
| Variant | Percentage | Surcharge | Calculation | Result |
|---|---|---|---|---|
| Standard | 100% | 0 EUR | (100 + 0) x 1.00 | 100.00 EUR |
| Discount | 50% | 0 EUR | (100 + 0) x 0.50 | 50.00 EUR |
| With Zipper | 100% | +8 EUR | (100 + 8) x 1.00 | 108.00 EUR |
| Premium XL | 120% | +10 EUR | (100 + 10) x 1.20 | 132.00 EUR |
| Sale Item | 100% | -15 EUR | (100 - 15) x 1.00 | 85.00 EUR |
Rounding: By default, commercial rounding to 2 decimal places.
Add the private Composer repository to your shop's composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://packeton.markus-michalski.net"
}
]
}
Note: Repository credentials will be provided upon license purchase. Private repositories are managed via Packeton.
composer require mmd/sw6-variant-price-surcharge
When prompted for authentication, enter the credentials provided with your license.
bin/console plugin:refresh
bin/console plugin:install --activate MmdVariantPriceSurcharge
bin/console cache:clear
Update to the latest version:
composer update mmd/sw6-variant-price-surcharge
bin/console cache:clear
The plugin expects three Custom Fields at product level:
| Technical Name | Type | Description |
|---|---|---|
mmd_surcharge_enabled |
Boolean | Enable surcharge pricing |
mmd_surcharge_percentage |
Number (Float) | Percentage (e.g., 50 for 50%), default: 100 |
mmd_surcharge_fixed |
Number (Float) | Fixed surcharge in EUR (positive or negative) |
100 for 100%)8.00 for +8 EUR or -5.00 for -5 EUR discount)Important: The variant's own price is ignored. Only the parent product price with surcharge and percentage matters.
sales_channel.product.loadedmmd_surcharge_enabled is active on the variantVariant price = (Parent price + Surcharge) x (Percentage / 100)The VariantPriceProcessor ensures that calculated prices are correctly applied in the shopping cart.
This is intentional. The plugin is only active in the Storefront to not impact Admin performance. The correct price is displayed in the frontend and cart.
Yes, simply set mmd_surcharge_fixed to 0 or leave it empty. The calculation becomes: Parent Price x Percentage.
Yes, simply set mmd_surcharge_percentage to 100 or leave it empty. The calculation becomes: Parent Price + Surcharge.
Yes, negative surcharges act as discounts. Example: -10 EUR reduces the base price by 10 EUR before percentage calculation.
The plugin ensures prices never go below 0.00 EUR.
The plugin allows up to 1000% (10x the parent product price).
The plugin allows surcharges from -100,000 EUR to +100,000 EUR.
Commercial License - Single installation license including:
See LICENSE file for full terms.
For questions and support:
Markus Michalski
Email: support@markus-michalski.net