Menu

Shipping by Rules for VirtueMart

March 18th, 2013

Shipping by Rules for VirtueMartVirtuemart 2 plugin to determine shipping costs according to general rules. The conditions are given as equalities and inequalities (<, <=, !=, ==, >=, >) of the order properties (weight, number of articles, postal code, order amount, etc.).

Very complex shipping cost structures can be easily implemented using the following order properties:

-) Total amount of the order (with or without taxes)
-) Total weight of the order
-) Number of articles or different products in the order
-) Volume or minimal and maximal extensions of the products
-) Postal code of the delivery address

Each rule is described as a simple line of text with an easy structure (semicolons separate the parts of the rule). Some simple examples are

Name=Free Shipping; 100<=Amount; 0
Name=Domestic Small; Articles<5; Amount<100; Shipping=1.50
Name=Domestic Standard; Amount<100; Shipping=3.50

This set of rules describes three shipping costs: Orders of 100€ and more are free, otherwise orders with less than five articles have shipping costs of 1.5€, all others 3.50€.

This version of the plugin allows only a fixed expression for the Shipping cost, but no arithmetic expressions (like 5€ per kg or 1€ per product).

The shipping cost can be given either with or without taxes included.