Skip to product information
1 of 1
Published:2023.05.13Last updated:2025.01.10

How to display comments (HTML tags are also OK) set for each variant in the Shopify theme "Dawn"

How to display comments (HTML tags are also OK) set for each variant in the Shopify theme "Dawn"

Applications

  • Product information management and editing

How to implement

  • Javascript
View full details

We sometimes receive requests to display product information on Shopify by switching part of the product information for each variation. There are various ways to do this, but here is an example of implementation using the variation meta field.

*The theme structure is different from the Dawn version used in the post in May 2023, so the code has been replaced with the latest theme.)

How to display comments (HTML tags are also OK) set for each variant in the "Dawn" theme


[Settings Step 1] Add a variant metafield definition and edit the metafield on the variant details screen of the target product.


[Settings Step 2] Add the scheme to "main-product.liquid" and the label to "ja.schema.json"


[Settings Step 3] Add code to "main-product.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

Scheme of main-product.liquid


ja.schema.json


Display side code of main-product.liquid

Related Post