Shipping Calculations

Understand the various algorithms available for calculation of shipping charges

The simplest possible option is a fixed shipping charge - for example, 5 EURO. Whilst this is available in Pakk, it's not that useful normally. In most cases, we'll want to vary the charge based on some element of the cart/order. Pakk allows you to calculate shipping based on:

  • Total order weight

  • Number of items in order

  • Number of units in order

  • Order subtotal before tax

  • Order subtotal after tax

Once you've decided on what axis you want to base this shipping method, you need to decide exactly how to perform the calculation.

Per-Item Delivery Surcharges

Per-item delivery surcharges are set at product level. If a product has a delivery surcharge of £5 set, then an extra £5 (per unit) will be factored into the total shipping cost, irrespective of the Shipping Method chosen. However, if, for a particular Shipping Method, you would like to NOT include per-item charges (for example, for a 'Collection'-type Shipping Method), you can exclude per-item charges.

Free Shipping

Irrespective of which calculation type you choose, you can set a threshold for free shipping. This threshold will be activated as soon as the order value (including discounts, not including payment method surcharges) is equal to or over the threshold. By default, the threshold is the inc. VAT total, which is normally the right setting for retail sites. Trade sites might want to use the ex. VAT order total as the threshold, which can be achieved by setting free over is ex to true.

If you decide to offer free shipping, you'll also need to decide whether to free includes per item charges. If you set this option to true, then all item delivery surcharges will also be waived once the condition for free delivery is met. If this is set to false, then once the condition for free delivery is met, the main delivery charge will be free, but individual item surcharges will still stand.

Linear

The amount charged will either go up or down depending on the value of the axis (weight/order value etc). There are quite a few sub-options:

  • base amount, can be thought of the starting amount from where the rest of the calculation takes over.

  • over is the threshold for the linear calculation to kick in (grams, cents or units).

  • unit amount, how much extra to charge per increment of the axis once past the over threshold. If you set this to a negative value, then the charge will go down as the increment goes up

  • step size, the size of the increment you want to charge for (grams, cents or units); e.g. every additional 100 grams.

Example 1

We want to set up a shipping method which will cost 5 GBP for orders up to 20kg. After 20Kg we want to charge 0.20 GBP per Kg. Note that we specify weights here in grams:

  • axis = total order weight

  • base amount = 5.00

  • over = 20,000 (20Kg => 20,000 grams)

  • unit amount = 0.20

  • step size = 1000 (1000 grams => 1 Kg)

Example 2

We want to charge a basic rate of 10 GBP, but we want this to start going down once a customer spends over 200 GBP including VAT. In fact, we'd like it to decrease by 1 GBP for every 100 GBP spent. At 1000 GBP we want shipping to be free:

  • axis = order subtotal after tax

  • base amount = 10.00

  • over = 1000 (10 GBP => 1000 pence)

  • unit amount = -1.00

  • step size = 10,000 (10,000 pence => 100 GBP)

  • free over = 100.00

  • free over is ex = false (to use the **inc VAT cart value)

Band-based

The amount charged will be determined by a list of band thresholds and a list of band amounts.

  • band limits is a list of where the cutoff for each band falls, specified in units/cents/grams (depending on whether you are using units, price or weight as the axis)

  • band amounts is a list of costs associated with each corresponding band threshold

Example 1

Charge in bands of 1 kg. Each band is obviously more expensive, but the difference gets smaller as the weight increases:

  • band limits: [ 1000, 2000, 3000, 4000, 5000]

  • band amounts: [ 10, 19, 27, 35, 40]

Last updated