Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

State Based Region Shipping Rates


billythekid

Recommended Posts

Here a module I just made because I really needed this and could not find it anywhere.

http://www.oscommerce.com/downloads.php/co...ions,809/type,2

 

This module allows you create shipping regions by dividing states of the USA (or other country) in different groups. Each group will then have it's own shipping price which you can based on price or weight.

 

This module is perfect when for those of you need to charge different when shipping to different parts of the country.

 

Features

1..Regions can be composed of US States or of any other country

2..Order weight or price can be used to calculate shipping price.

3..Any number of regions

4..Handling fee can be added.

 

Jorge

Jorge

 

This module allows you create shipping regions by dividing states of the USA (or other country) in different groups. Each group will then have it's own shipping price which you can based on price or weight.

 

This module is perfect when for those of you need to charge different when shipping to different parts of the country.

 

Features

1..Regions can be composed of US States or of any other country

2..Order weight or price can be used to calculate shipping price.

3..Any number of regions

4..Handling fee can be added.

 

Jorge

Link to comment
Share on other sites

  • 2 weeks later...

Are you using price or weight? It seems like you are using weight and have not indicated the products(s) weight. That will couse the module to calculate the cost based on 0lbs of total weight. I checked the maduled and tried replicating that error....but I cant, everything works here.

Link to comment
Share on other sites

  • 1 month later...

Hi Billy

 

Have intalled your regions mod and works great in Australia.

 

However, I need 2 options for each region - express and regular.

 

I copied the 2 files and changed names to express_regions, then changed content so any instance of:

MODULE_SHIPPING_REGIONS becomes MODULE_SHIPPING_EXPRESS_REGIONS

and

regions becomes express_regions

 

Also changed some of the text in languages.

 

This works fine until checkout. The express regions option appears and calculates correctly, but if I choose that option I can not proceed with checkout process.

 

Any ideas?

 

Cheers

 

Rygo

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I installed this contrib. and it seems to work fairly well. The only problem is that it doesn't let me have more than 3 regions.

 

I have set the regions field as follows:

 

$this->regions = 4;

 

I get two extra fields that show up in the admin panel, but the headings for them are blank. If I try to fill the blank fields in with a region and the pricing info it doesn't accept the changes. (The fields just remain blank when I update)

 

Am I doing something wrong? If anyone can help I would greatly appreciate it.

 

Thanks.

 

-Fractal

Link to comment
Share on other sites

  • 4 weeks later...
Have intalled your regions mod and works great in Australia.

 

However, I need 2 options for each region - express and regular.

 

(snip)

 

This works fine until checkout. The express regions option appears and calculates correctly, but if I choose that option I can not proceed with checkout process.

 

I have done the same thing as Rygo above with the same result, funnily enough. :)

 

Rygo, did you sort this out? Jorge, any ideas on why it is doing this???

 

thanks

 

Jen

I haven't lost my mind - I have it backed up on disk somewhere.

Link to comment
Share on other sites

Jen & Rygo

When copy a module make sure you not only change Title text, but also the name of the fuctions, so that you dont have a problem initiating the same fuctions more than once. You have to call the fuctions different becuase althoug they are in different files, osc will load all the modules (eg. shipping moduels) at the same twice. So, if the same fuction is in two files, it will only get initiated once, therefore affecting the second module that has that same fuction. what i would do is, change every instance of:

SHIPPING_REGIONS to MODULE_SHIPPING_EXPRESS_REGIONS

regions to express_regions

and so on. This will also make sure the module(s) re not referencing to the same sql fields.

Link to comment
Share on other sites

Yes we have both done exactly that (see above):

 

copied the 2 files and changed names to express_regions, then changed content so any instance of:

MODULE_SHIPPING_REGIONS becomes MODULE_SHIPPING_EXPRESS_REGIONS

and

regions becomes express_regions

 

It displays correctly on checkout_shipping.php but when you choose the Express one and hit continue it takes you to checkout_shipping.php again. It gets stuck on that page instead of going to the next one (checkout_payment.php)

 

Jen

I haven't lost my mind - I have it backed up on disk somewhere.

Link to comment
Share on other sites

Hi Jorje,

 

