Skip to product information
1 of 1
Published:2024.10.09

An example of a setting that hides a metafield if the metafield of the target product has no value when adding a block linked to the metafield on the product page of the Shopify theme "Rise/Dawn"

An example of a setting that hides a metafield if the metafield of the target product has no value when adding a block linked to the metafield on the product page of the Shopify theme "Rise/Dawn"

Applications

  • Product information management and editing

How to implement

  • LIQUID
View full details

On the product page of the Shopify theme "Dawn/Rise," you can link the contents of product metafields to block elements, etc., but sometimes metafields are not available for all products. In such cases, this is an example of how to hide them.


An example of a setting that hides a metafield if the metafield of the target product has no value when adding a block linked to the metafield on the product page of the Shopify theme "Rise/Dawn"


[(For the Rise theme) Setting procedure ①] Add the schema to "sections/main-product.liquid" and the label to "ja.schema.json"


[(For the Rise theme) Setting procedure ②] Add the code to the {%- when 'collapsible_tab' -%} condition in "sections/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

Add schema to "sections/main-product.liquid"

Add a label to "ja.schema.json"

Add the code to the {%- when 'collapsible_tab' -%} condition in "section...

Related Post