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!
Welcome,
Guest
|
|
Hi,
Well, we have the following code but it seems that already the first noshipping (tested with noshipping1 ...5) option is somewhat incomplete/buggy.
old (not compatible)
[ Click to expand ]
[ Click to hide ]
Comment="Name=<pre>All variables: {Values_Debug}</pre>; NoShipping"
Name=Please use correct ZIP; 0>ZIP; NoShipping
Name=Please use correct ZIP; ZIP>9999; NoShipping
Name=Free Shipping; 0>=Weight<=0; 0<ZIP<=9999; Shipping=0
Name=Shipping up to 2kg; MaxLength<100; MaxWidth<60; MaxHeight<60; Weight<=2; Articles<10; 0<ZIP<=9999; Shipping=4.80
Comment="Name=Shipping up to 2kg; (MaxLength+2)<100; (MaxWidth+2)<60; (MaxHeight+(Articles*2))<60; Weight<=2; 0<ZIP<=9999; Shipping=4.80"
Name=Shipping yet not defined; MaxLength<100; MaxWidth<60; MaxHeight<60; Weight<=20; 0<ZIP<=9999; Error="yet not defined"; NoShipping
Name=Shipping above 20kg/Maxlength; MaxLength>100; MaxWidth>60; MaxHeight>60; Weight>20;0<ZIP<=9999; NoShipping
Name=Shipping not possible; NoShipping
New (probably to be used if we ge advanced)
[ Click to expand ]
[ Click to hide ]
Variable=CalcTotHeight; Value = ceil((TotalHeight+(Articles*2))/60)
Variable=CalcTotHeight31p; Value = max((Weight/31.5),ceil((TotalHeight+(Articles*2))/60))
1005>ZIP OR ZIP>9992; Error=Please use correct ZIP; NoShipping
Weight<0; Error="Some error occured. Please remove shop items and try again. If the error continues, feel free to contact us."; NoShipping
Name=Free Shipping; Weight==0; Shipping=0
Name=Shipping not available; Error="Please contact us for a custom solution!"; (MaxLength+2)>100 OR (MaxWidth+2)>60 OR (MaxHeight+2)>60 OR MinWeight>20; NoShipping
Name=Shipping up to 2kg; Weight<=2; Shipping=(4.60*CalcTotHeight)
Name=Shipping up to 4kg; Weight<=4; Shipping=(4.60*CalcTotHeight)
...
Name=Shipping above 31,5kg; Weight>31.5; Shipping=(4.60*CalcTotHeight31p) So, i've got a product that is 60Lx40Wx0.2H 0.7kg f.e. - adding just that alone with valid zip i still get 0,- "Free Shipping" while it should be "4.80" and it displays " Evaluation yields unknown value while evaluating rule part 'noshipping1"'. " (noshipping1 = when setting "Comment="Name=<pre>All variables: {Values_Debug}</pre>; NoShipping1" and so on ... ".... 9999; NoShipping2", etc..) We are aware that we will need the advanced shipping, yet would like to test the normal options and see if we're able to reach the aimed task. |
|
It seems rules in comments are still used (that shouldn't be - ignore everything in comments!), Deleting them:
Warning: Spoiler!
[ Click to expand ]
[ Click to hide ]
1005>ZIP; Error="Please use correct ZIP"; NoShipping
ZIP>9992; Error="Please use correct ZIP"; NoShipping
Weight<0; Error="Some error occured. Please remove shop items and try again. If the error continues, feel free to contact us."; NoShipping
Name=Free Shipping; Weight==0; Shipping=0
Name=Shipping up to 2kg; MaxLength<=100; MaxWidth<=60; MaxHeight<=60; Weight<=2; Articles<10; Shipping=4.60
Name=Shipping yet not defined; MaxLength<=100; MaxWidth<=60; MaxHeight<=60; Weight<=20; NoShipping
Name=Shipping above 20kg/Max size; MaxLength>100; MaxWidth>60; MaxHeight>60; Weight>20; NoShipping
Name=Shipping not available; Error="Please contact us for a custom solution!"; NoShipping actually just the line alone Name="Shipping up to 2kg"; MaxLength<100; MaxWidth<60; MaxHeight<60; Weight<=2; Articles<10; Shipping=4.60 I get: "Country (Free Shipping): 4.60€" (with an item in between L/W/H/W and ZIP). So - the calculation is right but the text is wrong! (and it doesn't take the free shipping from the rule above (see spoiler) cause: 1.) it happens with that rule alone. 2.) also if i translate it to diff. language) Further: (just info to above post: It seems i misunderstood error/noshipping - so no error desc. needed if noshipping is set.) Playing a bit with the cart, i sometimes see entries doubled like "Shipping yet not defined" 2x at red bar Question: is it wise to still use shipping classes? like what to do with local pickup? It should be an additional class, except some conditions (like the invalid ZIP). |
|
Dear Jöswe,
1) The result is weird, as the plugin checks all rules and then only accesses the rule that matches. So the name of a previous rule is not stored when traversing the rules... Do you happen to have a test/development site available somewhere? 2) The double entries for warnings from the same method should not happen when you use VirtueMart's default checkout system. Some OPC plugins might have issues if they don't replace warnings from previous updates. Also, if you setup two shipping methods, each of them can print out such a warning independently, and the plugin won't be able to prevent this (as in VM each shipping methods is completely separate from each other). 3) Regarding shipping classes, it's perfectly fine to use categories or shipping classes to distinguish products for shipping purposes. Best regards, Reinhold |
|
Thank you for your answer.
1.) Yes, how can i safely let you know about it? 2.) Ah, we use WP/WooCommerce. I at least can reproduce it if i change the ZIP (happened also on other cases but not clear how it got there). And it would only go away if I enter another page or re-enter checkout etc. 3.) ok, thx |