All threads / Shopify App injecting Liquid code into theme files
Ask A Question

Notifications

You’re not receiving notifications from this thread.

Shopify App injecting Liquid code into theme files

Adam Siegel asked in Ruby

I'm developing a new Shopify app and need some Ruby on Rails dev help.

When a Shopify Merchant installs my app, we ask the Merchant to manually add some Liquid code to their Theme files.

But my Shopify app reviewer recommended that the app automate any code injection. He says I should use ScriptTags and/or AppProxies to inject code into Liquid files. Specifically, we create new /snippets/ files and need to inject the {% include %} tag into the product-template.liquid and customer/account.liquid files.

Does anyone have experience doing this? If so, I'd love your help.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 68,099+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.