How to add a apps content to product-template.liquid

Solved
Highlighted
Tourist
6 0 2

Hello everyone,

I'm developing a shopify app that allows you to fill out a form and then validating it I get a result. Until now, I display this result in the same page of the app.

I wonder how can I display this result in product-template.liquid, I tried to see on the net but I haven't found what I'm looking for. Do you have any suggestions please?

Thanks in advance

0 Likes
Highlighted
Shopify Partner
2294 116 353

This is an accepted solution.

Use the REST api Assets endpoint to modify theme resources, but if you do that of course it isn't available until page is reloaded and then it would be on all product pages

https://shopify.dev/docs/admin-api/rest/reference/online-store/asset?api[version]=2020-04

If you only need to modify the current users session view use the script_tags api to run javascript

https://shopify.dev/docs/admin-api/graphql/reference/object/scripttag

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes