How can I change product prices to POA in Dawn 3.0 theme?

Hello, I’m trying to alter prices for all products that are currently set to £0.00 to instead show as POA or similar. Other items which have a price set will display as usual. I’ve seen various code fixes but none for the Dawn theme that seem to work. I’m not really a coder, so if anyone has a simple to follow solution… Any suggestions please?

Thanks in advance

2 Likes

I’m looking for a way to do this also - did you find a solution?

1 Like

hey this is simple enough to achieve, so for example on the code section you go to:

price.liquid

and then at the very start just put:

{%- if product.price == 0 %} POA

{% else %}

And then at the very end put:

{%- endif -%}

What this does is simply tells the code that if the price is 0 then put POA, otherwise run the normal code.

This should work on your collection and product pages because they pull from the price.liquid

But make sure you set the product page so that the item is either OUT OF STOCK, or create another product page template that doesnt allow them to buy the product! You’ll probably want to create an enquiry button instead or something like that…

Best of luck!

2 Likes

hi i just commented a simple fix for this

1 Like

@tomski3000 brilliant! Thank you so much, that has worked! Hurrah :blush:

Perfect. Thank you:)

Hey man. Need your help…

I tried the above got to

price.liquid

and then at the very start just put:

{%- if product.price == 0 %} POA

{% else %}

And then at the very end put:

{%- endif -%}

and then on preview - every one of the item descriptions on the site have hundreds of lines of text like Renders a list of product’s price (regular, sale) Accepts: - product: {Object} Product Liquid object (optional) - use_variant: {Boolean} Renders selected or first variant price instead of overall product pricing (optional) - show_badges: {Boolean} Renders ‘Sale’ and ‘Sold Out’ tags if the product matches the condition (optional) - price_..

Have I missed something really obvious..

PS I’m not a developer.

Can you please help.

Followed your instructions first time and great! Tried again with the recent Dawn update and it’s no longer working :disappointed_face:

Will this work with Craft theme as well?