Changing a Product Price to POA (or Call for information) (Please Help)

Highlighted
New Member
3 0 0

Hi everyone,

I know very little about coding and have only been dabbling for the past few weeks as the company I work for recently jumped ship to shopify for our website and online shop.

I have been trying to get the products listed as "$0.00" to instead display "POA", but something is changing it back to "0.00". You can visibly see "POA" displayed when the page is first loaded, but it quickly dissappears.

Can anyone help me?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
5704 0 289

Hi Luke!

You can visibly see "POA" displayed when the page is first loaded, but it quickly dissappears.

What you write in the product.liquid template inside those HTML tags, that content, is overitten with JavaScript. Hence the flash of right content, and your desperation ;)

I have gone ahead and modified your JavaScript file here. ← that link will only work for you, it's a general link and won't reveal the address of your store. Look at line no 159.

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
1 Like
Highlighted
New Member
3 0 0

Wow, Thank you so much, Caroline! And thank you for the extremely fast response. I seriously appreciate the help.

I have been playing with this for around two days now. Any ideas on why it doesnt display as POA on the collection listings? for example, if you go to "shop by type", the prices of each product are still displayed as 0.00

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
5704 0 289

I am so happy I could help, Luke!

As for the product listings, you need to edit the code here.

From this:

<strong>{{ product.price | money }}</strong>

To that:

{% if product.price == 0 %}
<strong>POA</strong>
{% else %}
<strong>{{ product.price | money }}</strong>
{% endif %}

 

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
1 Like
Highlighted
New Member
3 0 0

Thank you again! not only for your help, but for showing me how to do it :D

That is exactly what I needed. I have a lot to learn >.<

0 Likes
Highlighted
Shopify Staff
Shopify Staff
5704 0 289

You're doing great, it's not easy!

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
0 Likes
Highlighted
New Member
1 0 0

I'm new to Shopify and am trying to do the same thing as Luke. Thank you for sharing how to edit the product listings code, Caroline. Would you or someone else please be able to share how you did the first step with the JavaScript?

Thanks so much!

0 Likes
Highlighted
Shopify Partner
1 0 0

I'm facing the same problem. Can anyone post an example of the javascript code to change?

I've edited product.liquid as follows, but javascript somewhere is overwriting it once the page loads.

{% if product.tags contains 'poa' %}
  <p id="product-price">
     <span class="product-price" itemprop="price">Please contact us for pricing.</span>
  </p> 
{% else %}
  <p id="product-price">
    {% if product.compare_at_price > product.price %}
      <span class="product-price on-sale" itemprop="price">{{ product.price | money }}</span>&nbsp;<span class="product-compare-price">{{ product.compare_at_price_max | money }}</span>
    {% else %}
      <span class="product-price" itemprop="price">{{ product.price | money }}</span>
    {% endif %}
  </p>          
{% endif %}

 

0 Likes
Astronaut
1890 1 395

If there is Javascript that is changing the text, just remove the ids and classes from the elements that are changing.  (In this case, you can also remove the span tag completely.)

{% if product.tags contains 'poa' %}
  <p>
     Please contact us for pricing.
  </p>
{% else %}

I hope this helps.

0 Likes
Highlighted
New Member
1 0 0

Hi Carolyn, I tried putting this code in the product.liquid file of the Minimal theme. The system still reported 0.00.. Any ideas? thanks

0 Likes