Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

USA Only Addresses


Recommended Posts

I've seen a lot of discussions on how to restrict addresses to a single country, and how to generate a pulldown list of states on the various address forms. I haven't found a "complete solution" to the questions that were raised. I am new to osCommerce, and to PHP. But I've been programming PERL for years, and have made extensive mods to another shopping cart. So I poked around in the code to see what I could do.


I have come up with a mod that does the following:


- Sets the default country selection to "United States". I have deleted all the other countries from my database, but this selects the USA automatically instead of having the "Please Select" line displayed.


- Generates a state pulldown list on the create account and address book edit and add forms when they are first displayed.


- Moves the Post Code field after the State field on the forms.


- Changes the Post Code display text to "Zip Code".


I would be happy to post this as a contribution if other would find it useful, but I'm not sure wich category to put it into. It's not really a shipping module, but that seems to be the closest match. Any advice would be appreciated.



~~ Grey

Link to comment
Share on other sites

Upload to the Other contribution section please.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

  • 2 weeks later...


This topic is now archived and is closed to further replies.

  • Create New...