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:

Issue with exact weight 01 Oct 2013 21:22 #1

  • manuxx
  • manuxx's Avatar Topic Author
Hi Reinhold

We have a problem with our rules:

When a customer orders a product which weights exactly 6 kg this rule gets applied: Name=Spain, Weight>102; 01000<=ZIP<07000; Shipping=38.46+(Weight-101)*0.4

Instead Name=Península, max 6kg; 01000<=ZIP<07000; Weight<6; Shipping=4.81

we have tried changing it to:

Name=Península, max 6kg; 01000<=ZIP<07000; 1<=Weight<6; Shipping=4.81


Our complete rules:

Name=Península, max 6kg; 01000<=ZIP<07000; Weight<6; Shipping=4.81
Name=Península, max 11kg; 01000<=ZIP<07000; 7<=Weight<11; Shipping=5.77
Name=Península, max 16kg; 01000<=ZIP<07000; 12<=Weight<16; Shipping=6.73
Name=Península, max 21kg; 01000<=ZIP<07000; 17<=Weight<21; Shipping=7.69
Name=Península, max 26kg; 01000<=ZIP<07000; 22<=Weight<26; Shipping=9.62
Name=Península, max 31kg; 01000<=ZIP<07000; 27<=Weight<31; Shipping=11.54
Name=Península, max 36kg; 01000<=ZIP<07000; 32<=Weight<36; Shipping=13.46
Name=Península, max 41kg; 01000<=ZIP<07000; 37<=Weight<41; Shipping=15.38
Name=Península, max 46kg; 01000<=ZIP<07000; 42<=Weight<46; Shipping=17.31
Name=Península, max 51kg; 01000<=ZIP<07000; 47<=Weight<51; Shipping=19.23
Name=Península, max 61kg; 01000<=ZIP<07000; 52<=Weight<61; Shipping=23.08
Name=Península, max 71kg; 01000<=ZIP<07000; 62<=Weight<71; Shipping=26.92
Name=Península, max 81kg; 01000<=ZIP<07000; 72<=Weight<81; Shipping=30.77
Name=Península, max 91kg; 01000<=ZIP<07000; 82<=Weight<91; Shipping=34.62
Name=Península, max 100kg; 01000<=ZIP<07000; 92<=Weight<101; Shipping=38.46
Name=Spain, Weight>102; 01000<=ZIP<07000; Shipping=38.46+(Weight-101)*0.4
Name=Baleares, max 6kg; 07000<=ZIP<08000; Weight<6; Shipping=10.58
Name=Baleares, max 11kg; 07000<=ZIP<08000; 7<=Weight<11; Shipping=10.58
Name=Baleares, max 16kg; 07000<=ZIP<08000; 12<=Weight<16; Shipping=13.46
Name=Baleares, max 21kg; 07000<=ZIP<08000; 17<=Weight<21; Shipping=15.38
Name=Baleares, max 26kg; 07000<=ZIP<08000; 22<=Weight<26; Shipping=17.31
Name=Baleares, max 31kg; 07000<=ZIP<08000; 27<=Weight<31; Shipping=17.31
Name=Baleares, max 36kg; 07000<=ZIP<08000; 32<=Weight<36; Shipping=19.23
Name=Baleares, max 41kg; 07000<=ZIP<08000; 37<=Weight<41; Shipping=24.04
Name=Baleares, max 46kg; 07000<=ZIP<08000; 42<=Weight<46; Shipping=26.92
Name=Baleares, max 51kg; 07000<=ZIP<08000; 47<=Weight<51; Shipping=28.85
Name=Baleares, max 61kg; 07000<=ZIP<08000; 52<=Weight<61; Shipping=30.77
Name=Baleares, max 71kg; 07000<=ZIP<08000; 62<=Weight<71; Shipping=38.46
Name=Baleares, max 81kg; 07000<=ZIP<08000; 72<=Weight<81; Shipping=43.27
Name=Baleares, max 91kg; 07000<=ZIP<08000; 82<=Weight<91; Shipping=48.08
Name=Baleares, max 100kg; 07000<=ZIP<08000; 92<=Weight<101; Shipping=52.88
Name=Spain, Weight>102; 07000<=ZIP<08000; Shipping=38.46+(Weight-101)*0.4
Name=Península, max 6kg; 08000<=ZIP<35000; Weight<6; Shipping=4.81
Name=Península, max 11kg; 08000<=ZIP<35000; 7<=Weight<11; Shipping=5.77
Name=Península, max 16kg; 08000<=ZIP<35000; 12<=Weight<16; Shipping=6.73
Name=Península, max 21kg; 08000<=ZIP<35000; 17<=Weight<21; Shipping=7.69
Name=Península, max 26kg; 08000<=ZIP<35000; 22<=Weight<26; Shipping=9.62
Name=Península, max 31kg; 08000<=ZIP<35000; 27<=Weight<31; Shipping=11.54
Name=Península, max 36kg; 08000<=ZIP<35000; 32<=Weight<36; Shipping=13.46
Name=Península, max 41kg; 08000<=ZIP<35000; 37<=Weight<41; Shipping=15.38
Name=Península, max 46kg; 08000<=ZIP<35000; 42<=Weight<46; Shipping=17.31
Name=Península, max 51kg; 08000<=ZIP<35000; 47<=Weight<51; Shipping=19.23
Name=Península, max 61kg; 08000<=ZIP<35000; 52<=Weight<61; Shipping=23.08
Name=Península, max 71kg; 08000<=ZIP<35000; 62<=Weight<71; Shipping=26.92
Name=Península, max 81kg; 08000<=ZIP<35000; 72<=Weight<81; Shipping=30.77
Name=Península, max 91kg; 08000<=ZIP<35000; 82<=Weight<91; Shipping=34.62
Name=Península, max 100kg; 08000<=ZIP<35000; 92<=Weight<101; Shipping=38.46
Name=Spain, Weight>102; 08000<=ZIP<35000; Shipping=38.46+(Weight-101)*0.4
Name=Península, max 6kg; 36000<=ZIP<38000; Weight<6; Shipping=4.81
Name=Península, max 11kg; 36000<=ZIP<38000; 7<=Weight<11; Shipping=5.77
Name=Península, max 16kg; 36000<=ZIP<38000; 12<=Weight<16; Shipping=6.73
Name=Península, max 21kg; 36000<=ZIP<38000; 17<=Weight<21; Shipping=7.69
Name=Península, max 26kg; 36000<=ZIP<38000; 22<=Weight<26; Shipping=9.62
Name=Península, max 31kg; 36000<=ZIP<38000; 27<=Weight<31; Shipping=11.54
Name=Península, max 36kg; 36000<=ZIP<38000; 32<=Weight<36; Shipping=13.46
Name=Península, max 41kg; 36000<=ZIP<38000; 37<=Weight<41; Shipping=15.38
Name=Península, max 46kg; 36000<=ZIP<38000; 42<=Weight<46; Shipping=17.31
Name=Península, max 51kg; 36000<=ZIP<38000; 47<=Weight<51; Shipping=19.23
Name=Península, max 61kg; 36000<=ZIP<38000; 52<=Weight<61; Shipping=23.08
Name=Península, max 71kg; 36000<=ZIP<38000; 62<=Weight<71; Shipping=26.92
Name=Península, max 81kg; 36000<=ZIP<38000; 72<=Weight<81; Shipping=30.77
Name=Península, max 91kg; 36000<=ZIP<38000; 82<=Weight<91; Shipping=34.62
Name=Península, max 100kg; 36000<=ZIP<38000; 92<=Weight<101; Shipping=38.46
Name=Spain, Weight>102; 36000<=ZIP<38000; Shipping=38.46+(Weight-101)*0.4
Name=Península, max 6kg; 39000<=ZIP<60000; Weight<6; Shipping=4.81
Name=Península, max 11kg; 39000<=ZIP<60000; 7<=Weight<11; Shipping=5.77
Name=Península, max 16kg; 39000<=ZIP<60000; 12<=Weight<16; Shipping=6.73
Name=Península, max 21kg; 39000<=ZIP<60000; 17<=Weight<21; Shipping=7.69
Name=Península, max 26kg; 39000<=ZIP<60000; 22<=Weight<26; Shipping=9.62
Name=Península, max 31kg; 39000<=ZIP<60000; 27<=Weight<31; Shipping=11.54
Name=Península, max 36kg; 39000<=ZIP<60000; 32<=Weight<36; Shipping=13.46
Name=Península, max 41kg; 39000<=ZIP<60000; 37<=Weight<41; Shipping=15.38
Name=Península, max 46kg; 39000<=ZIP<60000; 42<=Weight<46; Shipping=17.31
Name=Península, max 51kg; 39000<=ZIP<60000; 47<=Weight<51; Shipping=19.23
Name=Península, max 61kg; 39000<=ZIP<60000; 52<=Weight<61; Shipping=23.08
Name=Península, max 71kg; 39000<=ZIP<60000; 62<=Weight<71; Shipping=26.92
Name=Península, max 81kg; 39000<=ZIP<60000; 72<=Weight<81; Shipping=30.77
Name=Península, max 91kg; 39000<=ZIP<60000; 82<=Weight<91; Shipping=34.62
Name=Península, max 100kg; 39000<=ZIP<60000; 92<=Weight<101; Shipping=38.46
Name=Spain, Weight>102; 39000<=ZIP<60000; Shipping=38.46+(Weight-101)*0.4
Name=Península, max 6kg; 53000<=ZIP<99999; Weight<6; Shipping=4.81
Name=Península, max 11kg; 53000<=ZIP<99999; 7<=Weight<11; Shipping=5.77
Name=Península, max 16kg; 53000<=ZIP<99999; 12<=Weight<16; Shipping=6.73
Name=Península, max 21kg; 53000<=ZIP<99999; 17<=Weight<21; Shipping=7.69
Name=Península, max 26kg; 53000<=ZIP<99999; 22<=Weight<26; Shipping=9.62
Name=Península, max 31kg; 53000<=ZIP<99999; 27<=Weight<31; Shipping=11.54
Name=Península, max 36kg; 53000<=ZIP<99999; 32<=Weight<36; Shipping=13.46
Name=Península, max 41kg; 53000<=ZIP<99999; 37<=Weight<41; Shipping=15.38
Name=Península, max 46kg; 53000<=ZIP<99999; 42<=Weight<46; Shipping=17.31
Name=Península, max 51kg; 53000<=ZIP<99999; 47<=Weight<51; Shipping=19.23
Name=Península, max 61kg; 53000<=ZIP<99999; 52<=Weight<61; Shipping=23.08
Name=Península, max 71kg; 53000<=ZIP<99999; 62<=Weight<71; Shipping=26.92
Name=Península, max 81kg; 53000<=ZIP<99999; 72<=Weight<81; Shipping=30.77
Name=Península, max 91kg; 53000<=ZIP<99999; 82<=Weight<91; Shipping=34.62
Name=Península, max 100kg; 53000<=ZIP<99999; 92<=Weight<101; Shipping=38.46
Name=Spain, Weight>102; 53000<=ZIP<99999; Shipping=38.46+(Weight-101)*0.4

