How to remove Shop Pay message on a product template

I am looking at how to remove the message that says “4 interest-free installments, or from [price]/mo with shop pay check your purchasing power,” but I only want it removed from a specific product page template, not all of them, so I don’t want to disable shop pay entirely. We sell electronics and accessories for said electronics in our store, but we also repair electronics as well. I’d like for people to have the option to use shop pay for any physical goods we sell, but I want the listings for phone repairs and other services to ONLY show the price and other details, and not allow the customer to purchase the item on our site, as we take payment for repairs after they are completed to ensure success. I found out how to create a custom template for repairs that allow me to remove the add to cart button and stuff along those lines, but for some reason, the shop pay message is attached to the “Price” block on the website editor, so if I hide the price, it’ll hide the shop pay message, but… that also hides the price, which I don’t want.

I’m currently using the Dawn theme, version 13.0.1.

@HinaM

can you please share the store url? OR screenshot so that i can look into it and give you an exact solution.

thanks

Hi @HinaM As you have mentioned that you have already added a custom template for your repair product then there are few workaround that I can think of right now.

  • You can easily add the condition that if there is a normal product template then it will show the button, if not then it will not show the button.
  • You can do it in other way as well, i.e. you can do it with product handle as well, you can a specific word in the product url which will be present on all the repair product where you don’t want to show the Shop pay and add the condition.
  • You can also accomplish it with the help of product tag, i.e. if specific tag is present in the product the Shop pay button will not show.
  • Last but not the least, you can do it with collection as well, you need to create the collection for repair product and add the condition if the product is related to this collection then it will not show the shop pay button, in this customer have to go through collection page then on the Product page if they directly land on the product page it may not work.

If you will unable to implement the same then I’m happy to do this for you, let me know. I can implement the code changes so that this will work well for you.

Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!

Best Regards

Sahil

The biggest thing about this is I figured there is a way to do that, I just don’t actually know the process of going about it. Like, do I need to add code somewhere that says that, and where do I add it? I’m not at all really familiar with coding so I wouldn’t even know where to start.

Website URL is itsmysnap.com. I don’t have the template applied to every item

I do have it applied to this product though
https://itsmysnap.com/products/iphone12and12proscreen?_pos=1&_psq=iphone+12+screen&_ss=e&_v=1.0

@HinaM

you can use below liquid condition for price block

{% if template == 'regular add to cart template %}

    your price block

{% else %}

stay empty
{% endif %}

thanks

I don’t really know the best way to implement that in the code as I don’t really know anything about coding, but to me it seems like that is just going to also remove the actual price from the page if the template isn’t the default template, and it won’t remove just the shop pay line of text

@HinaM if you dont have any idea about coding then you cannot assume that the code will work on which condition. So i suggest you to hire an expert who can do this for you.

thanks

Hi @HinaM Yes you will need to take the code from the respective app that you are using and need to add in the Checkout.liquid, or if you need specific place where to add the code then, when you will collect the code the should show the instruction where they need you to add that code.

Also If you will face any difficulty in adding the code or finding it then, please let me know I will happy to help you. If you need me to accomplish it for you I will do that as well.

Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!

Best Regards

Sahil

Hi @HinaM ,

I know its been over a year but I landed here with the same issue as you. I did dive into the code via the Shopify online store theme editor to find this - if you follow these instructions you should be able to find and fix this issue. (Hopefully this will help others in the future too).

  • Navigate to Online Store

  • Click “edit code”

  • In the left nav expand “sections”

  • Edit this file: “main-product.liquid”

  • Search for “product_form_installment_id” (to search hit CTRL+f)

  • Remove this block which should look something like this:

    `<div {{ block.shopify_attributes }}>
    {%- assign product_form_installment_id = ‘product-form-installment-’ | append: section.id -%}
    {%- form ‘product’, product, id: product_form_installment_id, class: ‘installment caption-large’ -%}

    {{ form | payment_terms }}
    {%- endform -%}

    `
  • Hit “Save”

The installment block should now be removed from your product page template. You can also, if you are careful, move this block to a different place on the product page (rather than removing it).

Hope that helps!

To confirm, this is exactly what I did for my template (“Trade” theme) and you can see the installments are no longer showing for my crafted coffee products.

Happy to assist anyone that needs help with this.

@CloudLaunch

That is an over-complicated approach, and will undoubtedly be overwritten during theme updates.

If your theme doesn’t come with a setting to hide/show that message, a simple display: none css code in the “custom css” will be easier and less hassle. Removing it from main-product.liquid is way overboard lol.

That’s another way of doing it but you’ll likely get a flicker of it showing before the style is applied by the browser, which will affect CLS -a Google ranking signal. It’s also more work for the client side to render the block and then hide it. Best remove it from the page imo. Worth spending the time doing things properly.

That’s actually not proper at all. Not only are you editing a file that’s constantly being overwritten by theme updates, but every product template relies on that one file so unless you duplicate it and reference that in the json you’re removing it from every template. The theme developers put it there for a reason, and the actual proper method is to stop trying to edit the code on free themes that are frequently updated and overwritten. Buy yourself a better theme and you won’t have to do that in the first place.

Good for rare use cases, but advocating that people should go into the main-product.liquid file, that is literally the only file that all products use, and delete a bunch of stuff they know nothing about, is very bad advice…

Hello , please implement this below solution hope this will work :
Goto the product section and search the product where you want to hide the payment method then add product tag “regular” in the products

  • Navigate to Online Store

  • Click here “edit code”

  • Search file name in side the sections “main-product.liquid”

  • And search this word : product_form_installment_id

And replace this existing code to updated code :
Existing Code :
<div {{ block.shopify_attributes }}>
{%- assign product_form_installment_id = 'product-form-installment-' | append:section.id -%}
{%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%}
<input type="hidden" name="id" value="{{product.selected_or_first_available_variant.id }}">
{{ form | payment_terms }}
{%- endform -%}
</div>
{% endunless %}

Updated Code :

{% unless product.tags contains '{% unless product.tags contains 'regular' %}
<div {{ block.shopify_attributes }}>
{%- assign product_form_installment_id = 'product-form-installment-' | append:section.id -%}
{%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%}
<input type="hidden" name="id" value="{{product.selected_or_first_available_variant.id }}">
{{ form | payment_terms }}
{%- endform -%}
</div>
{% endunless %}