Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help removing country field in shipping estimator


treeman

Recommended Posts

Hi guys,

 

My problem is not a very difficult one and usually I am able to solve these kinds of obstacles with my level of php programming, but in this case I am a little bit stuck.

 

I got the shipping estimator module for my store so that customers can estimate shipping from the product info. All is well except I really want to remove the country field

as we do not do international shipping and everywhere else on the site country fields have been removed. So I tracked down this field to these lines in the code:

 

ENTRY_COUNTRY .' '. tep_get_country_list('country_id', $selected_country,'style="width=200"').'<br />';

 

}

 

Ok all looks easy so I tried to simply remove it but then the postcodes dont update.

Ok I figure it must be something to do with the variable $selected_country right?

I tried setting it manually to the country_id but I must be doing something wrong. It never updates the postcodes if I remove the above line or modify it in a way so that the country selection field does not show. Any help would be greatly appreciated!

 

Thanx

Link to comment
Share on other sites

Hi guys,

 

My problem is not a very difficult one and usually I am able to solve these kinds of obstacles with my level of php programming, but in this case I am a little bit stuck.

 

I got the shipping estimator module for my store so that customers can estimate shipping from the product info. All is well except I really want to remove the country field

as we do not do international shipping and everywhere else on the site country fields have been removed. So I tracked down this field to these lines in the code:

 

ENTRY_COUNTRY .' '. tep_get_country_list('country_id', $selected_country,'style="width=200"').'<br />';

 

}

 

Ok all looks easy so I tried to simply remove it but then the postcodes dont update.

Ok I figure it must be something to do with the variable $selected_country right?

I tried setting it manually to the country_id but I must be doing something wrong. It never updates the postcodes if I remove the above line or modify it in a way so that the country selection field does not show. Any help would be greatly appreciated!

 

Thanx

 

 

Where you get the shipping estimator module? Is it a contribution? Could you please provide a link which you used for me? Thanks.

Link to comment
Share on other sites

You could try something like this

 

In catalog/create_account.php

change:

 

CODE

tep_get_country_list('country')

 

to

 

CODE

tep_get_country_list('country', '150')

 

change 150 (Netherlands) to 222 for UK or to 223 for US etc etc

 

You can do the same for (if people want to change address at checkout):

catalog/includes/modules/checkout_new_address.php

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

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