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:

Canada Post Rates: Pro. Rate and weight multiplier 28 Jul 2013 19:39 #1

  • webtradenow
  • webtradenow's Avatar Topic Author
Hi thank you for this great plug in. We just upgraded our plug in order to do the Canada post Rate system (see attached). I got the first part working where it detects the province and charges a 12.60 rate based on first letter. But I cannot get conditional weight requirements to work: Above 3kg, each .5kg is is an additional 0.60

Province detection for first letter:
1. Name=Canada Shipping ; Canada_Area=="A"; Shipping=17.50

But now I need to express:

2. for each incremental .5kg above 3kg 0.60*Weight; Shipping= (

I cannot make the former and latter expressions work together. Is this possible to do? Can you help us in finding the right expression to create the Canada Post Rate System? I have been obsessing over this since we boaught it.

Thank in advance for your assistance.
Attachments:

Canada Post Rates: Pro. Rate and weight multiplier 28 Jul 2013 19:50 #2

If I understand you correctly, you want a rule like

name=Canada Shipping; Canada_Area=="A", Shipping=17.50 + ceil(2*max(weight-3,0))*0.6

What it does:
-) Calculate how much we are above 3kg (0 if below): max(weight-3,0)
-) Count how many (partial) 1/2 kg we are above 3kg: ceil(2*...)
-) each of them is 0.6$

Best regards,
Reinhold

Canada Post Rates: Pro. Rate and weight multiplier 28 Jul 2013 19:58 #3

Of course, if you want to make the rules simpler (get rid of the max), you can split it into two rules, one for less than 3kg and one for more:

name=Canada Shipping; Canada_Area=="A" && Weight<=3; Shipping=17.50
name=Canada Shipping; Canada_Area=="A"; Shipping=17.50+0.6*ceil(2*(weight-3))

Canada Post Rates: Pro. Rate and weight multiplier 01 Aug 2013 06:26 #4

  • webtradenow
  • webtradenow's Avatar Topic Author
Thank you so much, this works perfect!

[SOLVED] Canada Post Rates: Pro. Rate and weight multiplier 11 Aug 2013 13:14 #5

Problem solved.
  • Page:
  • 1