Creating a new shipping method


Jump to: navigation, search

Shipping methods specify the rules that you might want to apply when selling items. For example your shipping costs model might be that any orders outside UK will pay a flat fee of £50, UK orders for £50 or less will pay a flat fee of £5 and UK orders for more than £50 will pay 10% of subtotal.

The cost calculation is written in velocity as follows:

#if ( $order.getShippingAddress() && !($order.getShippingAddress().getCountry() == "UK") )
#elseif ( $comp.lessThan($order.getSubtotal(), "50"))
    $vyre.returnValue($math.mul($order.getSubtotal(), "0.10"))
Personal tools