Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Deleting countries


ProblemChild

Recommended Posts

I've tried following the directions in some threads about deleting the Country option from the registration process but the little bugger won't go away. 

 

Which lines of code and from which php files do I need to alter?

 

Thanks!

Hi,

 

Goto catalog/create_account.php look for this (it's about 2/3rds of the way down)

 

?>
       <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>
           </table></td>
         </tr>
       </table></td>
     </tr>

and change to this

 

?>
       <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>
           </table></td>
         </tr>
       </table></td>
     </tr>

This will remove it from the create account page if you want to change it back just remove the 2 forward slashes // from these lines.

 

                <td class="main"><//?php echo ENTRY_COUNTRY; ?></td>
               <td class="main"><//?php echo tep_get_country_list

 

Kind Regards,

Michelle.

Link to comment
Share on other sites

I've tried following the directions in some threads about deleting the Country option from the registration process but the little bugger won't go away. 

 

Which lines of code and from which php files do I need to alter?

 

Thanks!

 

 

I commented out the fields and that worked - sort of. Now when I try to register, I get an error:

 

You must select a country from the Countries pull down menu.

 

Psst... It's gone!

 

Now what? :blink:

Link to comment
Share on other sites

I commented out the fields and that worked - sort of.  Now when I try to register, I get an error:

 

You must select a country from the Countries pull down menu.

 

Psst... It's gone!

 

Now what? :blink:

 

The following generates the error in create_account.php and other files

 

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

     $messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
   }

 

 

Search your files for ENTRY_COUNTRY_ERROR

 

I think you'd be better removing all the countries you don't want from the database and either leaving the countries box or making it invisible/hidden. You'll probably need the country info to pass to your cc processor! (maybe)

Light, in the absence of eyes, illuminates nothing.

Link to comment
Share on other sites

I commented out the fields and that worked - sort of.  Now when I try to register, I get an error:

 

You must select a country from the Countries pull down menu.

 

Psst... It's gone!

 

Now what? :blink:

Ooops Sorry yea forgot about that.

 

Listen there's actually to many files that you'll have to edit so I suggest you download this contribution then you can switch On & Off from osC admin panel

 

http://www.oscommerce.com/community/contri...ustomer+details

 

I've got it and it's a lot easier than editing files.

 

Sorry for my ommission.

 

Kind Regards,

Michelle

Link to comment
Share on other sites

how do i enter the database to remove the countires.

 

where is the database?

 

i can do it manually from the admin page, one by one, but this will take ages!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...