ltempest Posted May 21, 2012 Share Posted May 21, 2012 HELP! The blockbestsllers-home.tpl displays the best selling products on my site. However it displays the price including Taxes / VAT. How can I change this so it displays the prices without taxes / VAT? I it this line within blockbestsellers.php that needs changing: $bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency); Please help! Thanks Lee Link to comment Share on other sites More sharing options...
ltempest Posted August 21, 2012 Author Share Posted August 21, 2012 Can anyone help? The site is live an dclient is not happy this has not been resolved? Thanks Lee Link to comment Share on other sites More sharing options...
georgesaidou Posted February 8, 2013 Share Posted February 8, 2013 HELP! The blockbestsllers-home.tpl displays the best selling products on my site. However it displays the price including Taxes / VAT. How can I change this so it displays the prices without taxes / VAT? I it this line within blockbestsellers.php that needs changing: $bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency); Please help! Thanks Lee I'm on prestashop 1.4.9 and I'm using the module blockbestsellers2. Open the file blockbestsellers2.php and find the line 122 $bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])),$currency); It's, as you said, the line you have to modify. Just add ", false" after ($bestseller['id_product']) it'll set the argument $usetax to false $bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product']),false),$currency); For your general knowledge, here is the definition of the function getPriceStatic public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = NULL, $decimals = 6, $divisor = NULL, $only_reduc = false, $usereduc = true, $quantity = 1, $forceAssociatedTax = false, $id_customer = NULL, $id_cart = NULL, $id_address_delivery = NULL) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now