PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

[Solved] Product price

9 replies to this topic
#1
tiagosilva

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
Hello, I would like to implement a logic in my pages of products when the product price is equal to 0 (== 0) would not show the price, and when it is greater than 0 (> 0) show the price normally ..
Anyone have one suggestion?

Attached Files



#2
tiagosilva

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
anyone can help?
Please

#3
tiagosilva

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
I need this help, please anyone have one suggestion?

#4
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5753 posts
Edit /themes/prestashop/product.tpl

Look for



and replace it with

getPrice(true, $smarty.const.NULL, 2) == 0}style="display:none"{/if}>


Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#5
tiagosilva

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
Thanks, this work good..
I try to put same code in product-list.tpl but this fail, this deleted all information, including the button to see the product..
Can help me in code for product-list.tpl?

Attached Files



#6
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5753 posts
Instead of
$product->getPrice(true, $smarty.const.NULL, 2)
Use
$product.price
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#7
tiagosilva

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
i try to insert this code but dont have work..
anyone can help to insert this logic here in product-list.tpl


{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc} {/if}
{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Available'}{/if}


#8
tiagosilva

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
i need help please, you can help me?

#9
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5753 posts



Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#10
tiagosilva

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
Thanks, this work good..
;D
i will change title for solved..