The issue happens each time a customer orders something which sums 6 kg.

EDIT: I'm idiot: forgot to use <=

Regards

[SOLVED] Issue with exact weight 01 Oct 2013 21:50 #2

  • manuxx
  • manuxx's Avatar Topic Author
Problem solved.

[SOLVED] Issue with exact weight 02 Oct 2013 14:08 #3

Actually, I think you also want tome slight changes to the lower bound:
Name=Península, max 6kg; 01000<=ZIP<07000; Weight<=6; Shipping=4.81
Name=Península, max 11kg; 01000<=ZIP<07000; 6<Weight<=11; Shipping=5.77

In particular, with your rules, a cart with 6.5kg would not match any rule!
My change is to use 6<Weight as lower bound, so everything larger than 6kg will match.

Best regards,
Reinhold

PS: Alternatively, you can even leave out the lower bounds, because the plugin will start from the first rule and use the first rule that matches all conditions. So if the first rule checks weight<=6, you can safely assume that the weight is larger than 6 if the second rule is ever evaluated.

Issue with exact weight 04 Oct 2013 05:53 #4

  • manuxx
  • manuxx's Avatar Topic Author
Thanks a lot for your suggestions Reinhold

For now we only use products that weight 1.00 or 2.00 or 10.00 so theres no option for 6.5 etc but we will adjust it for the future.

Regards
  • Page:
  • 1