Hi there,
my goal is to code the backend for the admin in a way that when they insert a SKU number, it will display the concrete variant of the product on the website.
I managed to display a particular product but it always displays the main image of the product, not the variant of the product.
Example:
The product main image is 3 different socks, product variant that I am trying to display by its SKU is just one red sock. My code always displays the product main image (3 different socks).
Here is what I have and it’s working to display the main product:
{%- assign product = block.settings.product -%}
{{ product.title | escape }}
{% schema %}
...
{
"type": "product",
"id": "product",
"label": "t:sections.featured-product.settings.product.label"
},
...
{% endschema %}
Thank you!!