Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Online Store 2.0 - App block data is not re-rendering after variant change

14 0 3


I have been developing a store 2.0 theme app extension. The app creates app block on product page. The data in the block must change upon selecting a different variant.

For example - app block should display the selected variant-id, but when the variant is changed, the app block does not get refreshed and does not shows the newly selected variant-id. What am i doing wrong ?
Below is the code of the app-block.liquid code - 


<div id="test-app-id">
  <p> Variant-id = {{ }}</p>

{% schema %}
  "name": "Back in Stock",
  "templates": ["product"],
  "target": "section",
  "stylesheet": "styles.css",
  "javascript": "main.js",
  "settings": []
{% endschema %}


I have been stuck with this for couple of days. Any help very appreciated.

Replies 0 (0)