osCmax v2.5 User Manual
Results 1 to 4 of 4

Tax By Zip

This is a discussion on Tax By Zip within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I know there are literally hundreds of posts here on the subject and after 2 days searching I am no ...

      
  1. #1
    Lurker
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0


    Default Tax By Zip

    I know there are literally hundreds of posts here on the subject and after 2 days searching I am no closer to an answer. In the shop I'm working on they company is required to charge an additional sales tax if the ship address is in the same Parish. I found the County Sales Tax by Zip add on and it works great if the customer already has an account on file. If it's a new customer then it doesn't work.

    I'm sure it's a simple adjustment based on whether or not the customer_id is set in a session but I can't find that anywhere. At any rate, any guidance would be appreciated.

    ~David

  2. #2
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: Tax By Zip

    You hit it right on the money - we need to "adjust" somethings in order for an effective tax by zip to work for oscmax. Please feel free to experiment, and share on any thoughts or outlines you have in order for us to get there, and submit it here so everyone can take a look. I am working on exactly the same thing once we're out of oscmax beta and into stable release!

  3. #3
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Question Re: Tax By Zip

    I think a big part of the reason why its only working for customers who already have accounts, is because this section on \catalog\includes\functions\general.php...

    Code:
    $customer_zip_query = tep_db_query("select entry_postcode, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where address_book_id =  '" . $_SESSION['sendto'] . "'");
    
    $cust_zip_code = $address_query['entry_postcode'];
    ...is getting the postcode value of a customer who 'already' exists in the database. I believe that was the authors original intent! But with our new oscmax store, perhaps we extend his logic...My first guest is setting a condition that says if $address_query['entry_postcode'] is null or empty, then check another variable...perhaps $billingAddress['postcode']??? playing around with it...
    Last edited by blackhawk; 06-20-2011 at 07:53 AM.

  4. #4
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: Tax By Zip

    the function 'getTaxRate' that is located on this same page, is defined on \catalog\includes\classes\tax.php, and from that page its also returning a tax rate around line 51...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •