Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Country-State Selector


stevel

Recommended Posts

Anything in the works to update this to work with the latest release of osC?

 

Would do this myself but wanted to check first in case Steve or someone else had already worked on it.

 

Regards,

Joe

Edited by MooseFruit
Link to comment
Share on other sites

After a quick look, I don't see anything obvious to change. The edit for state names can be ignored as Country-State Selector does it much better. What other conflicts do you see?

Link to comment
Share on other sites

Ok, to clarify: to save time I was going to copy the files in the zip package and overwrite the files on my store.

 

So if I go through the readme.htm guide line-by-line, I should be able to successfully implement?

Link to comment
Share on other sites

I looked at the "patch" instructions, and the only files it edited that I think are relevant are those where you'd be replacing the edited code anyway. So in general I'd say yes. I'll try to find the time to verify this soon.

 

BTW, I have no plans at present to look at 3.0, assuming it is released in my lifetime.

Link to comment
Share on other sites

Will this contribution work if I have one country only?

 

I want to only have the UK, but want counties to be a drop down list.

 

If anyone knows how to just have the UK, that would be really helpful too!

 

Thanks

 

Lotti

Link to comment
Share on other sites

Will this contribution work if I have one country only?

 

I want to only have the UK, but want counties to be a drop down list.

 

If anyone knows how to just have the UK, that would be really helpful too!

 

Thanks

 

Lotti

 

Sorry wrong question. I see this contribution will enable me to just have UK, but will it then by default provide a drop down list for Counties?

 

Thanks

Link to comment
Share on other sites

If you have entered zones for the UK counties (not provided in the default osC installation), then yes. You are aware that the county is optional in a postal address if you have the postcode?

Link to comment
Share on other sites

If you have entered zones for the UK counties (not provided in the default osC installation), then yes. You are aware that the county is optional in a postal address if you have the postcode?

 

Great thanks. I know it's not a requirement but people still expect to put it - at the moment.

 

I have the zones installed, so the drop down list will automatically appear when I set only UK as active right?

 

Anther questions - on my invoice I get for example in County - England - Oxfordshire, how do I just display the Oxfordshire bit?

 

Thanks a lot

 

Lotti

Link to comment
Share on other sites

Yes, assuming you set the country code as the default country.

 

osC's default address formatting is incorrect for many countries, UK included. Look at the code for tep_format_address in includes/general.php and look at the definitions of the address formats in the database (there is no UI for this in admin). For my store, I've reworked the format_address routine, added some new format types and added a bunch of new formats associated with countries my store ships to most often. I keep saying that one of these days I'll do a real contrib for address formats, but it's a LOT of work.

 

Or maybe you're asking about the dropdown itself? If so, then it's the way you've entered the zones. The country name should not be in there.

Edited by stevel
Link to comment
Share on other sites

Yes, assuming you set the country code as the default country.

 

osC's default address formatting is incorrect for many countries, UK included. Look at the code for tep_format_address in includes/general.php and look at the definitions of the address formats in the database (there is no UI for this in admin). For my store, I've reworked the format_address routine, added some new format types and added a bunch of new formats associated with countries my store ships to most often. I keep saying that one of these days I'll do a real contrib for address formats, but it's a LOT of work.

 

Or maybe you're asking about the dropdown itself? If so, then it's the way you've entered the zones. The country name should not be in there.

 

Steve you answered all my questions, thanks, am busy installing.

 

If so, then it's the way you've entered the zones. The country name should not be in there - I was also asking about that. I just installed a contribution for uk counties. If I remove and install World_zones part of this contribution would that sort it out?

 

Thanks for you help, hope you find time for that contribution! :thumbsup:

 

Lotti

Link to comment
Share on other sites

Installing World Zones will add zones so that the zone pulldown will appear for more countries. My past experience with World Zones has been that many of the zones are incorrectly defined, though it has been a couple of years at least since I last looked at it. You will want to compare the zones it gives to those at the official postal site for your country.

Link to comment
Share on other sites

Installing World Zones will add zones so that the zone pulldown will appear for more countries. My past experience with World Zones has been that many of the zones are incorrectly defined, though it has been a couple of years at least since I last looked at it. You will want to compare the zones it gives to those at the official postal site for your country.

 

 

This is going to sound stupid, but I can't remember how I uploaded my zones to remove them..

 

I've looked in the zones table bug can't find any for country 222

 

Where else should I look?

 

Thanks

Link to comment
Share on other sites

It's the "zones" table.

 

Hi, Steve. Thanks for the contrib. It's as awesome as all other posters have stated. I'm having one issue that others have had. . .my default country is United States, but when the page first pops up, the state is still a text box. If I then change the country to be Candad, the drop down box appears and then changing it back to United States also displays the state drop-down. The issue is on the initial load.

 

I read through the whole thread. I'm getting no page errors. Also the refresh code is in place. I do have PWA installed as well as STS. Not sure if the issue has to do with either of those?

 

Any help you can provide would be awesome.

 

Kelly

Link to comment
Share on other sites

  • 1 month later...

I am looking for a solution to the second address line. I have this contrib installed, but it uses the "suburb" variable for the second address line. I need to know if I can change up the 2nd address line to: xxxxxx_address_2

 

I know there's a contribution that explains how to do it, but will it have an effect on the coding from this contribution?

 

Hey, stevel please post a solution.

 

Many thanks,

stickypod

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

This contribution does not "use" SUBURB - that's just there from the default osC. If you want to change this to some other field, go ahead. It doesn't affect Country-State Selector. Just be careful when making edits that you change the correct lines.

Link to comment
Share on other sites

This contribution does not "use" SUBURB - that's just there from the default osC. If you want to change this to some other field, go ahead. It doesn't affect Country-State Selector. Just be careful when making edits that you change the correct lines.

Thank you. I will post my solution once completed.

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

Thank you. I will post my solution once completed.

After reviewing the "Automated FedEx Labels" coding, I did not need to add an Address2 to the MySQL database and make all the changes. I simply needed to use the "Suburb" variable to do the same thing. It works great and so does this contrib.

 

Thanks for the fast response Steve

stickypod

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

Hello,

 

I have read through all 40 pages of this topic and have found other people that have asked the question I would like an answer to, but didn't find any answers.

 

Has anyone found a way to change the default state from the first state to some other state?

 

When the form initial comes up with the default country, I would like it to also come up with a default state. I don't care what the default is for the state, after someone changes the country, but I would like it to be correct when the person first views the current form. Is it possible to make this change and if so, where would I do it?

 

Thanks.

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...