Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

remove country drop-down at all


natashome

Recommended Posts

Posted

hi

 

i've searched through the forums but couldn't find a way to remove the country drop-down from the create account page. i found an addon but it's much too complicated to install for just removing that field as i don't need it.

can anyone please share a solution?

thank you

Posted

after dealing with the code i made it. maybe someone else will make use of this. this is what i did in create_account.php:

 

1. remove the drop-down by deleting the following code:

<tr>
               <td class="main"><?php echo ENTRY_COUNTRY; ?></td>
               <td class="main"><?php echo tep_get_country_list('country') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
             </tr>

 

 

2. then look for

 

if (is_numeric($country) == false) {
     $error = true;

 

and replace it with:

 if (strlen($country) < ENTRY_COUNTRY_MIN_LENGTH) {
     $error = false;

 

worked for me at least.

Posted

The only problem with removing the country drop down list is that other parts of osCommerce relies on the correct spelling of a country, eg. Spain not España Germany not Deutschland etc.(and that's without incorrect spelling :D ) and its associated code list - so be prepared to find problems now with shipping and currencies at the very least ;)

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Archived

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

×
×
  • Create New...