Jump to content
Sign in to follow this  
billythekid

State Based Region Shipping Rates

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

Share this post


Link to post
Share on other sites

the module does what it's supposed to do but when you add multiple items to the cart, only one item gets calculated.

 

is there a fix for this?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Nevermind. I think I figured it out. You must disable and then re-enable the module after you make changes to it...

 

-Fractal

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

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

Share this post


Link to post
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

Share this post


Link to post
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!

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Melinda,

 

In my experience, the spaces between state names worked fine. It only looks for the commas.

 

Aloha,

Blaine

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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

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

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

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://forums.oscommerce.com/viewtopic.php...ate+based+rates

Share this post


Link to post
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

Share this post


Link to post
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.


sirkyle

Share this post


Link to post
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


sirkyle

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×