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:

Additional Weight per Fee 10 Dec 2015 11:14 #1

  • Sam Hoi
  • Sam Hoi's Avatar Topic Author
Hi Support,

I have a question for calculation increase each KG / fee
My code: Name=West Malaysia; State2 in list("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "14", "16"); 0.01<=weight<1; Shipping=5

How to add additional 1 KG will be increase 1 dollar.
For example user buy a product for 3kg so shipping fee will be first KG $5, additional 2 KG will be $2, so total shipping fee will be $7.
Can you teach me how.

Thanks,

Sam

Additional Weight per Fee 13 Dec 2015 13:24 #2

Dear Sam,
This can be solved best in the advanced (i.e. paid) version of the plugin:
Name=West Malaysia; State2 in list("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "14", "16"); 0.01<=weight; Shipping=4+1*ceil(weight)
(Explanation: the shipping cost consists of a base price of $4 and $1 for each kg, so the first kg will be 5$, etc. the ceil is needed, because you count only whole kg. If the order has 3.5kg, this should be rounded up to the next full kg, i.e. the order has the same shipping cost as a 4kg order. This is exactly what ceil(..) does.)

In the free version, you can only add one rule for each possible kg, so one rule for 0.01<=weight<1, a second rule for weight<2, another rule for weight<3, another for weight<4, etc.

Bust since you use the list funtion, you apparently already have the paid version, so my example rule from above should work.

Best regards,
Reinhold
  • Page:
  • 1