New Shopify Certification now available: Liquid Storefronts for Theme Developers

Refreshing theme-app-extension block when selecting product variant

greenaware
Shopify Partner
2 0 5

Hi,

I am developing a theme-app-extension block for the Product page. One of the values displayed in the block is specific to the current product variant. Right now it seems the block is not refreshing when the user choose between different variants. Is there a way to force re-render the block when changing to a different product variant? Anyway suggestions/hint will be greatly appreciated.

Thanks.

David

Replies 3 (3)
greenaware
Shopify Partner
2 0 5

Anyone has any idea? Ie. is it even doable?

dannycodes
Shopify Partner
5 0 2

I did something similar by detecting the change in the URL and pulling the variant ID from the `variant` query string in the URL and re-rendering. This works on many themes but not all. 

 

If anyone has any other ideas I would be happy to hear as well.

SophieH
Shopify Partner
1 0 0

Hi,

Did you find a good solution for this? Or anybody?

Thx