Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I properly customize the address forms?


caconline

Recommended Posts

The address forms in create_account.php, account_edit.php, checkout_shipping_address.php and wherever there is an address form.

 

What I hope to do is to have a pull-down menu appear in Province/State: when Philippines is selected in the Country: pull-down menu.

 

I also hope to do a tertiary pull-down menu that will appear in City: when a certain province/state is selected.

 

The reason for why I want this level of customization is because afterwards I hope to develop a multiple flat rates shipping module which is only available for one area in the Philippines.

 

I hope someone can help on this. So far, I have managed to muddle through on my own, but in this case, I am worried that I might make a horrible mess and ruin what I've done so far.

 

This is the store I've been working on. It's my father's.

 

http://in-cebu.net/cac/default.php

Link to comment
Share on other sites

An update.

 

I've managed to jury-rig a solution. I really doubt it's the best solution, but it seems to be working fine so far.

 

http://in-cebu.net/cac/create_account.php

 

The Province/State: has a pull-down menu, and that pull-down menu is always there regardless of which country is picked.

 

I had to add additional zones to my sql database and edit create_account.php, account_edit.php, checkout_new_shipping_address.php with the code contributed in this thread:

 

http://www.oscommerce.com/forums/viewtopic.php?t=31206

 

Then, I replaced tep_db_input($country),$entry['entry_country_id'],

$account['entry_country_id'] in that code with the zone country id of the zones I had added to my sql database.

 

I'm still very much a beginner in PHP, so if you think I'm going down the wrong road with this solution, please tell me. I rather have trouble now than later on.

Link to comment
Share on other sites

i think that the solution that yen is offering it's not the best...

the best way would be to use layers i think...

when you choose a country, then a layer appears showing the province/states from that country... the problem is, who has time to code? i don't

 

cheer

emiliano

patagonia, argentina

Link to comment
Share on other sites

  • 1 year later...

Archived

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

×
×
  • Create New...