Surcharges & discounts

How the cart calculates surcharges and discounts

Four ways to price an item, and a quantity that can follow the cart. The table shows what each type can do; the subpages show it in figures.

TypePriceTaxQuantity can be linkedStock
PercentageShare of everything that is in the cart before itsplit by the tax rates in the cartno, always exactly once–
Fixed amountGross and net, negative a discountown tax rate, requiredyes–
Free of charge€0.00tax rate required, as with a fixed amountyes–
Shopware productthe product's price or free of chargethe product's taxyesgoes down on ordering

The order matters.

The plugin adds the items to the cart one after the other, sorted by the Position field. Each one is added before the next is calculated.

For fixed amounts it makes no difference. A percentage, though, is calculated on everything in the cart at that moment: the products and every item that came before it. If a subsidy comes before the insurance, the insurance is calculated on the smaller amount.

In the demo shop the insurance is at position 1 and is therefore calculated on the goods only.

Insurance at position 1

  1. Product€400.00
  2. Insurance, 10% of €400.00€40.00
  3. Subsidy−€10.00
  4. Subtotal€430.00

Worked example

Subsidy at position 1

  1. Product€400.00
  2. Subsidy−€10.00
  3. Insurance, 10% of €390.00€39.00
  4. Subtotal€429.00

Worked example

When an item comes and goes.

Shopware recalculates the cart on every change. Each time, the plugin checks every item again from scratch.

The rule applies

The item is added, with the quantity its settings produce.

The rule no longer applies

At the next recalculation the item simply disappears. Nobody has to remove it.

The cart is empty

Then no item is added, not even with an always-valid rule.

Order in the administration

When creating or editing in the admin, no new items are added; existing ones stay.

The types in detail.