Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping by Rules for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

shipping with state and weight 18 Jan 2015 09:10 #1

  • raz
  • raz's Avatar Topic Author
Hi
I'de like to have this rule:
for example:

for 0<weight<1kg and state are =a,b,c,d the price is 10$
for 0<weight<1kg and state are =z,e,h,f the price is 15$


for greater than 1kg for every 1 kg that added to weight, 2$ is added to price of,

Is it possible to do it with this plugin?
What rule can do it?

shipping with state and weight 22 Jan 2015 06:53 #2

  • raz
  • raz's Avatar Topic Author
any idea?
Isn't possible?

shipping with state and weight 29 Jan 2015 23:35 #3

If you are using the advanced version of the plugin, the rules are something like the following:
state2 in list("aa", "bb", "cc", "dd"); Shipping=10+floor(Weight)*2
state2 in list("zz", "ee", "hh", "ff"); Shipping=15+floor(Weight)*2

Please note that floor(Weight) will return 0 for weights below 1kg, return 1 for weights from 1kg to below 2kg, 2 for weights 2kg and above, etc. In particular, if you have exactly 1kg, the shipping cost is 12 (in your message you explicitly said weight<1kg for the 10kg, i.e. only strictly smaller than 1kg).

If you want orders of 1kg to have 10$ shipping costs (i.e. for 0<weight<=1kg), then I would suggest a rule like the following:
state2 in list("aa", "bb", "cc", "dd"); Shipping=8+ceil(Weight)*2
state2 in list("zz", "ee", "hh", "ff"); Shipping=13+ceil(Weight)*2

Alternatively (because these rules are easier to understand):
0<weight<=1; state2 in list("aa", "bb", "cc", "dd"); Shipping=10
1<weight; state2 in list("aa", "bb", "cc", "dd"); Shipping=10+ceil(Weight-1)*2
0<weight<=1; state2 in list("zz", "ee", "hh", "ff"); Shipping=15
1<weight; state2 in list("zz", "ee", "hh", "ff"); Shipping=15+ceil(Weight-1)*2

Best regards,
Reinhold
  • Page:
  • 1