I'm using schema to customize the way user can set things on Shopify. So my code is like this:
{
"type": "number",
"id": "product_variant_id",
"label": "Product ID"
}
If I run a console log on this i'm getting product handle:
product-handle-from-collection-x
It is possible to retrieve the first product variant ID of this product?
- I tried to use {{ all_products["product-handle-from-collection-x"].first_available_variant.id }}
- It works on Product Page. Not on Checkout