Most popular variant
Display or highlight the most sold variant of a product to leverage social proof and boost customer confidence. Shoppers are drawn to popular choices, and highlighting a best-seller creates FOMO, encouraging faster purchases and driving more sales.
This metafield is automatically updated for products that are part of the shop's orders during the past 60 days. If no orders in the past 60 days mention the product, the metafield is deleted. The value of the metafield will be the most ordered variant (by ordered quantity) within the product across the orders.
Details
- Name
espresso.most_popular_variant
- Description
Metafield namespace and key
- Name
variant_reference
- Description
Metafield type
- Name
product
- Description
Scope of Shopify object that owns the metafield
When you initially enable this metafield, the individual product metafields will be set in a background task. If you have a large catalog, this may take anywhere from a few minutes to a few hours. Once the metafields are set, they will be updated in real-time
Example implementation
{% assign most_popular_variant = product.metafields.espresso.most_popular_variant.value %}
{% if product.selected_or_first_available_variant.id == most_popular_variant.id %}
<p>
{{ most_popular_variant.title }} is the most popular variant of {{ product.title }}.
</p>
{% endif %}