Based on Quantity¶
With this rule you can calculate one of your service costs depending on the total quantity for products.
Constants¶
- [CADDY – SYMBOLS AND SERVICE ATTRIBUTES]
With the setting above you can configure the symbol or abbreviation which is displayed as suffix of the quantity figure.
Setup¶
plugin.tx_caddy_pi1 {
api {
options {
shipping {
options {
1 {
title {
data >
value = Shipping by GLS
noTrimWrap >
}
extra = by_quantity
extra {
1 {
value = 1
extra = 5.00
}
2 {
value = 6
extra = 7.40
}
}
// method only available if gross price is less than 200.00
available_until = 200.00
}
}
}
}
}
}
In the example above we configure a special shipping rule based on the quantity. There is one shipping method called “Standard”, the normal tax will be applied.
- If the total quantity of all products is lower than 4 the shipping costs will be 5.35.
- If the total quantity of all products is lower than 11 the shipping costs will be 7.10.
- If the total quantity of all products is lower than 21 the shipping costs will be 9.70.
- If the total quantity of all products is equal to or higher than 21 the shipping costs will be 11.60.