How to add a text-information field to Price field

Solved
BrianGalaxi
New Member
14 0 0

Hello Community,

I am setting up a store but due to the frequent fluctuations of price from my partners, I want to keep the prices of products on the site as zero(0). And instead, have a text field near the price field where I can put a notice for the potential buyer to "contact me for the current price". 

Please, can anyone advise me on how to implement this?

I appreciate any contributions.

Thank you in advance.

Accepted Solutions (2)

Accepted Solutions
ilanadavis
Shopify Expert
53 7 13

This is an accepted solution.

Hi @BrianGalaxi this is a multi-step process. Not only do you want to change the text (which can be done in the language settings not in the theme code) but you'll also want to change the link so that when the button is clicked, a customer is not taken to their cart but instead, sending you an email or directing them to the contact page.

Shopify Support should be able to help you with this as well if these docs don't work for you. https://help.shopify.com/en/manual/online-store/themes/os/customize/replace-add-to-cart

Ilana Davis, a Shopify Superhero working with e-commerce shops to remove friction from the buying process.
Owner of JSON-LD for SEO, a Shopify app that adds structured data to your theme, getting you more organic traffic through Rich Results.

View solution in original post

ilanadavis
Shopify Expert
53 7 13

This is an accepted solution.

Sorry, I'm not clear on your question @BrianGalaxi. In that help doc, select Other and it specifically talks about Debut and what code to look for.

It can be hard to contact Shopify directly but here's a link to their chat and email support: https://help.shopify.com/en/questions#/contact

Ilana Davis, a Shopify Superhero working with e-commerce shops to remove friction from the buying process.
Owner of JSON-LD for SEO, a Shopify app that adds structured data to your theme, getting you more organic traffic through Rich Results.

View solution in original post

Replies 18 (18)
AvidBrio
Shopify Expert
231 12 18

@BrianGalaxi 

here is a list of solution 

Solution first 
first, if you using paid theme like  https://themes.shopify.com/themes/parallax/styles/aspen  this theme has an option to show the price and price custom text from the theme option.

Solution second 
use the Shopify meta filed 
replace by ->   your-store-url.   = our store url
https://your-store-url.myshopify.com/admin/metafields/product/create


just copy the code into the after the line  

<span> {{ product.price }} </span> <span> {{ product.metafields.my_fields.custom_price}} </span>

Solution third 
you can edit the theme  code 

you can find the code in the theme file.  if you the code then do else you can hire experts.

<span> {{ product.price }} </span> <span> write your custom text </span>

 


If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
LitExtension
Shopify Partner
1959 324 395

What theme are you using? Or please send code sections/product-template.liquid file. I will check it.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
BrianGalaxi
New Member
14 0 0

Hello Jim,

Thanks for the response,

I am trying to implement your second solution. But when I opened the metafields/product/create ,  the three(3) fields are "Name", "Namespace and Key"  and "Description" . Please, see attached pic.

I entered some values for trial but I realized on the Product page, the newly created field is down the page and NOT positioned next to the Product Price field.

I can't see the code area  " <span> {{ product.price }} </span> <span> {{ product.metafields.my_fields.custom_price}} </span>" as you directed.

Please, how do I navigate to the code area so I can add a code like  <span> {{ product.price_notice_text }} </span> <span> {{ product.metafields.my_fields.custom_price_notice_text}} </span>

This way, the Price Notice Text will be positioned next to the Product Price to achieve the desired effect. Thank you very much.

Custom Text field.PNG

BrianGalaxi
New Member
14 0 0

Hello @LitExtension,

I am just using the Shopify Debut Theme at the moment.

 

Here's the code:

{% comment %}
The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section 'product-template' %}
{% section 'product-recommendations' %}

{% if collection %}
<div class="text-center return-link-wrapper page-width">
<a href="{{ collection.url }}" class="btn btn--secondary btn--has-icon-before return-link">
{% include 'icon-arrow-left' %}
{{ 'products.product.back_to_collection' | t: title: collection.title }}
</a>
</div>
{% endif %}

<script>
// Override default values of shop.strings for each template.
// Alternate product templates can change values of
// add to cart button, sold out, and unavailable states here.
theme.productStrings = {
addToCart: {{ 'products.product.add_to_cart' | t | json }},
soldOut: {{ 'products.product.sold_out' | t | json }},
unavailable: {{ 'products.product.unavailable' | t | json }}
}
</script>

{% assign current_variant = product.selected_or_first_available_variant %}

