How To Hide Price Of All Sold Products?

How to hide price of all sold products?

Can you provide more detail? Do you mean sold-out products?

Can you provide more detail? Do you mean sold-out products?


Yes. Most my products are just 1 in stock. So id like to hide price of sold out ones so nobody could compare to newly added

You would have to add a couple of hooks to remove price if amount (quantity) < 1.

Please take a look

http://forum.cs-cart.com/topic/50576-zero-price-action-need-to-not-display-price/#entry290000

Thank you both. If someone else need this, open file product_data.tpl

or better override hook, or whole template

since I am already overriding whole template file, got this

templates / addons / my_changes / overrides / common / product_data.tpl

What I did was below
{hook name="products:prices_block"}

added

{if $product_amount <= 0 }
                {__("out_of_stock_products")}
            {else}

then before

{/hook}

added

{/if}

works well!

I don't believe product_data.tpl is used for listing pages which is why I recommended addressing conditional data using PHP hooks. Also, modifying distributed files when hooks are available is never a good option.

product_data.tpl is used wherever a product is displayed, also for listing pages.