Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping by Rules for VirtueMart

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!

×

Notice

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

TOPIC:

Calc by weight - 3 product groups 12 Jun 2014 20:33 #1

  • homepatchwork@huedig.com
  • homepatchwork@huedig.com's Avatar Topic Author
Hi, I have been trying numerous combinations but I am not getting it to work. Please help!

I have three product categories and associated (ficticious) weights:

1) Courses with an assigned weight of 2kg - no shipment cost
2) Paper instructions with an associated weight of 20kg - shipment cost (net) 1.68
3) Hardware with an associated weight of 110kg - shipment cost (net) 2.94

I have tried the following syntax:
Weight <=10; 0.00
Weight <=100; 1.68
Weight <=1000; 2.94

I have also tried the following syntax:
Weight >=1; 0.00
Weight >=10; 1.68
Weight >=100; 2.94

And more combinations.

When products of two or all categories are selected, then I would like to have the highest shipment cost to apply.

However, there seems to be an hierarchy that is unknown to me. Sometimes the first product works as desired, but then when removing it, it does not calculate the proper amount of the other products. Especially the 0.00 cost seems to cause issues, as with only the other two it works just fine.

Thanks in advance for any help!

Dan

Calc by weight - 3 product groups 14 Jul 2014 22:57 #2

To understand how the plugin works, you have to know that it simply goes through the rules one after the other, until all conditions of a rule matches. The plugin then uses that rule to calculate the shipping costs.

The other think you have to understand is that Weight is the SUM of all articles in the cart.

One thing I'm not sure about your shipping cost structure is whether the 1.68 of the paper instructions and the 2.94 for hardware are supposed to be an overall shipping cost for the whole order or 1.68 / 2.94 for each article the customer has ordered...

If it is an overall shipping cost for the whole order, then the solution is rather simple. In particular, you only want to find out if some hardware is in the order and assign a shipping cost of 2.94 to that order. The proper check to find out whether some hardware (with out fictitous weight of 110kg) is in the order is to use the MaxWeight variable:
Name=Some hardware is included; MaxWeight>=110; Shipping=2.94
Name=No hardware, but paper instructions; MaxWeight>=20; Shipping=1.68
Name=Only courses are ordered; MaxWeight==2; Shipping=2.94

Also, you'll have to make sure that you set the proper weight units (kg) in teh plugin, because otherwise the Weight and MaxWeight variables will not be in the proper dimension.

If the 1.68 / 2.94 are shipping cost per article ordered, then it really becomes tricky and in most cases the plugin is NOT able to calculate proper shipping costs (because you don't have access to the number of hardware articles and the number of paper instructions the user has ordered...)

Best regards,
Reinhold
  • Page:
  • 1