Symptom: Despite filled custom fields, the variant shows the original price in the storefront.
Check:
bin/console cache:clear
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.
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.
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.
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.