Jump to content

Show prices with and without tax - PS 1.7


Recommended Posts

Hi,

Maybe this might be a bit more complicated than I think but i'm hoping someone can shed a light..

I've set prices, in all user groups, to be presented without tax. But I need to show in tiny letters, in list view and product page, the price with tax.

I've tried to add:

{l s='%price% tax inc.' d='Shop.Theme.Catalog' sprintf=['%price%' => $product.price_tax_inc]}

But that's me making up something that doesn't exist 😕

Any help?

Edited by taniacr (see edit history)

Share this post


Link to post
Share on other sites
1 minute ago, tapanda.gr said:

Did you try price_ti? It's tax_included in abbreviation 😉

Hi. Yes. Doesn't work.

Decided to purchase a module so problem solved. I guess some things are better left to who understands them better 😀

Share this post


Link to post
Share on other sites

You could fix it with math function in smarty. Math netto price * 1.24 (assuming that 24% is the tax)

Next time you need any modification, don't hesitate to send a message. We do specialize solely in PrestaShop.

Share this post


Link to post
Share on other sites
  • 9 months later...
On 3/27/2019 at 7:23 PM, tapanda.gr said:

You could fix it with math function in smarty. Math netto price * 1.24 (assuming that 24% is the tax)

What if different products have a different tax?
In my opinion I give a better solution:

First in mymodule.php

$prajs = $product->price * (1+($product->tax_rate/100));
$brutto = number_format($prajs, 2, ',', '');

$this->context->smarty->assign('brutto', $brutto);

then in mymodule.tpl

{$brutto}


 

  • Like 2

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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