Calculation Type - Per Shipping Class (when shipping classes are used)

Note: This type of shipment uses the «shipping classes» feature provided by WooCommerce by default, so you should create the «Shipping classes» in the WooCommerce settings beforehand and apply them to the products (we explain it to you here).

This type of calculation is typically used when you need to group products with different shipping rates. For example, lightweight products (light and standard packaging) and heavier products (requiring special packaging) that are sent through different carriers and whose shipping rates vary based on weight. Or products with different shipping rates based on categories.

This calculation type is similar to the «Per item line» method, with the difference being that instead of calculating for each product line in the cart, it's done for each group of shipping classes.

Let's assume we have a wine shop. A customer places an order consisting of 3 bottles from different brands (3 products) and has added 2 units of two of the brands and 3 units of another (for a total of 7 bottles) to the cart. Each bottle weighs 1.5 Kg, a detail we have entered in the corresponding configuration tab of the products (under the product data, in «Shipping» and the «Weight» section). Regarding shipping classes, one of the brands is shipped with standard packaging, while the others are shipped with special packaging, so we have previously configured these classes and assigned them to the products (remember to review the documentation on shipping classes).

Below, I show you the order summary with the price and the number of bottles of each type, as well as the shipping class to which each product belongs.

ProductItemsWeight per unit (Kg)Shipping class
Marqués de Vargas Reserva (Rioja)21,5Standard packaging
Resalte Reserva 2009 (Ribera del Duero)21,5Special packaging
Sandeman Ruby (Oporto)31,5Special packaging

In this example, there are 2 shipping classes, so there are 2 groups:

  1. The one formed by the first product, which belongs to a shipping class we've named "Standard Packaging."
  2. The one formed by the following 2 products, which belong to the shipping class "Special Packaging."

     

    On the other hand, let's see how we have configured the shipping rules that we are going to base on the «weight» condition, specifying the shipping classes with their corresponding ranges:
Shipping classConditionRange [min] and [max]CostCost per additional unit
Standard packagingWeight024(Left empty)
Standard packaging
Weight236(Left empty)
Standard packaging
Weight3510(Left empty)
Special packagingWeight028(Left empty)
Special packaging
Weight2312(Left empty)
Special packaging
Weight3520(Left empty)
Special packaging
Weight51035(Left empty)

Now, let's see how the final shipping cost in the cart would look using the calculation based on shipping classes.

FIRST GROUP OF PRODUCTS (Standard Packaging). The total weight of all units in the first group of products in the cart is 3kg → Shipping cost for the first group of products in the cart = 6€

SECOND GROUP OF PRODUCTS (Special Packaging). The total weight of all units in the second group of products in the cart is 7.5kg → Shipping cost for the second group of products in the cart = 35€

The result of the final shipping cost would be:

WITHOUT APPLYING SHIPPING CLASS PRIORITY

SHIPPING RATE → 41€ (6€ + 35€) 

However, we can also ensure that the two shipping rates do not add up. It's possible that we want to display only one price to avoid penalizing the customer. To achieve this, we would apply «shipping class priority».

APPLYING CLASS PRIORITY

Higher priority for Special Packaging

SHIPPING RATE → 35€

Higher priority for Standard Packaging

SHIPPING RATE → 6€ 

To know exactly how to apply priority to shipping classes, I'll explain it here.

EN