VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Shipping By Rules for WooCommerce
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