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


Shipping rules by SKU or tag 14 Feb 2017 15:05 #1

  • fcojav.munoz
  • fcojav.munoz's Avatar Topic Author

I bought the advanced plugin and I¨m trying to create some shipping rules. Some of the products I sell are being shipped straight from my supplier. I had them classified in the site by tags. They need to have special shipping fee, different than the rest of the site. The supplier also offer an "insured shipping", that includes special protection for delicated goods.

Name=Express shipping;Condition=contains_any(SKUs,"2582");Shipping=30
Name=Insured shipping;Condition=contains_any(SKUs,"2582");Shipping=50+(amount*0.12)
Name=Regular Shipping;Amount<50;Shipping=12.00
Name=Regular Shipping;50<=Amount;Shipping=15.00

I had created this rule as test (article 2582 is one shipped by the supplier) but it doesnt work. It just give the Regular Shipping price.

Any help, please?

Shipping rules by SKU or tag 18 Feb 2017 23:15 #2

To find out why a certain rule is not applied as expected, it usually helps a lot to display all variables available. See the documentation: open-tools.net/documentation/advanced-sh...merce.html#debugging

In particular, the easiest way to display all variables available (and their values) is to use the newly introduced message functionality. Simply prepend the following rule to your ruleset:
Message="<pre>All variables: {Debug_Variables}</pre>"; Value=0

That should show you whether the SKUs list really contains the SKU you are checking.

The other thing to try is to remove the quotes around the "2582". The reason might be a technical: PHP does not make a clear distinction between strings and numbers, so even though the plugin interprets "2582" as a string, WooCommerce might interpret the SKU "2582" as a number, so that "2582" does not equal 2582. In short: please also try this variant of the ruleset:
Name=Express shipping;Condition=contains_any(SKUs,2582);Shipping=30
Name=Insured shipping;Condition=contains_any(SKUs,2582);Shipping=50+(amount*0.12)
Name=Regular Shipping;Amount<50;Shipping=12.00
Name=Regular Shipping;50<=Amount;Shipping=15.00

Shipping rules by SKU or tag 23 Feb 2017 21:12 #3

  • fcojav.munoz
  • fcojav.munoz's Avatar Topic Author

When I activate the plugin and try to check out I see Bad Gateway message.
My WordPress version is 4.6.3

Any help?

[SOLVED] Shipping rules by SKU or tag 23 Feb 2017 21:12 #4

  • fcojav.munoz
  • fcojav.munoz's Avatar Topic Author
Problem solved.
  • Page:
  • 1