Hello I am using ORIGIN 13.0.1 theme and i want that when the customer opens my store in the main page the featured product would not be shown as the first picked variant, but the first picture would be default, which is set on the product edittor. Any suggestions on how to fix that?
Topic summary
A user working with the ORIGIN 13.0.1 theme wants to prevent featured products on the main page from displaying the first selected variant’s image. Instead, they want the first image set in the product editor to appear as the default.
Proposed Solution:
- Create a product metafield (e.g.,
my_namespace.preview_image) with type “Image” in Shopify admin - Modify the theme’s
featured-product.liquidfile to check for this metafield value first - If the metafield is set, use it as the preview image
- If not set, fall back to the default product image
This approach allows manual control over which image displays for featured products, bypassing variant-based image selection.
To set up a solution using a metafield for setting a preview image as the first image on a featured product section, you will need to follow these steps:
-
Create a product metafield in your Shopify admin. For example, create a metafield with the namespace and key my_namespace.preview_image. Set the type to “Image”.
-
In your theme’s featured-product.liquid file (or wherever your featured product is rendered), update the code to check for the metafield value first as the product’s preview image. If the metafield is not set, fallback to the default product image.
{% assign preview_image = product.metafields.my_namespace.preview_image %}
{% if preview_image %}
{% elsif product.images.size > 0 %}
{% else %}
{% endif %}