Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Speicals and Sales Tax Not Included

    Hello

    I have a little problem with taxes not being included in sales and specials tags. The price is calculated correctly -- it's just the visual that is showing as wrong.

    Example:

    Product price: Was $50 now $40
    Save: $9.09 (this should read $10)

    The problem is on all pages where a special or sale price is shown.

    All prices are calculated properly, so there's no problem when going through checkout, etc. It's just very confusing when a client sees a figure that doesn't add up.

    Any ideas on how I could correct this please?

    Thanks.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Speicals and Sales Tax Not Included

    Quote Originally Posted by MortalWombat View Post
    Hello

    I have a little problem with taxes not being included in sales and specials tags. The price is calculated correctly -- it's just the visual that is showing as wrong.

    Example:

    Product price: Was $50 now $40
    Save: $9.09 (this should read $10)

    The problem is on all pages where a special or sale price is shown.

    All prices are calculated properly, so there's no problem when going through checkout, etc. It's just very confusing when a client sees a figure that doesn't add up.

    Any ideas on how I could correct this please?

    Thanks.
    How does 9.09 come into play? There seems to be a lot missing from the description of the setup including an example of this issue. What other plugin(s) are installed?

    Does the same issue appear when temporarily switching to the default template?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Re: Speicals and Sales Tax Not Included

    Quote Originally Posted by mc12345678 View Post
    How does 9.09 come into play? There seems to be a lot missing from the description of the setup including an example of this issue. What other plugin(s) are installed?

    Does the same issue appear when temporarily switching to the default template?
    Apologies for not being entirely clear.

    $9.09 is $10 missing the 10% tax component (sorry, I forgot to mention the tax amount). So the product price is $50 with a $10 reduction, making it $40. The 'Save $x.xx' part should show 'Save $10', but it instead shows 'Save $9.09'. I've attached an image as an example. $11.82 should be $13 (11.82 + 10% = 13).

    After looking into the problem more since posting this thread, I've discovered that the issue stems from the custom template I have installed, which has altered the framework of pricing functions. I can't remove the pricing alterations the template has made, as the template is based on the alterations. Following is the functions snippet:

    PHP Code:
    // Price Functions Improvement
    function pt_get_discount_amount($products_id) {
      global 
    $db$currencies;

      
    $show_sale_discount '';

      
    $display_normal_price zen_get_products_base_price($products_id);
      
    $display_special_price zen_get_products_special_price($products_idtrue);
      
    $display_sale_price zen_get_products_special_price($products_idfalse);

      if (
    SHOW_SALE_DISCOUNT_STATUS == '1' and ($display_special_price != or $display_sale_price != 0)) {
        if (
    $display_sale_price) {
          if (
    SHOW_SALE_DISCOUNT == 1) {
            if (
    $display_normal_price != 0) {
              
    $show_discount_amount number_format(100 - (($display_sale_price $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS);
            } else {
              
    $show_discount_amount '';
            }
            
    $show_sale_discount $show_discount_amount PRODUCT_PRICE_DISCOUNT_PERCENTAGE;

          } else {
            
    $show_sale_discount $currencies->display_price(($display_normal_price $display_sale_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT;
          }
        } else {
          if (
    SHOW_SALE_DISCOUNT == 1) {
            
    $show_sale_discount number_format(100 - (($display_special_price $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS) . PRODUCT_PRICE_DISCOUNT_PERCENTAGE;
          } else {
            
    $show_sale_discount $currencies->display_price(($display_normal_price $display_special_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT;
          }
        }
      }

      return 
    $show_sale_discount;


    I've compared the above coding to what's in functions_prices.php, but I can't work out what needs to be altered/added/removed. Normally I would be bringing this up with the template author, and have sent an email for his help, but due to personal problems, he is unavailable for the time.
    Attached Images Attached Images  

  4. #4
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Speicals and Sales Tax Not Included

    Is this one marked as a sale or a special? There is actually ZC code that does all this, but if it is necessary to independently do these calculations, then let's see what is needed...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Speicals and Sales Tax Not Included

    Is there a reason that you have SHOW_SALE_DISCOUNT not set to 1?
    That appears in the code to be the reason that tax is factored into the price.

    If there is a reason, then yes would need to change the calculation(s).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Re: Speicals and Sales Tax Not Included

    Quote Originally Posted by mc12345678 View Post
    Is this one marked as a sale or a special? There is actually ZC code that does all this, but if it is necessary to independently do these calculations, then let's see what is needed...
    This is a sale item. However, the problem applies to both sales and specials.

    I am aware that Zen Cart has its own code for pricing, but as I said, this piece of code is a part of the template I'm using, and it has been coded through the store.

    Quote Originally Posted by mc12345678 View Post
    Is there a reason that you have SHOW_SALE_DISCOUNT not set to 1?
    That appears in the code to be the reason that tax is factored into the price.

    If there is a reason, then yes would need to change the calculation(s).
    I actually don't know anything about the whys of the code, as I didn't personally write it. As there are a few instances of SHOW_SALE_DISCOUNT, I assume you're referring to the third line, since it's the only one without a value... Unfortunately, entering '1' there only adds a sale tag with 'Save 1' to items that are not on sale and makes no difference to the sale items.

  7. #7
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: Speicals and Sales Tax Not Included

    Quote Originally Posted by MortalWombat View Post
    This is a sale item. However, the problem applies to both sales and specials.

    I am aware that Zen Cart has its own code for pricing, but as I said, this piece of code is a part of the template I'm using, and it has been coded through the store.
    what template are you using btw?

    I actually don't know anything about the whys of the code, as I didn't personally write it. As there are a few instances of SHOW_SALE_DISCOUNT, I assume you're referring to the third line, since it's the only one without a value... Unfortunately, entering '1' there only adds a sale tag with 'Save 1' to items that are not on sale and makes no difference to the sale items.
    I'm not sure, but I don't think he was asking you to change the code there. I interpreted it to mean do you ever set SHOW_SALE_DISCOUNT to 2. You set this in the configuration under product information. If it is 1 then it means you want to show the sale as a %off. If it is 2, you want to show it as the amount off.

    You also have two tax settings in the configuration. One asks if you want to display prices with tax, the other if you want to display prices in the admin with tax. What do you have these set to? Those two are under configuration, my store.

    Linda

  8. #8
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Re: Speicals and Sales Tax Not Included

    Quote Originally Posted by lruskauff View Post
    what template are you using btw?
    The template is called Morphling. It's a premium theme available on ThemeForest (however, due to what I mentioned earlier, the item is temporarily unavailable).

    Quote Originally Posted by lruskauff View Post
    I'm not sure, but I don't think he was asking you to change the code there. I interpreted it to mean do you ever set SHOW_SALE_DISCOUNT to 2. You set this in the configuration under product information. If it is 1 then it means you want to show the sale as a %off. If it is 2, you want to show it as the amount off.

    You also have two tax settings in the configuration. One asks if you want to display prices with tax, the other if you want to display prices in the admin with tax. What do you have these set to? Those two are under configuration, my store.

    Linda
    Ah, OK -- I hadn't read it like that, but that perhaps makes more sense...

    The product info configuration option is always set to 2 (amount off) in this store, and the two tax options are both set to true (display prices with tax included).

  9. #9
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: Speicals and Sales Tax Not Included

    Quote Originally Posted by MortalWombat View Post
    The template is called Morphling. It's a premium theme available on ThemeForest (however, due to what I mentioned earlier, the item is temporarily unavailable).
    I just asked because usually a template will change the way an item displays but not a way an item is computed.

    Ah, OK -- I hadn't read it like that, but that perhaps makes more sense...

    The product info configuration option is always set to 2 (amount off) in this store, and the two tax options are both set to true (display prices with tax included).
    Ok. So on your picture below, it has a price of: 32.50. Is that the price WITH or WITHOUT tax included? It should be the price with tax, because of the option you set above.

    Linda

  10. #10
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Re: Speicals and Sales Tax Not Included

    Quote Originally Posted by lruskauff View Post
    I just asked because usually a template will change the way an item displays but not a way an item is computed.
    Yes, I know... I have no idea why the author altered the way prices are computed, and of course was not aware of the change until I began the template installation.

    Quote Originally Posted by lruskauff View Post
    Ok. So on your picture below, it has a price of: 32.50. Is that the price WITH or WITHOUT tax included? It should be the price with tax, because of the option you set above.

    Linda
    All prices in the store, including the two lower ones shown in the attached screenshot ($32.50 and $19.50), are tax INclusive -- that is, EXCEPT for the price showing the amount saved ($11.82), which is EXclusive of tax.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v151 Sales tax shows for out of state but correctly not included in total
    By perfcomp in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 12 Dec 2012, 09:10 AM
  2. Can I show "Tax incl" and "tax not included" right behind the price
    By elektroarena in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 19 Jul 2012, 08:21 AM
  3. Sales Tax not Included?
    By alwiyah in forum General Questions
    Replies: 0
    Last Post: 26 Mar 2011, 01:19 AM
  4. Sales tax included in Out of state sales
    By kb9k in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 19 Feb 2011, 11:22 PM
  5. Replies: 0
    Last Post: 13 Jun 2008, 12:57 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