Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Change all products prices to apply taxes - how to?

    Hi,

    I'm having this issue: when I started to run the store I set all products prices as gross (including taxes) and set tax lsaa to none.
    No I want to show both prices including and axluding taxes, but of course my database has the net and gross price set equal and no tax selected.

    I need to set for all products a class category (example "VAT22"), and change all net prices to reflects this formula: net + VAT 22% = gross.
    I only have gross price.

    How could I do it? Could I perform it with some SQL commands? Could you please help me out?

    Thank you.

  2. #2
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Change all products prices to apply taxes - how to?

    You should be able to use the built in functions

    Examples

    with tax and specials applied
    zen_get_products_actual_price(PRODUCT_ID_HERE);

    without tax
    zen_get_products_base_price(PRODUCT_ID_HERE);

  3. #3
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Change all products prices to apply taxes - how to?

    Hi,

    I have installed Dual Pricing and now I'd like to show:

    - price including taxes for retail users $_SESSION['customer_whole'] 0
    - price excluding taxes for wholesalers $_SESSION['customer_whole'] 1
    - in any case the grand total should apply taxes for both.

    How could I specificy it? Any tip with the code?

    Thank you very much for your help.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Change all products prices to apply taxes - how to?

    grand total should apply taxes for both
    Really???
    Usually selling to wholesalers no tax is collected as they eventually collect tax where applicable
    Do they provide you with a resellers license?
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Change all products prices to apply taxes - how to?

    Quote Originally Posted by kobra View Post
    Really???
    Usually selling to wholesalers no tax is collected as they eventually collect tax where applicable
    Do they provide you with a resellers license?
    Hi not in Italy. In Italy you have to apply VAT also to wholesalers.
    then the wholesaler has a VAT credit of the amount they paid and they compensate it with the VAT they apply to customers.

    That is why I need to show prices like that and that the grand total apply taxes to everybody.
    thank you.

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Change all products prices to apply taxes - how to?

    Hopefully someone familiar with VAT will come across this posting
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Change all products prices to apply taxes - how to?

    Quote Originally Posted by kobra View Post
    Hopefully someone familiar with VAT will come across this posting
    Not really in VAT matters but some lines of code to specify in the product listing, product information and shopping cart how to tell ZC to show prices excluding VAT to wholesale users and including VAT to regular users would be great...

    Hope so...
    Thanks

  8. #8
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Change all products prices to apply taxes - how to?

    Quote Originally Posted by ilmarchez View Post
    Not really in VAT matters but some lines of code to specify in the product listing, product information and shopping cart how to tell ZC to show prices excluding VAT to wholesale users and including VAT to regular users would be great...

    Hope so...
    Thanks
    Ok, it appears the issue is ilmarchez would like the configuration_value of DISPLAY_PRICE_WITH_TAX to be true unless the customer is wholesale so that on checkout they are both showing taxes. Here is the fix I have for you:

    in the includes/functions/functions_taxes.php
    Change:
    PHP Code:
      function zen_add_tax($price$tax) {
        global 
    $currencies;

        if ( (
    DISPLAY_PRICE_WITH_TAX == 'true') && ($tax 0) ) {
          return 
    $price zen_calculate_tax($price$tax);
        } else {
          return 
    $price;
        }
      } 
    to:
    PHP Code:
    function zen_add_tax($price$tax) {
        global 
    $currencies;
        if (
    $_SESSION['customer_whole'] == 1) {
            return 
    $price;
        }
        if ((
    DISPLAY_PRICE_WITH_TAX == 'true') && ($tax 0)) {
            return 
    $price zen_calculate_tax($price$tax);
        } else {
            return 
    $price;
        }


  9. #9
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Change all products prices to apply taxes - how to?

    Quote Originally Posted by bislewl View Post
    Ok, it appears the issue is ilmarchez would like the configuration_value of DISPLAY_PRICE_WITH_TAX to be true unless the customer is wholesale so that on checkout they are both showing taxes. Here is the fix I have for you:

    in the includes/functions/functions_taxes.php
    Change:
    PHP Code:
      function zen_add_tax($price$tax) {
        global 
    $currencies;

        if ( (
    DISPLAY_PRICE_WITH_TAX == 'true') && ($tax 0) ) {
          return 
    $price zen_calculate_tax($price$tax);
        } else {
          return 
    $price;
        }
      } 
    to:
    PHP Code:
    function zen_add_tax($price$tax) {
        global 
    $currencies;
        if (
    $_SESSION['customer_whole'] == 1) {
            return 
    $price;
        }
        if ((
    DISPLAY_PRICE_WITH_TAX == 'true') && ($tax 0)) {
            return 
    $price zen_calculate_tax($price$tax);
        } else {
            return 
    $price;
        }

    Hi. I tried with your code, but it does work for regular customers only.

    When I log in as a wholesaler it calculates at the checkout the total not adding TAX. It does show taxes, but it does not add the tax to the total amount. This is ok for regular customers, not for wholesalers…. Any other idea?

    Looking at the code it seems while it discriminates if ZC has to show prices with tax included or not it does not state to add to the total amount of the checkout the tax if the customer is a wholesaler…

    To summarize, I'd need the order total to be calculated as follows:
    REGULAR CUSTOMER
    - see all prices with tax included
    - (if possible should be hidden the tax section at checkout since it may appear to double-tax them)
    WHOLESALE CUSTOMER
    - see all prices with tax excluded
    - tax amount is shown at the checkout and added to the total (VAT applied to all products and to all shipping fees as well)…

    Thank you very much.

 

 

Similar Threads

  1. how do i change prices for all items in that category?
    By mubasher in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Feb 2011, 06:20 PM
  2. How to change all prices to different currency?
    By DavidVitazka in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 7
    Last Post: 8 Feb 2009, 04:26 PM
  3. How to bulk apply tax class to all products?
    By koalabids in forum General Questions
    Replies: 3
    Last Post: 5 Jan 2009, 10:48 PM
  4. How Can I change All products prices in one time ?
    By darknes in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 29 Nov 2008, 01:59 PM
  5. Help! Prices of all products change into 0...
    By hunyuan in forum General Questions
    Replies: 5
    Last Post: 28 Mar 2008, 09:27 AM

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