Change Add to Cart button text on 1 product type only

Hi, I am looking to change my Add to Cart button text. I have Dawn 2.0 theme.

I’ve found the blanket Add to Cart button text feature but I don’t want to change the button on every product type, I only want to amend it for one specific product type.

Is there a simple solution for adding a couple words to the button? Thanks.

@greenwichsocial it will need a small code change, what type of product do you have?

Hello! Yes, you need to add liquid code to your product template and it will work perfectly. Shall we get started?

Best regards and good luck with your project!

Hi :waving_hand:

In Dawn 2.0 the Add to Cart text is global by default, so to change it for only one product type you need to add a small Liquid condition.

You can do this without any apps:

  1. Go to Online Store → Themes → Edit code

  2. Open snippets/buy-buttons.liquid

  3. Find the Add to Cart text, usually:


You can add a “Custom liquid” block/section to the product page template.
Paste a code like this (of course, change the type and add-on text):

{% if product.type == "special" %}
  <style>
    [name=add]:not([disabled]) span:after {
      content: "while it's hot"; /* add-on text */
    }
  </style>
{% endif %}

Hi @greenwichsocial

You can check certain handles in Liquid to target a specific product. Wrap the button text in a conditional in your product-form snippet, like {% if product.handle == 'your-product-handle' %}Add to Cart + Extra Words{% else %}{{ 'products.product.add_to_cart' | t }}{% endif %}. This alters only the button for that product.

Hi @greenwichsocial

Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.

Best regards,
Devcoder :laptop:

Thanks so much, that seems to make sense. I’m not sure why it’s not changing when I put it through . I have put the product type in with updated wording, but it doesn’t seem to do anything? Please see my attached screenshot.

Because the product type on this product is not “default product”?

Thank you so much, that worked !