32 conditional selection methods on shipping rules
Advanced Shipping Rates for WooCommerce comes with a large range of selection methods, these are:
Product-data based selectors | |
---|---|
Price: |
Price of the product. If there is a sale price, it will be used. Regardless of the "Prices entered with tax" WooCommerce setting (can be tax included or tax excluded), price products will be taken as entered in the edition page. |
Weight: |
If the products haven't weight set, 0 will be taken. |
Volume: |
The taken value will be the multiplication of Width x Height x Length. If size has not been seet, 0 will be taken. |
Volumetric , |
For the volumetric weight based methods, two values will be considered: real weight and volumetric weight, and the highest value will be used. When selecting volumetric weight, a new field appears below the rules table so that you can enter the volumetric weight factor, you should get it from your transport agency. NOTE: Volumetric set will considere all volume products vs all weight products of the group, unlike volumetric, that will compare weight vs volume product per product and SUM the result after that. You can read more about Volumetric weight rates in this post. |
Min dimension, |
Each of them will consider, respectively, the small, middle and large dimension of the products. It does not matter if the sizes have been entered from small to large, or from large to small, in a product of: 10x15x1 or 15x1x10, the max dimension will always be 15, the mid 10, and the min 1. This method always take the products one by one, regardless of the grouping method chosen. If a product have not size set, the value 0 will be taken. |
Length+Width +Height: |
The value taken will be the sum of the dimensions. In a product of: 10x15x1, it will be: 10+15+1 = 26. This method always take the products one by one, regardless of the grouping method chosen. If a product have not size set, the value 0 will be taken. |
Length+Girth: |
The value taken will be the formula result: Length + 2 * Width + 2 * Height of product dimensions. In a product of: 10x15x1, it will be: 10+2x15+2x1 = 42. This method always take the products one by one, regardless of the grouping method chosen. If a product have not size set, the value 0 will be taken. |
Product-kind based selectors | |
---|---|
In Category, |
You can set which products will match the rule, based on his product category. Category will be taken, not his childs. You should include also the childs if you want it matches. |
Tagged as, |
You can set which products will match the rule, based on his product tag/s. |
In shipping class, |
You can set which products will match the rule, based on his shipping class. |
Advanced selectors | |
---|---|
Cart items: |
The number of products in cart will be taken, except if you have used the special action that excludes products from the following rules, or this option within Shipping Boxes: In this case, the quantity will be decreased. Note that the group-by criteria can be confusing here! For example: if you set to non-group then products will be taken one by one, so quantity becomes always 1 for comparison. (see group-by). |
Cart total |
The subtotal price. The difference between using Products Price (with a gruped-all strategy) and this selector, is here we can get the subtotal price after coupons application, there is: the real amount of the cart before shipping rates. |
Number of groups: |
The number of groups, depending on the group-by strategy. For example: if there is 10 products in cart of two distinct shipping classes, if you set the group-by per shipping class the value will be 2. If you set it to no group, the value will be 10, and if you set group-by to all grouped together, the value will be 1. |
User role: |
You can set which user roles will match this rule (also non-logged users). You can read more about Shipping rates by user roles in this post. |
Date & Time selectors | |
---|---|
Day of the week , |
You can select in which days of the week / months of the year the rule will meet. |
Day of the month |
You can set a day/s of the month range where the rule will meet. |
Year: |
You can set a years range where the rule will meet. |
Date: |
You can set a dates range where the rule will meet. |
Day of the year: |
You can set a day range where the rule will meet. Unlike the Date selector, this selector will cover a yearly period. |
Time: |
You can set a time range where the rule will meet. |
Shipping address selectors | |
---|---|
In zone regions , |
You can use it in the same way as WooCommerce shipping zones. Useful to avoid the creation of too many shipping zones. |
In ZIP/Postcodes |
You can use it in the same way as WooCommerce shipping zones does. Useful for establishing rules by proximity. You can use wildcards and ranges in the same way as WC does. You can read more about rates by ZIP/Postcodes in this post. |
Greater than / Greater than or equal to & Less than / Less than or equal to
Most selector methods uses fields of minimum and maximum value.
For all this selectors, you can choose how the MIN and MAX values will be compared, switching to the appropiate symbol on every rule as you need.
In the following table, we are set MIN comparison as GREATER THAN OR EQUAL TO $5, and MAX comparison as LESS THAN OR EQUAL TO $30
$4.99 | $5.00 | $30.00 | $30.01 |
In the second table, we are set MIN comparison as GREATER THAN $30, and MAX comparison as LESS THAN $100, there is: the equal values will not match this rule:
$30.00 | $30.01 | $99.99 | $100.00 |
Note that $30.00 match on rule #1 because the MAX field comparison is LESS THAN OR EQUAL TO, and not match rule #2 because the MIN does the comparison with GREATER THAN.
On the other side, $100 not match rule #2 because the MAX field comparison is LESS THAN.
You can read more about comparison operators in this post.
The volumetric calculations
How it works? Let's say a volumetric weight factor of 3.5 lb/ft3. Our shop example is configured to work with pounds and inches, converted, is: 0.002 pounds per cubic inch, (here you have volumetric weight conversor units for volume/weight):
Product | Weight | Size | Volume | Volumetric weight | Taken value |
---|---|---|---|---|---|
Coat | 3 lbs | 20x20x5 in | 2000 in3 | 2000 * 0.002 = 4 lbs |
4 lbs |
Laptop | 5 lbs | 16x18x5 in | 1440 in3 | 1440 * 0.002 = 2.88 lbs |
5 lbs |
On lightweight products, the taken value will be the calculated volumetric weight. In heavy products, the weight value will be taken. Always the highest value.
And ... now?
We just saw the selection methods. Now, by learning how shipping costs work, we can make a basic use of Advanced Shipping Rates for WooCommerce: