Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What Code Determines a Customer's Country?


Schadeboy

Recommended Posts

I would like to add some extra text in my checkout_shipping.php file that will display only when a customer is located outside of the US. Can someone point me to the right code within the checkout_shipping.php file that determines if a customer is considered international or not? I think I can figure out the rest if I can just find that piece of code.

 

Thanks!

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

I would like to add some extra text in my checkout_shipping.php file that will display only when a customer is located outside of the US. Can someone point me to the right code within the checkout_shipping.php file that determines if a customer is considered international or not? I think I can figure out the rest if I can just find that piece of code.

 

Thanks!

There is a Zone system in oscommerce.

create zones set countries in zones.That way You can manage.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

There is a Zone system in oscommerce.

create zones set countries in zones.That way You can manage.

 

Satish

 

Thanks, Satish. I appreciate your response. What I'm want to do is modify a small piece of code that I placed in the checkout_shipping.php page. My modification, as it stands, is simply a link to important information for my international customers about customs and VAT charges they may have to pay on their ordered items. Currently, this link is displayed to all customers regardless of their country. This link is unnecessary for my domestic U.S. customers, as they don't pay those extra fees. So I'd like the link to only be displayed if a customer is outside of the U.S.

 

I use a modified Zones module to determine shipping costs for a particular country. It just occurred to me that the IF function I'm looking for is probably in that module, and not the checkout_shipping.php code at all. Something to look for.

 

Thanks!

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

if ($order->delivery['country_id'] != STORE_COUNTRY) {

//show link

}

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

if ($order->delivery['country_id'] != STORE_COUNTRY) {

//show link

}

Satish

 

Satish,

Your help is very greatly appreciated. However, I'm still confused as to how to place this in the code. I have included the specific part of my checkout_shipping.php file that has the link I want. The link, when clicked, will display a pop-up that gives information about customs fees and VAT charges that are levied to international orders. Like I said, this link is somewhat moot for US customers. The specific part of the code that sets this up is separated from the rest with dashed lines (note - the dashed lines do not appear in the real code).

 

<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
							<td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
						<tr>
							<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

--------------------------------------------------------------------------------------------

															<td class="main" width="50%" valign="top"><a href="java script:void(0);" onclick="NewWindow('echo tep_href_link('popup_shipping.php#Customs'); ','tech','800','800','yes');return false"><u style="main"><font color="#FF0000">Important information for non-US Customers!</font></u></a></td>

--------------------------------------------------------------------------------------------

							<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
						</tr>

 

I tried implementing your code suggestion into this, but I'm apparently not getting it right as I have received nothing but parse errors. The research on PHP that I have done, to include searching through my several PHP books, hasn't been very helpful. I think it has a lot to do with the fact that my books don't have examples of how to work PHP with tables. Any thoughts?

 

-Brian

Edited by Schadeboy

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

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