Many carriers have a maximum length that they can ship. For example, UPS non-freight can ship up to 108 inches in length. Live rate carriers automatically restrict shipping methods when the maximum supported dimensions are exceeded so this article details how to achieve this with custom rate carriers.
We have three custom rates that we want to configure:
Standard Delivery with a maximum length of 108 inches. When items are over 108in, hide Standard Delivery.
Next Day with a maximum length of 50 inches. When item are over 50in, hide Next Day.
Freight, which has no maximums.
For this we will use a table rates carrier with each of the shipping methods defined in a single carrier.
The example above uses two Shipping Groups:
OVER108 will need to be assigned products that are over 108 inches in length.
OVER50 will need to be assigned to products that are over 50 inches in length but not over 108 inches.
With only the above table rates carrier, all of the shipping methods would be displayed if there is a product in the cart assigned to either the OVER108 or OVER50 shipping group. The reason for this is detailed in the Working with Multiple Shipping Groups article.
To ensure that only the respective shipping methods are displayed, shipping rules will need to be used. Shipping Rules can hide shipping methods in the cart we don’t want to show when shipping groups are present.
Hide Standard Delivery
- Name: Hide Standard Delivery
- Shipping Methods: Choose +Add Methods under the Custom Shipping Rate selection and select Standard.
- Actions: Action to Perform: Hide my selected Shipping Methods
- Conditions: Shipping Group(s) Include One or More: OVER108
Hide Next Day Delivery
- Name: Hide Next Day Delivery
- Shipping Methods: Choose +Add Methods under the Custom Shipping Rate selection and select Next Day.
- Conditions: Shipping Group(s) Include One or More: OVER108,OVER50
As a result, you’ll see the following options:
|If the cart contains products assigned to these shipping groups||Display these methods|
|Not assigned to either OVER50 or OVER108||Standard and Next Day|
|OVER50||Standard and Freight|
|Unassigned products and OVER50||Standard and Freight|
|Unassigned, OVER50 and OVER108||Freight|
|OVER50 and OVER108||Freight|
The shipping rates will depend on the totalling algorithm on the table rates carrier.
You can use this approach in conjunction with dimensional packing options.