Page 1 of 2 12 LastLast
Results 1 to 10 of 25

Hybrid View

  1. #1
    Join Date
    May 2006
    Posts
    30
    Plugin Contributions
    0

    Charge only one tax from resellers

    Hi

    I am from Ontario, Canada. Here we charge two taxes from end customers - GST (federal) and PST (provincial). But from resellers we only charge GST.

    I have installed Dual Pricing mod on my site which allows me to show wholesale prices to resellers and retail price to end customers.

    I have only one problem, on checkout, it adds both taxes to resellers.

    What do I need to change to only charge GST from resellers?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Posts
    13
    Plugin Contributions
    0

    Idea or Suggestion Re: Charge only one tax from resellers

    Did Anyone figure this out yet?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Charge only one tax from resellers

    You'll need to write new code to exclude taxes from certain customers.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jan 2006
    Posts
    13
    Plugin Contributions
    0

    Default Re: Charge only one tax from resellers

    Thaks for replying, but I really am not sure how to do that.

  5. #5
    Join Date
    May 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: Charge only one tax from resellers

    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
    Last edited by harmeet; 13 Aug 2006 at 10:19 PM.

  6. #6
    Join Date
    May 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: Charge only one tax from resellers

    Here is the link to the Dual Pricing module -

    http://www.zen-cart.com/forum/showthread.php?t=35450

    Thanks

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

  8. #8
    Join Date
    Dec 2006
    Posts
    5
    Plugin Contributions
    0

    Default Setting Up a Wholesale & Retail Store

    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
    Last edited by Kim; 20 Jan 2007 at 01:11 AM. Reason: Post moved. Please do not start a new thread. Thanks

  9. #9
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: Setting Up a Wholesale & Retail Store

    i didn't bother with installing the dual pricing module as it seemed like to much trouble as my site is allready very customized, but i'm curious about the tax exemption module

  10. #10
    Join Date
    Apr 2007
    Location
    California, USA
    Posts
    233
    Plugin Contributions
    0

    Default 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
    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?????

 

 
Page 1 of 2 12 LastLast

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

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