I’m working on Shopify public app development. As the part of my app functionality, I have to put some liquid code in some of the front files like
i) sections/cart-template.liquid
ii) sections/product-template.liquid
etc.
I have automated the code putting process through the code in the default template[Debut].
Can I implement these in all themes?
I have checked the others themes and found that template structure of each theme is different. Is any possible method available to make these template changes automated in all themes?
2
Answers
Unfortunately no, because each theme might be very different. Some themes might even have different filenames for this sections or they might have completely different HTML structure.
There is no easy and universal way how to solve this problem. One of the ways:
Each theme having their own structure,it is difficult to place the exact code.
Victor Leontyev was correct.Langify scanning the whole theme and replace the code with the required place.You should analyze the code and fix the desired location to place.After that, you can insert the code programmatically.
You can mention, in which place code need to be inserted in the user manual. Based on the theme you can insert the code manually with the help of user manual.
For your Reference, added one Shopify app URL. In that app, they are given instructions to the client via user manual.Check the user manual after installing Fast Order app.
https://apps.shopify.com/fast-order
Hope it will help.