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!



The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1


Confirming for Categories 09 Jan 2018 17:46 #1

  • Carolyn
  • Carolyn's Avatar Topic Author
I am trying to develop a pricing algorithm for pricing the shipping of our literature. We have both eLiterature where no shipping is applied and printed literature where we want shipping applied. Both eLiterature and Printed Literature are categories within WooCommerce.

Based on another post I developed this string: Name="Shipping $;evaluate_for_categories(Articles, "Printed Literature");Amount<=24.99;shipping=Amount*.30

Would this be correct to total the amounts for everything categorized as "Printed Literature" and price the shipping at 30% of that amount?

Confirming for Categories 28 Jan 2018 19:10 #2

Dear Carolyn,
Your rule is a good start, but not entirely correct. To charge shipping costs of 30% of the order total of the "Printed Literature" category (and ignore all other products), the proper rule would be:
Name="Shipping $$; ;Amount<=24.99;shipping=evaluate_for_categories(Amount, "Printed Literature")*.30
Do you want to apply the condition "up to 25$" to the order total of the printed literature category, too, or shall that condition apply on the total order amount of all products? The rule I gave applies the condition to the overall order total including all products. If you want that condition only for the printed literature, simply replace Amount by evaluate_for_categories(Amount, "Printed Literature")

Quick explanation: You seem to expect evaluate_for_categories to limit all variables in the rule to the given categories, which is NOT what that function does. It is not an indicator how the rest of the rule shall be evaluated, but it evaluates the variable given (in your example rule "Articles") only for the given categories and returns the value.
Best regards,
  • Page:
  • 1