How to develop a widget like for Shopify?

Highlighted
Shopify Partner
1 0 2

I'm trying to develop a Shopify recommendation app that will embed recommended bundle products to the shop's product page similar as similar as Shopify official product review app that embeds a review section (Customer Review) to the product page by adding the following section to the template:

<div id="shopify-product-reviews" data-id="{{product.id}}">
    {{ product.metafields.spr.reviews }}
</div>

My question is about the way of implementing a Shopify application that works as a widget in the product page. As far as I understand Shopify App Proxy is doing similar but it can render a new page and I can't find any approach to embed my liquid template to the existing theme.

2 Likes
Highlighted
Shopify Partner
1227 5 80

Hi Ebrahim,

I can't find any approach to embed my liquid template to the existing theme.

There is nothing officially available to do this for you. You will need to come up with a strategy to inject this widget code yourself. The recommended way to do that is via a script_tag which has the advantage of gracefully handling the scenario of when your App is uninstalled.

HTH, Gavin.

www.bookthatapp.com
1 Like
Highlighted
New Member
1 0 1

How did you go Ebrahim? I'm trying to do the same thing you are...


1 Like