Re: Replacing product page media element with the block from theme app extension

Replacing product page media element with the block from theme app extension

matas-bitbybit
Shopify Partner
4 0 5

Hi community! I'm building theme app extension that should simply replace standard media element within product page with HTML canvas element and do some stuff on variant change events, but it seems that the media block is really baked into the template on all of the default Shopify themes and can't be disabled or replaced by the block from theme app extension. I'm seeing this kind of liquid code in Dawn theme:


{% render 'product-media-gallery', variant_images: variant_images %}

 

All of the other section blocks can be controlled nicely within product-info web component...

 

Because of this the default product page template has this part more or less locked, which led me to conclude that to make an app extension I would need to re-create complete product form with all of its variant inputs inside the theme app extension. This approach does work, but it placed quite a heavy burden on the extension and produces a lot of unnecessary code, which i'd love not to take into the app and just use standard product forms provided by the themes.

 

If someone could point me to a better solution for this kind of app it would be appreciated. Confirming that the only option is to re-build product variant selection form with all it's intricacies within the extension is also fine. Having canvas element on some other section is not really an acceptable option for my app.

 

Thanks a lot for any information on this.

Matas from bitbybit.dev
Making 3D CAD on the browser
Reply 1 (1)

felixmpaulus
Shopify Partner
55 0 19

Same problem here...

Add bullet points to your productpage with Bloom: Product Feature Bullets
Increase branding and conversion. Set your store apart.
❤️ Free Plan available. Exclusively 5-star reviews.