provide me sample code to show a product with variants on homepage in Shopify
It must be theme based different but you can try this
Or you can also use feature product section on home page which is available in all theme
but you can use custom code like this, try to add this code in custom liquid section
//you can assing product hande here that you want to disply on home page
{% assign pro_handle = 'your-product-handle' %}
{% assign product = all_products[pro_handle] %}
{% if product %}
# {{ product.title }}
// this is Js code to manage variant callback
{% endif %}