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:

WooCommerce Shipping By Rules free - specific rule 09 Mar 2016 10:45 #1

  • fdsbh
  • fdsbh's Avatar Topic Author
Hello,
I just installed the WooCommerce Shipping By Rules Free plugin and I like it!
Can someone help me with the following rule?
If a product from categorie A with a amount of 4 is in the cart, there must show up a new FREE shipping methode.
If that one is not in the cart, the free shipping methode must not show up.
If there are other products from other categories added to the cart the Free shipping methode must stay.

WooCommerce Shipping By Rules free - specific rule 09 Mar 2016 18:16 #2

Dear Fdsbh,
If I understand you correctly, you want "Free Shipping" to appear in addition (not to replace!) to other methods when the customer buys at least 4$ (or whatever is your currency) from category A. This can be easily done by creating a new method (each method can provide at most one shipping rate!) with one ruleset containing one simple rule:
Name=Free Shipping for Category A; evaluate_for_categories(Amount, "A")>=4; Shipping=0

If no product from Category with slug "A" is ordered, or the amount of products from category "A" is less than 4, then this method will simply not offer any rate (and all other shipping methods will still be offered, of course).
As soon as the amount from category A is at least 4, then this free shipping method will be offered in addition to all other shipping methods.

If you want this free shipping rate to replace other shipping rates (that are also offered by our plugin), then you need to put all rules into the same method and place the free shipping rule first. The plugin will stop as soon as it finds a matching rate. So if the free shipping rule has all its conditions fulfilled, it is offered (and the other rules are not even considered by the plugin). If the free shipping does not apply, the plugin will simply continue to the next rule and evaluate that and so on.

Best regards,
Reinhold
  • Page:
  • 1