Skip to product information
1 of 1
Published:2024.09.06

Example of settings that allow you to specify which variant will be displayed first on collection and product detail pages in the Shopify themes "Dawn" and "Rise".

Example of settings that allow you to specify which variant will be displayed first on collection and product detail pages in the Shopify themes "Dawn" and "Rise".

Applications

  • Product information management and editing

How to implement

  • LIQUID
View full details

When using Shopify for products with multiple variations (variants), you may not necessarily want to display the default size or color first. This is an example of how to set the variant to be displayed when transitioning from the product listing page in the "Dawn/Rise" theme.


Example of settings that allow you to specify the first variant displayed on collection and product detail pages in the themes "Dawn" and "Rise".


[Method 1] Create a single product metafield with the "product variation" format named "custom.initial_variant"


[(For the Rise theme) Setup step 2] Add the code to "snippets/card-product.liquid" and replace `card_product.featured_media` with another variable.


[(For the Rise theme) Setup step 3] Add code to the href attribute value of multiple product links (A tags) in "snippets/card-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 code to "snippets/card-product.liquid" ①

Add code to "snippets/card-product.liquid" ②