I installed your addition and it show up in the shipping list. I configure it using good information, but when I try to order in the catalog, it says this:

 

This is currently the only shipping method available to use on this order.

State Based Rates?

No shipping available to the selected US State

 

The "selected US State" is Hawaii, abbreviation HI, which is where I am, which is where the store is. I've checked my input several times now and reinput everything from scratch, twice.

 

Can you tell me where I'm going wrong?

 

The store is at: http://www.konahistorical.org/catalog/

 

Thanks!

Blaine

Link to comment
Share on other sites

This is what I have keyed into my setup, for troubleshooting help....

 

Rates Based on State or Regions (group of States)

 

 

Enable US Regions Method

1

 

Handling Fee

3.50

 

Mode

weight

 

Region 1 States

AL,AK,AS,AZ,AR,CA,CO,CT,DE,DC,FL,GA,ID,IL,IN,IA,KS,KY,LA,ME,MD,MA,MI,MN,MS,MO,MT

,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,PA,PR,RI,SC,SD,TN,TX,UT,VT,VI,VA,WA,WV,WI,WY

 

Region 1 Shipping Table

1:5.75,2:8.55,3:10.35,4:12.15,5:12.30,6:14.05,7:15.75,8:17.50,9:19.20,10:20.90,1

1:22.65

 

Region 2 States

HI,FM,GU,MH,MP,PW

 

Region 2 Shipping Table

1:3.95,2:4.75,3:5.30,4:5.85,5:6.30,6:6.80,7:7.35,8:7.90,9:8.40,10:8.95,11:9.50

 

Region 3 States

AA,AE,AP

 

Region 3 Shipping Table

1:5.75,2:8.55,3:10.35,4:12.15,5:12.30,6:14.05,7:15.75,8:17.50,9:19.20,10:20.90,1

1:22.65

Link to comment
Share on other sites

Make sure that:

1. In the Region X table, you splled out the name of the state.

2. The zone are properly configured and include the state you entered.

3. No paces are included.

4. Match the case

-----------------------------------------------------------------------

Region 1 States

Alabama,Arizona,Arkansas,California,Colorado,Connecticut,Delaware

 

Region 1 Shipping Table

200:7.00,500:10.00,1000:16.00

-----------------------------------------------------------------------

Link to comment
Share on other sites

Thanks for the reply. I eventually figured out that was what was wrong. I typed in BOTH the spelled-out state names and the postal two-letter code. What was strange was that when you place an order, the two-letter state shows up, but in the background, it's using the spelled-out state!

 

Thanks, though. I did get it working eventually.

 

Aloha,

Blaine

Link to comment
Share on other sites

Hi,

 

I have been looking all day for something like this.

 

I installed it and this is the problem I am having.

 

Admin:

Rates Based on State or Regions (group of States)

 

Enable US Regions Method

1

 

Handling Fee

0

 

Mode

weight

 

Region 1 States

AL,AK,AS,AZ,AR,CA,CO,CT,DE,DC,FL,GA,ID,IL,IN,IA

 

Region 1 Shipping Table

50:10.00

 

Region 2 States

KS,KY,LA,ME,MD,MA,MI,MN,MS,MO,MT,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK

 

Region 2 Shipping Table

50:12.00

 

Region 3 States

OR,PA,PR,RI,SC,SD,TN,TX,UT,VT,VI,VA,WA,WV,WI,WY

 

Region 3 Shipping Table

50:14.00

 

Store:

I select a product that weighs 15 lbs. and go to checkout and get this.

Shipping Method

 

This is currently the only shipping method available to use on this order.

State Based Rates

No shipping available to the selected US State

 

I tried it with my account state listed as Arkansas and also as AR.

 

Can someone please help?

 

I need this desperately.

 

Thanks!

Link to comment
Share on other sites

Hi,

 

I do have a question about the spaces.

 

I know there are no spaces between states but what about the space here?

New York

New Jersey

New Mexico

 

Is it ok to have spaces in their names?

Link to comment
Share on other sites

Thanks for sharing this great module. I want to put all 48 contiguous states in the "Region 1 States" field but it only allows me to input part of them:

 

Alabama,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Georgi

a,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Maryland,Massachuse

