The Official Website of AgoraCart and Agora.cgi
AgoraCart.com Demos Download AgoraCart User Manuals & Wiki Gold Members Forum Go Gold Now! Gold Version Memberships

AgoraCart.com

About
Features
Download
Payment Gateways
Send a Donation
Founders Club
BLOG: News & Updates

Showcases & Demos

AgoraCart Demos
Shop Live Stores

Downloads & Add-ons

Gold Version Downloads
DBwizz Database Mgr.
AgoraCart.com Store

Help & Support

User Manuals
Gold Version Users Forum
Gold Version Chat
Tech Support
Certified Agora Pros
Certified Designers
Hire a Freelancer

Gold Version Members

Member Benefits
Join Today!
Gold Members Home
Gold Version Users Forum
Gold Version Chat Rooms
Gold Version Downloads

For Store Owners

Merchant Accounts
Cool Resources
Advertise Here
"Powered by" Logos
Web Hosting Search

Misc.

Contact Us
MEET's Talking Guide
The Ancient Greek Agora






AgoraCart Free User Forums

This is the official FAQ and Cool Tips guide For the AgoraCart shopping Cart software


Official Sponsors of the AgoraCart Project:

       


RegisterSearchFAQLog in
Reply to topic Page 1 of 1
City Tax by Zip Code (multiple zip codes)
Author Message
Reply with quote
Post City Tax by Zip Code (multiple zip codes) 
Hello. In the great state of Vermont we have 8 cities (with many zip codes) that need an additional 1% 'town tax' added onto the subtotal. This seems like it should be easy with the custom tax logic... I'm just no good with... well... custom tax logic.

Here's what I have:
Code:
$sc_city_tax_variable = "Ecom_ShipTo_Postal_Code";
$city_variable = $form_data{$sc_city_tax_variable};
if ($city_variable =~ /05863, 05855, 05473/i) { # replace city name with yours
$city_tax = ($subtotal *0.01);  # replace decimal values with your tax amount
                 }


I only tried 3 at a time. I assume there are 2 errors. #1... might be the variable "Ecom_ShipTo_Postal_Code"... should that be something else for the zip code? #2... can I just use commas to seperate the zip codes?

Is this supposed to show up in the shopping cart... because I only see state tax right now... no city tax showing up - I'm doing something wrong.

Please help! We want to go live asap. I can post URL if needed... but it contains original watercolor paintings or nude models.

Thanks in advance,
Josh

View user's profile Send private message Visit poster's website
Reply with quote
Post  
Try code more like this:
Code:
$ship_postalzip = "Ecom_ShipTo_Postal_PostalCode";
$city_variable = $form_data{$ship_postalzip};
if ($city_variable =~ /90001|90002|90003|90004/i) {
   $city_tax = ($subtotal *0.0975);
   }


The 'Ecom_ShipTo_Postal_PostalCode' must be the same variable as is specified for the shipto zip code on the order form.

HTH!


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
Worked like a charm... I just added a 1% increase on taxes for about 25 different zip codes... the code you supplied above was 100% correct!

Thanks again my friend!

View user's profile Send private message Visit poster's website
Reply with quote
Post  
Works great. Thanks for the help on this one.
regards,
candy

_______________
Simulation pret

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum