Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Showing price with and without tax

    Quote Originally Posted by sn0ut View Post
    thanks for the reply mate... added that code and tested.

    It seems to ignore the if statement and just does the first oart for every product, so it shows every product as being tax free!

    Is $products_tax defined somewhere or should I redeclare it again in that page?
    Sorry I should have tested the code before posting

    Try this

    PHP Code:
    function display_price($products_price$products_tax$quantity 1) { 
    if (
    $products_tax ='0'){ 
     return 
    $this->format ($products_price $quantity) . '  No Tax';  
     }else{ 
      return 
    $this->format ($products_price $quantity) . '&nbsp;ex. <img border="0" src="images/pixel_trans.gif" width="2%" height="1"><span class="incvat">' $this->format (zen_add_tax($products_price$products_tax)* 1.175$quantity) . ' inc.' '</span>'
    return 
    $return_this
          } 
        }   

    So if the products tax rate is '0' it will show price no tax

    Dave

  2. #12
    Join Date
    Oct 2005
    Location
    UK - London
    Posts
    68
    Plugin Contributions
    4

    Default Re: Showing price with and without tax

    thanks for your time and the reply m8..

    Does this work on your store? because I modified the code and it does not seem to work. I tried changing the tax value to 17.5 and swapping the returns over still does not work.

    Im thinking it could be a modification that have made to my store.

    EDIT:

    Made it work on my store by adding a < before the equals sign:

    PHP Code:
    function display_price($products_price$products_tax$quantity 1) { 
    if (
    $products_tax <='0.0000'){ 
     return 
    $this->format ($products_price $quantity) . '&nbsp; No Tax';  
     }else{ 
      return 
    $this->format ($products_price $quantity) . '&nbsp;ex. <img border="0" src="images/pixel_trans.gif" width="2%" height="1"><span class="incvat">' $this->format (zen_add_tax($products_price$products_tax)* 1.175$quantity) . ' inc.' '</span>'
    return 
    $return_this
          } 
        }   

    Thanks for your help :)

  3. #13
    Join Date
    Nov 2006
    Posts
    44
    Plugin Contributions
    0

    Default Re: Showing price with and without tax

    Execellny Guide, Thanks Dave. Thought i'd bump this post. I would add this to tutorials or pin it tbh!

  4. #14
    Join Date
    Nov 2006
    Posts
    44
    Plugin Contributions
    0

    Default Re: Showing price with and without tax

    I done a quick edit of the code so that if you just want it to say Inc Vat and not the Ex Vat.

    PHP Code:
    function display_price($products_price$products_tax$quantity 1) { 
    if (
    $products_tax <='0.0000'){ 
     return 
    $this->format ($products_price $quantity) . '&nbsp; No Tax';  
     }else{ 
    return 
    $this->format (zen_add_tax($products_price$products_tax)* 1.175$quantity) . '<span class="incvat">' ' inc. vat' '</span>';
    return 
    $return_this
          } 
        }   



    Hope this is of some help to yous peoples.

  5. #15
    Join Date
    Sep 2005
    Location
    London
    Posts
    95
    Plugin Contributions
    0

    Default Re: Showing price with and without tax

    Does this work with price by attribute?

    We tried it and it worked fine on the products themselves but completely screwed up when priced by attribute. The attribute box includes all the formatting code rather than just the two prices.

  6. #16

    Default Re: Showing price with and without tax

    We sell a fair bit to the USA from Northern Ireland and I wonder if there is a way to only show IncVAT if the person is shopping in £s or Euros?

    Cheers

  7. #17

    Default Re: Showing price with and without tax

    Has anyone got any ideas about this?

  8. #18
    Join Date
    Jun 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Showing price with and without tax

    ..might be an allnighter... hiih. nice one

  9. #19
    Join Date
    Jul 2010
    Location
    Kent UK
    Posts
    50
    Plugin Contributions
    0

    Default Re: Showing price with and without tax

    This seems like a primitive method of doing this, especially as vat has now gone up to 20%! you should maybe try to use variables instead of hardcoding the current tax rate of one country. You have also failed to take into account other currencies and wont be able to use the european tax module.....

  10. #20
    Join Date
    Jan 2011
    Posts
    58
    Plugin Contributions
    0

    Default Re: Showing price with and without tax

    Hi.

    I did try the code Dave1 gave, it works only for one currency.

    When I change my currency code, i got a blank screen.

    Also, I use attribute pricing bt it displays the price with VAT also..
    How to make attribute pricing not affected by the VAT stuff?

    I really need a quick fix for it!!

    HELLLLPPPPP!!!

    Thanks

    Liizz

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 1
    Last Post: 21 Jul 2009, 10:40 PM
  2. Show price with and without tax
    By roscoeh in forum Basic Configuration
    Replies: 0
    Last Post: 14 Jan 2008, 09:18 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