How to test the new app snippets feature?

Highlighted
Shopify Staff
Shopify Staff
635 16 205

Hi @qsmarant 

 

Can you link me to the dev store that you're testing this on?

 

Cheers,

Liam

Liam Griffin
Shopify | Developer Community Manager
0 Likes
Highlighted
New Member
1 0 0

Hi Liam!

I'm experiencing the exact same issue @qsmarant is going through. Could it be possible to have an update?

In the Extensions tab of my app I added a snippet in the Online Store tab with a simple form:

<form accept-charset="UTF-8" action="/" autocomplete="off" method="POST" target="_blank">
    <fieldset>
    <legend>Data:</legend>
    <input name="data" type="text" placeholder="IBAN Number" /> <br /><br /> 
    <button type="submit" value="Submit">Submit</button>
    </fieldset>
</form>

I copied the link provided by the extension manager: {% render 'shopify://apps/returns/snippets/input-test/12d13e5c-4f21-4b6a-9f0a-c0129bb46403' %} and I added the render tag to my page template, and I correctly attributed the right page template in my page admin.

Screenshot 2020-07-29 at 18.19.28.png

Screenshot 2020-07-29 at 18.22.48.png

Then I head to my dev store and on the correct page, but the form from the snippet is not outputted.

You can check it under this link: https://returns-interface.myshopify.com/pages/test

My app is correctly installed on my dev store also.

Is there any ways you could help me with that?

Thanks in advance, Eleonore

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
635 16 205

Hi Eleonore,

I think the reason you were not seeing this issue could be because you were using a regular version of Debut, rather than the sections-enabled version of Debut that is linked in our docs here. This phase of the beta is closed now however so I cannot confirm for sure. There is more info regarding this on our developer changelog

 

I hope this helps!

Liam Griffin
Shopify | Developer Community Manager
0 Likes
Highlighted
Shopify Partner
9 0 1

Is it possible to create dynamic snippets?

Is it possible to update sippets programmatically?

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
635 16 205

Hi there @darrynten 

By dynamic snippets, do you mean will snippets be able to be added to all pages in the same way that sections can be added to the homepage today? If so, no - only sections will be able to be added to pages through the online store editor. 

It is possible to access and write to snippet files using the REST API, would this be what you mean by "programmatically update snippets"? 

Hope this helps!

 

 

Liam Griffin
Shopify | Developer Community Manager
0 Likes