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!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Help with sub categories

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

How do you create a rule that applies to a category and all sub categories? Do you have an example?

Please Log in or Create an account to join the conversation.

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

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

VM - Shopping cart

 x 

Cart empty

Login Formular