Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
88
rated 0 times [  93] [ 5]  / answers: 1 / hits: 19879  / 12 Years ago, wed, april 25, 2012, 12:00:00

I am using WooCommerce & WooShop Theme for Wordpress.



I need to display the Product Price EXCLUDING tax on Single Product Page.



There are 2 functions if I understand correctly:



$_product->get_price()

$_product->get_price_excluding_tax()






and this is Price.php (Under Single Product)



<p itemprop=price class=price><?php echo $product->get_price_html(); ?></p>


which leads to



  'price_html' => '<span class=price>'.$variation->get_price_html().'</span>',


Any ideas?



THANKS!


More From » php

 Answers
9

I know this question is old, but here's a go for anyone else looking for an answer to using those functions in the proper way.



I found that when I used $_product->get_price_excluding_tax() it would return the full price.



However, after adjusting a setting in WooCommerce, it now appears correctly.



You should tick the box the says Catalog prices defined including tax.



Tax



You also need to make sure that you have a tax rule setup in the 'Tax' tab. I setup one for UK VAT at 20%.



Tax



Hope that this helps somebody in future.



Thanks,
Mikey.


[#85990] Tuesday, April 24, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pranavrorys

Total Points: 466
Total Questions: 87
Total Answers: 115

Location: Barbados
Member since Sun, Nov 27, 2022
2 Years ago
pranavrorys questions
Fri, May 27, 22, 00:00, 2 Years ago
Thu, Oct 28, 21, 00:00, 3 Years ago
Sat, May 30, 20, 00:00, 4 Years ago
Fri, Dec 20, 19, 00:00, 5 Years ago
;