Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping By Rules for WooCommerce

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:

Help with sub categories 20 Oct 2017 15:03 #1

  • castus
  • castus's Avatar Topic Author
How do you create a rule that applies to a category and all sub categories? Do you have an example?

Help with sub categories 21 Oct 2017 13:09 #2

Dear Castus,
What exactly do you mean by "applies to a category and all subcategories"? In our plugin, the rules always apply to the whole cart. But you can evaluate all variables (amount, # of articles, weight, etc.) for a category (either including all subcategories or not), a vendor, a shipping class etc.
The details of the rules always depend on the details of your shipping cost structure, so a little more detail about your shipping costs would help a lot.

In general, let's say you want to apply free shipping if there are at least 5 articles from category "books" and its subcategories. You would use the evaluate_for_subcategories function to get the number of articles from the books category and its subcategories and use that in the comparison:
Name="Free shipping for >5 books"; evaluate_for_subcategories(Articles, "books")>=5; Shipping=0

Best regards,
Reinhold
  • Page:
  • 1