Jump to content
ltempest

Display Best Sellers block with Tax on prices

Recommended Posts

How do I modify the Best Sellers block to display the prices without TAX (VAT?)

 

What file do I need to modify and how?

 

Thanks

 

Lee

Share this post


Link to post
Share on other sites

I also have the same exact problem... Did you manage to find a solution or can anybody out there please help??

Share this post


Link to post
Share on other sites

I already answered on your old post here

 

snapback.pngltempest, on 21 mai 2012 - 05:17 , said:

 

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)

 

Edited by georgesaidou (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More