How would I go about changing the “Add To Cart” Button to say “Download Now” for the free digital products we’re offering on the store.
I would like to change this for specific products only, not all of them.
A user wants to change the “Add to Cart” button text to “Download Now” specifically for free digital products, not all products in their store.
Proposed Solution:
Implementation Example:
The suggested code checks if the product template suffix equals “downloads” and displays “Download” instead of the default “Add to cart” text. For sold-out items, it maintains the standard “Sold out” message.
Additional Notes:
How would I go about changing the “Add To Cart” Button to say “Download Now” for the free digital products we’re offering on the store.
I would like to change this for specific products only, not all of them.
@SuenosBeats You’d have to find the relevant area of code, product-info.liquid, buy-buttons.liquid etc and find the text translation output to wrap it in liquid logic.
If you need this customization then contact me directly by mail for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.
Either use the product handles, a specific tag, or use an alternate template to indicate these different products.
Example location for Dawn themes
https://github.com/Shopify/dawn/blob/main/snippets/buy-buttons.liquid#L91
and example logic
{%- if product.selected_or_first_available_variant.available == false or quantity_rule_soldout -%}
{{ 'products.product.sold_out' | t }}
{%- else -%}
{% if product.template_suffix == "downloads" %}
Download
{% else %}
{{ 'products.product.add_to_cart' | t }}
{%- endif -%}
{%- endif -%}