zcfsu Posted February 14, 2008 Posted February 14, 2008 So I have been racking my brain for hours trying to figure out the best way to apply a different tax rate for any orders picked up at the store rather than being shipped. I have installed the customer pick-up module and have found that the function page doesnt transfer information to the general.php where the taxes are added. I currently have my tax rate being determined by checking the customer's zipcode to other zipcodes located in txt files. So if they live in a certain zipcode then the coinciding tax is applied to their order. This only is applicable if they ship their order, and if they pick it up they have to pay the tax of where the store is located. function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) { global $customer_zone_id, $customer_country_id; //echo "send to = ".$_SESSION['sendto']."<br>"; //debugging $customer_zip_query = tep_db_query("select entry_postcode, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . $_SESSION['sendto'] . "'"); $address_query = tep_db_fetch_array($customer_zip_query); $cust_zip_code = $address_query['entry_postcode']; $cust_entry_zone_id = $address_query['entry_zone_id']; //BEGIN THE CUSTOM CHANGES FOR ZIPCODE AND ZONE LOGIC $RTD = false; //$adams = false; $both = false; $RTDzipsfile = file_get_contents('/home/forkstwo/public_html/catalog/RTDzips.txt'); $RTDzips = explode("\n", $RTDzipsfile); $RTDtotal = count($RTDzips); for($i=0;$i<$RTDtotal;$i++) { if($cust_zip_code == $RTDzips[$i] && $cust_entry_zone_id == '13') { return 4.1000; } } So is there any way to accomplish this? I'm about to tell my client that its an impossible task unless someone can help me out... :D Thanks in advance! Quote
zcfsu Posted February 15, 2008 Author Posted February 15, 2008 So maybe this idea would help anyone help solve my issue. If I could find some way to apply the shipping address as the store address temporarily during checkout, that would be a good solution. Considering this is based off of zipcodes anyways. Quote
c.jordan84 Posted February 18, 2008 Posted February 18, 2008 This might help: http://www.oscommerce.com/forums/index.php?sho...=292975&st= Quote
c.jordan84 Posted February 18, 2008 Posted February 18, 2008 By the way, it doesn't replace the shipping address with the store address; it just eliminates the shipping address altogether and fools the system into thinking that the buyer is from a different tax zone. I had to hard code an address into the "deliver" fields for it to show up on the invoice. Quote
satish Posted February 18, 2008 Posted February 18, 2008 create a tax class and Map it to Your store zone. Now when some one selects pickup then internally set his shipping address to that of Your shops. This will mean in the tax of Your store zone being applied. Satish Quote 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.
zcfsu Posted February 25, 2008 Author Posted February 25, 2008 c.jordan84 - thanks for that info, im trying out your implementation now to see if this works for me. BTW, did you ever get this fixed? "Unfortunately, I haven't gotten far enough to fix the misreport it causes with confirmation emails, but it'll be fixed by tomorrow afternoon." Satish - your way sounds a lot cleaner, but I tried several different ways of doing this with no luck. I have been having trouble overwriting the user's shipping address when they select pickup. Have you done this before? I don't know where to pass this information through so that it recognizes it without changing the users address in the DB. Quote
Recommended Posts
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.