Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi,

 

I'm implementing the CIty Tax rate hack contrib and I see I have to enter some code for each city and its corresponding zip code. In an effort to save time, is there a way to have multiple zip codes for each city instead of having to enter code for each zip code one at a time? For example. I now have (this is jsut a snippet of the code):

 

elseif ( ($cust_zip_code == '94105') && ($cust_entry_zone_id == '12') )	//ZIPCODE IS FOR San Francisco, CA, AND ZONE 12 IS CA

{

	return 8.7500;		//THIS IS THE STATE + CITY TAX RATE....

 

Is it possible in PHP to have this include ALL San Francisco zip codes, not just 94105?

Posted

Make an array of the SF zip codes (you're on your own for that one):

 

$zip_codes_array = array( '94105', '94106', '94107' );
if( in_array( $cust_zip_code, $zip_codes_array ) && ($cust_entry_zone_id == '12') ) {
return '8.7500';

Contributions

 

Discount Coupon Codes

Donations

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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