Skip to product information
1 of 0
Published:2024.02.01

Example of setting to allow Shopify's product purchase button label to be changed for each template file from the theme editor

Example of setting to allow Shopify's product purchase button label to be changed for each template file from the theme editor

Applications

  • Product information management and editing

How to implement

  • LIQUID
View full details

In Shopify, the label of the "Add to Cart" button can normally be changed by "Editing Default Theme Content", but this is an example of a setting that allows you to specify the label for each template using the theme editor.


Example of setting to allow the product purchase button label to be changed for each template file from the theme editor


[Settings Step 1] Add a schema to "main-product.liquid" and a label to "ja.schema.json"


[Settings Step 2] Replace some of the code in main-product.liquid and buy-button.liquid


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

Add schema to "main-product.liquid"

Add a label to "ja.schema.json"

Related Post