Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Join Date
    Nov 2007
    Posts
    270
    Plugin Contributions
    0

    Default Re: Charge only one tax from resellers

    Quote Originally Posted by harmeet View Post
    Hi scully2569

    I was not sure if anybody else needs this. I am not expert, but I managed to hack the code to my needs. Here is how I did it -

    Please note that you need to have the "dual_pricing_1_3" module installed before making this change.

    Open the file includes/functions/functions_taxes.php

    Close to line 32, look for -

    PHP Code:
        $tax_query "select sum(tax_rate) as tax_rate
                      from (" 
    TABLE_TAX_RATES " tr
                      left join " 
    TABLE_ZONES_TO_GEO_ZONES " za on (tr.tax_zone_id = za.geo_zone_id)
                      left join " 
    TABLE_GEO_ZONES " tz on (tz.geo_zone_id = tr.tax_zone_id) )
                      where (za.zone_country_id is null
                      or za.zone_country_id = 0
                      or za.zone_country_id = '" 
    . (int)$country_id "')
                      and (za.zone_id is null
                      or za.zone_id = 0
                      or za.zone_id = '" 
    . (int)$zone_id "')
                      and tr.tax_class_id = '" 
    . (int)$class_id "'
                      group by tr.tax_priority"

    Replace it with -

    PHP Code:
    // KLUDGE START by Harmeet - To charge only GST from resellers.
    if ($_SESSION['customer_id']) {
        
    $customers_id $_SESSION['customer_id'];
        
    $customer_check $db->Execute("select * from " TABLE_CUSTOMERS " where customers_id = '$customers_id'");
        if (
    $customer_check->fields['customers_whole'] != "0") {
            
    $whole 1;
        }
    }
    if (
    $whole) {
        
    $tax_query "select tax_rate as tax_rate
                      from (" 
    TABLE_TAX_RATES " tr
                      left join " 
    TABLE_ZONES_TO_GEO_ZONES " za on (tr.tax_zone_id = za.geo_zone_id)
                      left join " 
    TABLE_GEO_ZONES " tz on (tz.geo_zone_id = tr.tax_zone_id) )
                      where (za.zone_country_id is null
                      or za.zone_country_id = 0
                      or za.zone_country_id = '" 
    . (int)$country_id "')
                      and (za.zone_id is null
                      or za.zone_id = 0
                      or za.zone_id = '" 
    . (int)$zone_id "')
                      and tr.tax_class_id = '" 
    . (int)$class_id "'
                      group by tr.tax_priority"
    ;
    }
    else {
    // KLUDGE END
        
    $tax_query "select sum(tax_rate) as tax_rate
                      from (" 
    TABLE_TAX_RATES " tr
                      left join " 
    TABLE_ZONES_TO_GEO_ZONES " za on (tr.tax_zone_id = za.geo_zone_id)
                      left join " 
    TABLE_GEO_ZONES " tz on (tz.geo_zone_id = tr.tax_zone_id) )
                      where (za.zone_country_id is null
                      or za.zone_country_id = 0
                      or za.zone_country_id = '" 
    . (int)$country_id "')
                      and (za.zone_id is null
                      or za.zone_id = 0
                      or za.zone_id = '" 
    . (int)$zone_id "')
                      and tr.tax_class_id = '" 
    . (int)$class_id "'
                      group by tr.tax_priority"
    ;
    // KLUDGE START by Harmeet - To charge only GST from resellers.
    }
    // KLUDGE END 

    Close to line 78, look for -

    PHP Code:
        if ($tax->RecordCount() > 0) {
          
    $tax_description '';
          while (!
    $tax->EOF) {
            
    $tax_description .= $tax->fields['tax_description'] . ' + ';
            
    $tax->MoveNext();
          }
          
    $tax_description substr($tax_description0, -3);

          return 
    $tax_description;
        } else {
          return 
    TEXT_UNKNOWN_TAX_RATE;
        } 
    Replace it with -

    PHP Code:
    // KLUDGE START by Harmeet - To charge only GST from resellers.
      
    if ($_SESSION['customer_id']) {
        
    $customers_id $_SESSION['customer_id'];
        
    $customer_check $db->Execute("select * from " TABLE_CUSTOMERS " where customers_id = '$customers_id'");
        if (
    $customer_check->fields['customers_whole'] != "0") {
            
    $whole 1;
        }
      }
      if (
    $whole) {
        if (
    $tax->RecordCount() > 0) {
          
    $tax_description $tax->fields['tax_description'] . ' + ';
          
    $tax_description substr($tax_description0, -3);
          return 
    $tax_description;
        } else {
          return 
    TEXT_UNKNOWN_TAX_RATE;
        }
      }
      else {
    // KLUDGE END
        
    if ($tax->RecordCount() > 0) {
          
    $tax_description '';
          while (!
    $tax->EOF) {
            
    $tax_description .= $tax->fields['tax_description'] . ' + ';
            
    $tax->MoveNext();
          }
          
    $tax_description substr($tax_description0, -3);

          return 
    $tax_description;
        } else {
          return 
    TEXT_UNKNOWN_TAX_RATE;
        }
    // KLUDGE START by Harmeet - To charge only GST from resellers.
      
    }
    // KLUDGE END 
    Hope it works for you.

    Thanks
    I know this is 2 years old, but I tried it with the new Dual Pricing/Wholesale module, but it works only for wholesale levels. When I have a retailer (indicated as wholesale level 0) it also does not include PST.
    Anyone got it working??
    Tx Veronika

  2. #22
    Join Date
    Nov 2007
    Posts
    270
    Plugin Contributions
    0

    Default Re: Charge only one tax from resellers

    Quote Originally Posted by Veronika7747 View Post
    I know this is 2 years old, but I tried it with the new Dual Pricing/Wholesale module, but it works only for wholesale levels. When I have a retailer (indicated as wholesale level 0) it also does not include PST.
    Anyone got it working??
    Tx Veronika
    I got this working, but now I have a problem with HST for wholesalers in Eastern Canada ( ns, nf, nb) as they are still being charged 13% HST. I am assuming their HST should also drop the 8% PST, right?
    Any comments
    Tx

  3. #23
    Join Date
    Aug 2008
    Posts
    1
    Plugin Contributions
    0

    Idea or Suggestion Re: Setting Up a Wholesale & Retail Store

    Quote Originally Posted by fraso View Post
    I see that the Dual Pricing - Wholesale Pricing download (modified with Harmeet's changes) allows a customer to be set up as a wholesale customer who is tax-exempt. However, the Tax Exemption Status download seems to do something similar.

    I would like to set my store up as follows:
    • retail prices shown to the general public.
    • wholesale prices shown only to wholesale customers once they have logged-in.
    • wholesale customers are exempt from paying provincial retail sales tax once they provide their tax exemption number.
    • quantity-based discounts for wholesale customers and possibly also for retail customers.
    What would be the best way to accomplish this?

    Frank
    Quote Originally Posted by supersnow View Post
    This is exactly what we are looking for except that we are located in California USA and we would be having our wholesale customers to be exempt from CA sales tax once they provide their seller's permit.

    Did you find a solution. I have looked at the dual pricing and other modules but none seem to do exactly what we need and I am afraid of combining them as I am scared of breaking my shop.

    We really only want to give discounts to our wholesale customers that we want to approve first and only on a quantity discount basis.

    Any help?????
    I'm running Zen Cart v1.3.8a and is able to setup the following by installing the Dual Pricing - Wholesale Pricing v1.4.2 and Customer Tax Exempt v1.12.
    [*]retail prices shown to the general public.
    [*]wholesale prices shown only to wholesale customers once they have logged-in.
    [*]wholesale customers are exempt from paying provincial retail sales tax once they provide their tax exemption number.

    Just installed both mods, extract and upload (replace) the attached customers.php to the admin folder. I have combined the codes from both mods.

    You can then grant wholesale status and tax exempt status on admin->customers. (In my case, I entered "1" for Wholesale pricing level and "New York State Sales Tax" completely for Customer Tax Exempt.)

    It's working fine for me but keep in mind that use this AT YOUR OWN RISK!
    Attached Files Attached Files

  4. #24
    Join Date
    Feb 2009
    Location
    Ontario, Canada
    Posts
    38
    Plugin Contributions
    0

    Default Re: Setting Up a Wholesale & Retail Store

    Quote Originally Posted by GPX_NYC View Post
    I'm running Zen Cart v1.3.8a and is able to setup the following by installing the Dual Pricing - Wholesale Pricing v1.4.2 and Customer Tax Exempt v1.12.
    [*]retail prices shown to the general public.
    [*]wholesale prices shown only to wholesale customers once they have logged-in.
    [*]wholesale customers are exempt from paying provincial retail sales tax once they provide their tax exemption number.

    Just installed both mods, extract and upload (replace) the attached customers.php to the admin folder. I have combined the codes from both mods.

    You can then grant wholesale status and tax exempt status on admin->customers. (In my case, I entered "1" for Wholesale pricing level and "New York State Sales Tax" completely for Customer Tax Exempt.)

    It's working fine for me but keep in mind that use this AT YOUR OWN RISK!
    THANK YOU. THANK YOU, THANK YOU....This worked PERFECTLY AMAZING for me. Just the thing I've been trying to do for the past 5 hrs. Life saver. Thanks again.

    PS....You should put this in the Software Add Ons sections for others like us.

  5. #25
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    6
    Plugin Contributions
    0

    Default Re: Charge only one tax from resellers

    I installed Dual Pricing and it works fine. BUT, I have one problem: I want to show the prices for the wholesalers without tax and for all others with tax. Of course at the end everybode have to pay the tax.

    Anybody an idea???

    Dirk

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v151 I need to charge tax only in Colorado
    By brianw3185 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 14
    Last Post: 30 Sep 2013, 07:46 AM
  2. Workaround for Resellers/Tax Exempt
    By sarahbn in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 5
    Last Post: 26 Jun 2009, 08:13 PM
  3. Only charge tax to people from the same state
    By susanshropshire in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 17 May 2009, 08:39 PM
  4. how do i charge just one flat tax rate
    By rohitsax in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 8
    Last Post: 6 Nov 2007, 04:30 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR