Variant Price Surcharge: Troubleshooting and FAQ
Troubleshooting Variant Price Surcharge: price does not change, cart differs from product page, missing custom fields, rounding, plus known limitations and frequently asked questions.
Troubleshooting and FAQ
Troubleshooting
The variant price does not change
Symptom: Despite filled custom fields, the variant shows the original price in the storefront.
Check:
- Is it really a variant? Parent products and products without variants are not adjusted.
- Is "Enable price adjustment" turned on on the variant or, if not set there, on the parent product? If the field is explicitly turned off on the variant, the parent product's value does not apply.
- Is at least one of "Percentage of parent product" or "Fixed price surcharge (EUR)" valid (0 to 1000 or -100000 to 100000)? Invalid values are ignored and logged as a warning.
- Does the parent product have a price greater than 0 in the sales channel's currency or the default currency?
- Has the cache been cleared?
bin/console cache:clear
Cart price differs from the product page
Symptom: The product page shows a different price than the cart.
Check: This plugin's cart processor runs at priority 1000. Cart processors with a higher priority run earlier, including Shopware's core processors for products and promotions. Processors with a lower priority run afterwards, for example those for delivery and discounts. Another plugin with a cart processor of lower priority that sets product prices can therefore overwrite this plugin's price. Check the processor priorities in your shop.
Custom fields missing on the product
Symptom: The mmd_surcharge_* fields are not visible in the admin.
Solution: Check that the plugin is installed and active, then run:
bin/console plugin:refresh
bin/console plugin:install --activate MmdVariantPriceSurcharge
bin/console cache:clear
If the custom field set
mmd_variant_price_surchargewas deleted manually, the plugin does not recreate it by itself. Uninstall the plugin without keeping user data and install it again.
Rounding differences
Symptom: Prices deviate by one cent from your own calculation.
Solution: Check the decimal places and rounding mode under Extensions > My Extensions > Variant Price Surcharge. The default is HALF_UP with 2 decimal places. Note that the setting can differ per sales channel.
Known limitations
- Inheritance applies to the whole adjustment, not field by field (see Configuration).
- An existing strikethrough or reference price of the variant is dropped for adjusted variants.
- The fixed surcharge is not converted into other currencies.
- The price adjustment only applies to variants.
FAQ
Why do I see the original price in the admin?
The plugin only calculates when loading in the sales channel and in the cart, not in the admin interface.
What happens with a negative result?
The price is set to 0.00.
Can I use only a percentage or only a surcharge?
Yes. An empty percentage counts as 100, an empty surcharge as 0.
Can the surcharge be negative?
Yes, a negative amount acts as a discount and is subtracted before the percentage is applied.
How high can the percentage and surcharge be?
The percentage ranges from 0 to 1000, the surcharge from -100000 to 100000.
Which prices does the plugin use with multiple currencies?
The parent product's price in the sales channel's currency, otherwise the default currency's price with the currency factor.