user2955130
user2955130

Reputation: 41

Adding snippet and injecting it on product page in shopify

I'm developing a Shopify app. On app installation, I want to create a snippet and upload some assets like images and JS. That snippet should be injected in the product.liquid file.

Upvotes: 0

Views: 1370

Answers (1)

Ruchi
Ruchi

Reputation: 350

You can use this for creating assets using API

https://docs.shopify.com/api/asset

While passing the key parameter you can pass whether it is going to be a snippet or asset.

{ "key" : "assets/bg-body-green.gif" }

Upvotes: 1

Related Questions