Lee Willis

Region-based shipping with WP e-Commerce

| 408 Comments


I’ve been asked a few times about how to split up countries into regions and charge shipping differently to the different areas in WP E-Commerce. This was something that was almost, but not quite possible with one of my existing plugins.

Now it’s just a little bit easier.

What You’ll Need

In this example we’re going to show how to achieve the following:

  • Set of Weight rates for New Zealand (North Island)
  • Set of Weight rates for New Zealand (South Island)
  • Set of Weight rates for the rest of Asia/Pacific
  • Set of Weight rates for Europe

The Plan

To acheive our end goal we’re going to:

  1. Create 2 regions attached to the country “New Zealand”
  2. Remove New Zealand from the Asia and Pacific continent (So people ordering to NZ see those prices, not the general “Asia and Pacific” pricing
  3. Set up per-country/region rates for New Zealand
  4. Set up per-continent rates for Asia and Pacific, and Europe

Getting Started

The first job is to find out the “country ID” for New Zealand. Using your favourite database you’ll want to look in the wp_wpsc_currency_list table for the entry for New Zealand, and make a note of the value of the “id” field – in our case 156.

While we’re here, we’ll also move New Zealand out of it’s current continent. This basically just involves updating the same record, and setting the continent field to something unique, e.g.

Next – you’ll need to create whatever regions you want in the wp_wpsc_region_tax table, using the ID you’ve just found as the “country_id” field, e.g.

Configuring your pricing

That’s all with the scary database stuff, now on to the easy stuff. First of all you’ll need to activate both of the shipping modules:

First up we’ll configure the continent-based pricing. Click on “Edit” next to the weight-continent pricing. Up will pop the configuration pane, with a drop-down of the standard continents – and also our “newzealand” continent – which we’re not going to use since New Zealand is going to be priced by region.

Let’s pick Europe, and configure some weight rates.

In this case we’ve just configured one weight band – which means that anything shipped to Europe will be charged at the same rate – £80 in this case.

We can do the same for Asia and Pacific, except maybe setting up multiple layers using the “Add Layer” link.

At this stage shipping will work for Europe, Asia and Pacific, but not for New Zealand (Since we took it out of Asia and Pacific).

Click on “Edit” next to the Weight / Country and Region pricing. Up will pop the configuration pane, with a drop-down of the countries, including regions where configured – for example, we can see our North Island, and South Island regions here:

Selecting a region gives us the chance to configure weight rates, e.g.

Repeat for other regions, and you’re set. Happy Shipping!

Note: All weights should be set up in lbs, no matter what weight unit you used to set the weight for your products. WP e-Commerce will convert between them for you.

408 Comments

  1. Trying to set it up so it will work. My postage is based on weight.
    But when I go to shipping options and costs, it is not listed there to configure.

  2. When I go to setting and shipping option and costs, along the top is this:
    Shipping Options | Australia Post | Flat Rate | International Delivery | Free Shipping | Local Delivery | Local Pickup

    I don’t see your plugin there, or am I in the wrong spot all together?

    Told you I am not tech savvy :P

  3. thie default functionality of checking shipping address for same billing address stops working when Weight / Destination plugin is used.

  4. Hi Lee,
    I’m currently using WordPress 3.9.1, WPEC 3.8.14 and WP E-Commerce Weight & Destination Shipping Modules v5.0

    The problem is: Whenever I activate “Weight / Country and Region Shipping” + “Weight / Continent Shipping”, both do not show at Checkout.

    Here’s my plan:
    1. UK Orders – shipping is free
    2. Europe Orders – there is a table rate for these countries
    3. Rest of the World – – there is a table rate for these countries

    Please Help, or is this already solved if I buy your premium shipping module?

    • Hi,

      There are issues with checkout in WP e-Commerce 3.8.14 – picking up the latest release should resolve those.

  5. Hi Lee,
    The latest version that I have installed is WP E-Commerce 3.8.14.1, but this one still has the same problem as before.

  6. hi,

    i found similar problems with 3.8.14.2

    also countries are not listed in IE

    :-(

Leave a Reply

Required fields are marked *.