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:

Different cost for a list of ZIP codes 07 Apr 2016 11:25 #1

  • makis_best
  • makis_best's Avatar Topic Author
Hi

I have the the Pro version of the Shipping by Rules Plugin.

I want to charge with 11.63 Euro for the first 2Kg and extra 1 Euro for every Kg over 2Kg the shipment of a list with 600 zip codes
For example I want the zip codes (13672,13679,18010,18020,18030,18040,18050,18900,18903,19001) to cost 11.63 if the Weight is 1Kg.
How I can do it.

Thank you

Different cost for a list of ZIP codes 07 Apr 2016 23:36 #2

Dear Makis_best,
For the ZIP codes you give, the rule would be:
Name="Your shipping name"; ZIP in list(13672,13679,18010,18020,18030,18040,18050,18900,18903,19001); Shipping=11.63+ceil(max(Weight-2,0))
The condition on the postal code is a simple check whether the ZIP code is in the given list. If that is the case, the shipping cost is calculated as 11.63 plus the number of kg above 2. For this, we subtract 2 from the weight and set it to 0 if the weight was less than 2kg (the max function has this effect). The last thing is that this will not be full kg above 2kg, so we need to round this value up to the next full kg, which is done with the ceil function. This way you get around using two rules (one for Weight<=2 and one for Weight>2).

Best regards,
Reinhold

Different cost for a list of ZIP codes 08 Apr 2016 06:18 #3

  • makis_best
  • makis_best's Avatar Topic Author
Thank you.

Solved

[SOLVED] Different cost for a list of ZIP codes 08 Apr 2016 06:18 #4

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