Quantity ranges allow you to setup different shipping costs based on the number of items a customer is purchasing. Depending on the selection for Base Table Rules, the quantity value could be for the entire order, a single item, or a group of items specified by shipping class.
In this scenario, the seller wants to adjust the shipping cost based on the total number of items in the cart. There is a small variety of ranges, but an order with 9 items or more ships free. Each row contains a range of quantities ordered from lowest to highest to accommodate this free shipping rule. When calculating shipping, the plugin will start at the top and check each row one at a time. The last qualifying row is the one whose Cost values are used as the actual shipping cost.
To better understand the owner’s requirements, let’s view a table of their quantity ranges.
|Weight Range (lbs)||Cost|
|1 – 2||$11.99|
|3 – 4||$9.99|
|6 – 8||$6.49|
The above table would then be setup like so in the Table Rate settings page:
As illustrated above, this option has 5 quantity ranges, and thus 5 possible flat rates for orders with one or more shippable items. When calculating shipping, the total number of qualifying items is compared to each condition with the last row being of highest priority. As an example, a sample order of 6 items would go through the list like so:
- Is quantity greater than or equal to 1 item? YES
- Is quantity greater than or equal to 3 items? YES
- Is quantity equal to 5 items? NO
- Is quantity greater than or equal to 6 items? YES
- Is quantity greater than or equal to 9 items? NO
The last qualify row is #4, “Quantity greater than or equal to 6 items”, so the returned shipping cost would be $6.49.