Add element to product page from app

Highlighted
Shopify Partner
11 0 7

Hi there,

I am trying to build an app that when added would add an html element to the product page of the shopify store that has added in my app. I have not been able to find anything in the help that would allow me to do this.

If I understand correctly, I can probbaly get the shop owner to add in the element if they so choose, but I need to find a way to do this automatically. For example, I added in the foreign currency app, and that automatically put a little widget at the top right of all my pages. But unfortuntately, I have not seen in the documentation how I would be able to do something like this.

Thank you

0 Likes
Highlighted
Shopify Partner
18 0 2

Hi Eliezer, 

You add this functionality by inserting a script tag into the stores template programmatically as the time the app is installed. You'll also need to specify the correct scope for your app too.

This javascript would then dynamically add the element based on what ever conditions you require.

I hope this helps!

--

Kind regards,

John Paul

ShoppersNeedLove

-- Kind regards, JP
0 Likes
Highlighted
Shopify Partner
11 0 7

Thank you John, this is exactly what I was looking for!

0 Likes
Highlighted
New Member
4 0 0

Sorry for the necromancy. 

 

How would I display an html element through this that is displayed above the nav bar (i.e. as the top most) element?

0 Likes