Tags/topics: 
1
Answers
Vote up!
1
Vote down!

Flat Rate Shipping by Postal Code

I'm trying to put together a rule for flat rate shipping by how their postal code starts. Here's an example of one of the shipping zones:

V6A
V6B
V6C
V6E
V6G

I'm completely new to rules and regular expressions but what I've figured out is:

Data Selector: commerce_order
Address: Shipping Address
Address Component: Postal Code
Operator Value: Begins with
Value: V6A|V6B|V6C|V6E|V6G|v6a|v6b|v6c|v6e|v6g

If I just put one postal code in the value it works but not like this? What have I done wrong?

Asked by: pooon
on October 24, 2013

1 Answer

Vote up!
0
Vote down!

Just add a separate flat rate service for each postal code. Works fine.

Answer by: willem
Posted: Oct 27, 2013

Comments

Hmm. when I made the above comment it was in reference to a Drupal Commerce Kickstart website. Trying to do a similar thing on an older Drupal 7/ Drupal commerce site, using countries instead of postal codes, the first one works fine; the next one doesn't register at all. So right now, if you order from Australia on my website, you pay shipping. If you order from New Zealand you don't - I have to manually sort that out with the customer.

So it works with the newer site, but it doesn't with the older one.

I don't know what's causing it either. :(

Willem

- willem on October 28, 2013