1. SURCHARGE_ORDER Algorithm
To surcharge an existing rate by a fixed amount the SURCHARGE_ORDER algorithm will be used.
This example CSV will surcharge any methods named “Ground” by 5 when they are assigned the SURCHARGE shipping group or discount by 5 when they are assigned the DISCOUNT shipping group.
2. OVERRIDE Algorithm
You can use the OVERRIDE algorithm to override all other rates for all other products in the cart. For example let’s say you have a set of products which you want to offer FREE shipping on when the cart value is > $200. In addition to this you sell plants, and for these you want to add a $5 surcharge per order when these are in cart. You want to offer FREE shipping on the whole cart when the FREE products are in the cart, otherwise apply the surcharge with normal rates.
To do this you would set the following criteria on row 1:
- Shipping Group = FREE_OVERRIDE
- Price From = 200
- Delivery Type = Ground
- Algorithm = OVERRIDE
On row 2 setup the plants:
- Shipping Group = PLANTS
- Delivery Type = Ground
- Algorithm = SURCHARGE_ORDER
The example CSV file can be downloaded in the link below:
override-algorithm CSV
3. SURCHARGE_PECENTAGE_CART Algorithm
4. ADD_ITEM Algorithm
Assume you have two conditions and want to add this to the algorithm
- You want to charge a flat rate on certain products per order
- An additional per item price on these products
So for example 1*item = $10, additional item price $3.95. 2*items would be $13.95 and 3*items would be $17.90.
The above conditions can be achieved using the excel file below.
5. ORDER Algorithm
With this example CSV the items assigned to the FLAT group will receive a flat rate of 10 for the “Ground” method. Items assigned to the FREE group will receive a rate of 0 for the “Ground” method.
Note that the ORDER algorithm sets the rate for the group. Thus, if there is a FLAT and a FREE product in the cart together the shipping rate for “Ground” will be 10 (10 for FLAT, 0 for FREE).
6. ORDER_RES and ORDER_COM Algorithms
Let’s say you want to charge different table-based rates for shipments for a specific shipping method based on their address type. You can do this by using the ORDER_RES and/or ORDER_COM algorithms.
7. ERROR Algorithm
The error= algorithm allows for custom error messages to show when no rates are available from a specific carrier within your store.
In the CSV file below it shows that when shipping to the states of Alaska and Hawaii that the shipping method of UPS Ground cannot be shown.
So when shipping to these states the error message that is entered into the error= algorithm and column will be displayed.
This screenshot shows the rates when shipping to the state of California (CA)
The screenshot below shows the error message when shipping to the state of Hawaii (HI)
Please ensure you have the error messaging switched on for the Shipping Override extension as shown below:
8. ORDER_FREE Algorithm
This algorithm applies when a order is granted free shipping through a Magento promotional rule. You could use this to set multiple methods as free shipping (Magento only lets you choose one free method) or hide other shipping methods when free shipping is applied.
In this example, we’re going to hide two shipping methods called Overnight and 2 Day and ensure the method Standard is free. You’ll also notice that we’re using pattern matching in this example which is discussed here: Pattern Matching (See Advanced)