<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": {{ product.title | json }},
"url": {{ shop.url | append: product.url | json }},
{%- if product.featured_image -%}
{%- assign image_size = product.featured_image.width | append: 'x' -%}
"image": [
{{ product.featured_image.src | img_url: image_size | prepend: "https:" | json }}
],
{%- endif -%}
"description": {{ product.description | strip_html | json }},
{%- if current_variant.sku != blank -%}
"sku": {{ current_variant.sku | json }},
{%- endif -%}
"brand": {
"@type": "Thing",
"name": {{ product.vendor | json }}
},
"offers": [
{%- for variant in product.variants -%}
{
"@type" : "Offer",
{%- if variant.sku != blank -%}
"sku": {{ variant.sku | json }},
{%- endif -%}
"availability" : "http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : {{ variant.price | divided_by: 100.00 | json }},
"priceCurrency" : {{ cart.currency.iso_code | json }},
"url" : {{ shop.url | append: variant.url | json }}
}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
]
}
</script>

 

Thanks very much in advance.

ilanadavis
Shopify Expert
53 7 13

Hi there,

Here's a few options.

Option 1:

If you're using Debut, you need to be in the section/product-template.liquid file. You can delete or comment out the the {{ product.price }} from the liquid that displays your price.

{% comment %}
<div class="product__price">
{% include 'product-price', variant: current_variant %}
</div>
{% endcomment %}

Then, you can edit the "add to cart" button to contact us. If you still want to show variant options but just not price, you may need to get into the snippets/product-price.liquid file

 

 

Option 2:

Shopify also has docs on how to hide product prices if this is easier for you. https://help.shopify.com/en/manual/online-store/themes/os/customize/hide-product-prices

 

Option 3:

Simply hide with CSS if it's on all products.

.product__price {
display: none;
}

 

With all 3 of these options, this only hides the price visually from the page. The price will remain in the structured data and you don't want remove that from the structured data as this could impact your SEO severely. It's a required field. Removing it will cause you to lose search enhancements you may have.

Some have enjoyed a new feature with JSON-LD for SEO that allows you to hide the structured data for zero-priced products or products where you can't share the price. So you would set the variants to 0 dollars and JSON-LD for SEO will automatically hide those variants for you without impacting other search enhancements you may qualify for. https://www.ilanadavis.com/articles/json-ld-for-seo-now-hides-zero-priced-product-structured-data-by...

Ilana Davis, a Shopify Superhero working with e-commerce shops to remove friction from the buying process.
Owner of JSON-LD for SEO, a Shopify app that adds structured data to your theme, getting you more organic traffic through Rich Results.
BrianGalaxi
New Member
14 0 0

Hello @ilanadavis,

Thanks for the suggestions.

I have been reading much on the upgrading of the vintage theme but I think that is not what I need now.

Please, concerning solution Option 1, after commenting out the Product_Price how do I edit the "Add to Cart" message?  I have been going through the "cart-template.liquid" but I couldn't determine the exact message to edit or update to "Contact us"

I think this could be an alternative solution for me for now.

Thank you very much in advance.

ilanadavis
Shopify Expert
53 7 13

This is an accepted solution.

Hi @BrianGalaxi this is a multi-step process. Not only do you want to change the text (which can be done in the language settings not in the theme code) but you'll also want to change the link so that when the button is clicked, a customer is not taken to their cart but instead, sending you an email or directing them to the contact page.

Shopify Support should be able to help you with this as well if these docs don't work for you. https://help.shopify.com/en/manual/online-store/themes/os/customize/replace-add-to-cart

Ilana Davis, a Shopify Superhero working with e-commerce shops to remove friction from the buying process.
Owner of JSON-LD for SEO, a Shopify app that adds structured data to your theme, getting you more organic traffic through Rich Results.

View solution in original post

BrianGalaxi
New Member
14 0 0

 

Hello @ilanadavis,

Thank you very much for this information. I am reading through the steps. I am using the debut theme and it is sectioned. But please, how do I determine whether the theme is a narrative one or not? The instruction is to follow Narrative or Other. I have done a couple of searches on how to determine whether my debut theme is a narrative one but I couldn't get through with it.

Sorry to bother you with this, I am a newbie here and I very much appreciate your assistance.

ilanadavis
Shopify Expert
53 7 13

Narrative is a free theme in Shopify. You are using Debut so you'll select other. But if you contact Shopify they can help you specifically on this as it's their theme.

Ilana Davis, a Shopify Superhero working with e-commerce shops to remove friction from the buying process.
Owner of JSON-LD for SEO, a Shopify app that adds structured data to your theme, getting you more organic traffic through Rich Results.