Shipping By Rules for WooCommerce
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Question and help

Question and help 04 Oct 2017 16:52 #1

  • bobo_italy
  • bobo_italy's Avatar Topic Author
  • Offline
  • Posts: 1
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 :)


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

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 ( ). 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,

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

  • Page:
  • 1

VM - Shopping cart


Cart empty

Login Formular