tts,Michigan,Minnesota,Mississippi,Missouri,Montana,Nebraska,Nevada,New Hampshire,New Jersey,N

 

 

May I ask how I can set it up such that I can enter all 48 contiguous states in the "Region 1 States" field? Thanks in advance. The following is part of the info that's now shown in my admin panel:

 

Rates Based on State or Regions (group of States)

Enable US Regions Method

1

 

Handling Fee

0

 

Mode

price

 

Region 1 States

Alabama,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Georgi

a,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Maryland,Massachuse

tts,Michigan,Minnesota,Mississippi,Missouri,Montana,Nebraska,Nevada,New Hampshire,New Jersey,N

Best regards,

 

Elmo

Link to comment
Share on other sites

Hi,

 

I think I would just split up the names into the boxes and you can have the same shipping...that wouldn't matter.

 

I wonder if there is some setting that limits the amount of characters or words in those boxes?

Link to comment
Share on other sites

  • 2 weeks later...

Make sure that:

1. In the Region X table, you splled out the name of the state.

2. The zone are properly configured and include the state you entered.

3. No paces are included.

4. Match the case

-----------------------------------------------------------------------

Region 1 States

Alabama,Arizona,Arkansas,California,Colorado,Connecticut,Delaware

 

Region 1 Shipping Table

200:7.00,500:10.00,1000:16.00

-----------------------------------------------------------------------

Link to comment
Share on other sites

The module doesnt take all the states enteres because of the coding of OSC and the structure of the database. The database field allows for only so much data stored.

 

To let the field take more. Edit the mySQL database and change/modify the field. Similar to "int vs. longint"

Link to comment
Share on other sites

  • 2 weeks later...

Due to popular demand, this module will now let you include countries in your regions. You can for example, include US states in one region, the states of canada in another, all the european countries in anouter. You can also combine countries and states in same region. You can also conbine states of different countries in the same region. To top it all off, you can now deterrmine the shipping cost based on number of imtes (similar to the "Per Item" built in module.

 

Changes:

-------------

1. Added "per item" support

2. Added Country support

3. Fixed Spanish language bug

 

Features:

---------

1..Regions can be composed of States and/or Countries.

2..Regions include any number states/countries (one or more).

3..Regions can include state of different countries. For example, you can have a region

that included Texas and the northern States or Mexico.

4..Order weight, price, # of items can be used to calculate shipping cost.

5..Any number of regions.

6..Handling fee can be added.

 

Usage:

------

This shipping module allows you to create groups of country states(regions) and

assign a shipping price to such a region. A region can be composed of a single state/country

or of any number of states/countries. A region can also contain states from multiple countries,

and can contain a combination of countries and states.

You have the choice to calculate the shipping cost based on the total price of the

order or the total weight or on 3 of items of the order.

 

support for this contribution is available at:

http://www.oscommerce.com/forums/viewtopic.php...ate+based+rates

Link to comment
Share on other sites

Does anyone have a suggestion on how to modify this contrib to use ZIP instead of states.

This would do the trick for me (I think/hope) as we have a rather complex zone-system here in Norway... :wink:

Petter - Arktisk Pudder

Link to comment
Share on other sites

I have set my state based rate for the 48 states so that I offer free shipping on orders over 100. I appeared to be working, bun now it seems that when someone in the 48 states orders anything, they are offered free shipping. Any suggestions.

Link to comment
Share on other sites

Ok, I resolved my issue, and I'll explain if anyone else needs to do the same. First let me say that in my last post I wasn't that clear. I set the 48 states to figure shipping by price, then set the price breakdown to 100:0, thinking this would force anyone who was purchasing under $100 to use the UPS shipping.

in region.php

Line 87

 if ($order_total_price >= $regions_table[$i]) {

I changed the $order_total_price from a '<=' to '>=' This forces any $ value under my chosen value to default to the undefined rate.

Line 95

        if ($shipping == -1) {

         $shipping_cost = 0;

         $shipping_method = MODULE_SHIPPING_REGIONS_UNDEFINED_RATE;

   $error = true;

This forces anything that isn't in my Zone and Price range, to get the undefined zone error, which removes the option of using the region shipping and forces my customer to UPS.

Hope it helps

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...