We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to Include Snippet from App in Shopify Liquid

How to Include Snippet from App in Shopify Liquid

yarbo
Tourist
6 0 3

Hi - I'm hoping someone can help me out.

What I am trying to do:

  • I am trying to create an app that inserts content to the merchant's product page.
  • It appears that an app extension into the merchant's Online Store is the most effective way to do this (see https://shopify.dev/docs/app-extensions/extension-areas#online-store/).
  • In order to display the content, I am trying to use either a snippet or a section. However, I cannot get either of them to work properly.

I have taken these steps for the snippet:

  • I have enabled Online store as an extension area within my app (see https://shopify.dev/tutorials/add-a-new-app-extension)
  • With the Online store extension enabled, I have created a new snippet and a new section with very basic liquid code <h2>{{ product.title }}</h2>
  • I have enabled my app into a test store on my Shopify Partner account
  • I have added the {% render 'shopify://apps/etc... %} code into the correct position within the product page

Problem:

Is someone able to point me in the right direction here?

Replies 2 (2)

artage
Visitor
3 0 0

Hi There

I was following this tutorial https://shopify.dev/tutorials/add-an-app-snippet-to-your-app, not sure why i can't see Add Snippet in my Extensions > Online store.

Do you know why?

 

talha_dev
Shopify Partner
11 0 3

HI, @yarbo have you got any solution to this yet?