I have created a Shopify app in which using theme app extensions I am adding an app block to the product detail page in which I am showing the quantity of the product. Now I have to update the product quantity on the product detail page if the user changes the variant. I want the user to change the variant as soon as they change it, and an event should be triggered by changing the variant inside my app block so that I can update the app block.
2 Likes
{% schema %}
{
"name": "sales count",
"target": "section",
"settings": [
{ "type": "product", "id": "product", "label": "Product", "autofill": true },
{ "type": "color", "id": "colour", "label": "Star Colour", "default": "#ff0000" }
]
}
{% endschema %}
I have created an app from node js in which I have created app block using theme app extension. This is my code of node js of app block.I want when the variant changes on the product detail page then this variant:changed code of mine should be run so that I can update the app block.
2 Likes
Hello @Digiteon , Is that approach going to work no matter the theme?!