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


Question and help 04 Oct 2017 16:52 #1

  • bobo_italy
  • bobo_italy's Avatar Topic Author
Hi, I'm currently using the free version of the plugin, but I'm willing to pay for the advanced version if what I describe here is possible to accomplish.
I have a store which sells bottles of wine and my shipping suppliers provides prices based on the number of bottles I send. This is easily done with Shipping by Rules. Now, Magnum bottles (1,5 litres) are considered as they were 3 standard bottles (0,75 litres). I already have a different shipping class applied to each Magnum, but I don't know how to achieve the correct calculation, given I have a mix of standard and Magnum bottles that the user can buy in the same order with different quantities.

Also, I want to give a discount on shipping based on the amount of the transaction (10% of the amount). Is this rule going to work?
Name=1; Articles<=1; Shipping=50-floor(Amount*0.1, 0.01)
I cannot test this obviously :)


Question and help 08 Oct 2017 22:19 #2

Dear Bobo_Italy,
First, regarding the magnum bottles, which should count as 3 normal bottles: You'll really need the advanced version for this. If all magnum bottles already have a different shipping class assigned, you can calculate the number of "shipping bottles" (where each magnum counts as three) and store it in a custom variable:
Variable=ShippingBottles; Value=Articles + evaluate_for_shippingclasses(Articles, "Magnum")*2
Please note that I add only twice the number of magnum bottles to the article count, because the article count already includes the magnum bottles once.

You can then use ShippingBottles instead of Articles in all your rules.

Regarding your discount on shipping: What are the conditions for this discount?
I think you can even use the free version, if you make use of the ExtraShippingCharge feature (open-tools.net/documentation/advanced-sh...merce.html#variables). However, this might lead to negative shipping costs, if the amount is too large. Your approach solves this issue (but needs the advanced/paid version), but your formula is not entirely correct:
Name=1; Articles<=1; Shipping=ceil(0.01, 50-Amount*0.1)

Best regards,
  • Page:
  • 1