|
Welcome,
Guest
|
TOPIC:
Setting condition to Not In List 15 Aug 2014 00:57 #1
|
VM Ordernumber Plugin
VM Downloads for Sale Plugin
VM Shipping by Rules Plugins
VM Add Buyers to Joomla Groups
Advanced Order Numbers for Magento
Basic / Advanced Order Numbers for WooCommerce
Shipping By Rules for WooCommerce
Tutorial: Automatic updates for Commercial VM and WP plugins
Tutorial: Extending VM with custom views
Tutorial: Upgrading a VM2 plugin to VM3
Advanced Ordernumbers for VirtueMart
Downloads for Sale for VirtueMart
Shipping by Rules for VirtueMart
EU Sales Reports for VirtueMart
Subscribe Buyers to AcyMailing for VirtueMart
Add Buyers to Joomla Groups for VirtueMart
VM Customers to Joomla Groups Admin Panel
Auto Parent Categories for VirtueMart
Name The Price for VirtueMart
Ordernumbers for Magento
Ordernumbers for WooCommerce
Shipping By Rules for WooCommerce
CB Usergroups Field Plugin 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
Trying to give Free Shipping to orders over £50 but only if the UK state2 isn't in a certain list. This works... 50<=Amount; state2 <> "AG"; state2 <> "BT" ; state2 <> "OR"; state2 <> "SL" ;state2 <> "AT" ;state2 <> "AM" ;state2 <> "DW" ;state2 <> "FE" ;state2 <> "LY" ;state2 <> "TY" ;Shipping=0 But this doesn't.. 50<=Amount; not (state2 in list("AG", "BT", "OR", "SL", "AT", "AM", "DW", "FE", "LY", "TY")); Shipping=0 The opposite rule works fine (for adding a cost if they ARE in the list) i.e. 50<=Amount; state2 in list ("AG", "BT", "OR", "SL", "AT", "AM", "DW", "FE", "LY", "TY"); Shipping=13.95 Is there a way or writing a NOT IN LIST rule? Thanks PS Love the extension by the way - one of the best I've seen and it's completely changed the way our shop can do shipping - thanks a million. |
|
Hi,
You may try to place "Condition=" before the not(...) function call, because otherwise the plugin might not understand that rule part as a condition. This is actually a small bug in the plugin: It is not always able to properly detect what part is a condition and what is the shipping costs. Currently, the (very simple) logic is that every rule part with a comparison operator ('<', '<=', '=<', '<>', '!=', '==', '>', '>=', '=>', '~', 'OR', 'AND', '&&', 'IN') is a condition, everything else is the shipping cost. In the early days of the plugin, this was true, but with the advent of functions, this no longer neccessarily holds. To indicate a condition, you can always add "Condition=" (without the quotes) before the condition to make sure the plugin correctly understands that rule part as a condition. Best regards, Reinhold PS: It is actually not trivial to come up with proper conditions when an experession is a condition and when it describes the shipping costs. I have not yet found the proper logic, so for now I'm sticking with the very limited (but predictable) way described above. |
|
Actually, I just checked the code, and your not(state2 in list(...)) is properly detected as a condition (because it contains the "in" operator).
I have also tried your rules in a test installation, and everything appear to work fine... What exactly are your problems? |