A space to discuss online store customization, theme development, and Liquid templating.
I'm building an app that should update content of the registration page (/account/register).
As far as I understood 'App blocks' and 'App embeds' can't be used for this. Documentation says that App could "inject code directly into your theme's code to add functionality", but I didn't manage to find any documentation or tutorial for that case. All I found is related to 'App blocks'. In my case, I don't want to add a block I want to change or replace an existing section.
Any approach suggestions or links to related tutorials are highly appreciated 😃
Solved! Go to the solution
This is an accepted solution.
You need to uses the assets api to modify theme assets directly.
Before replacing ALWAYS either be making a backup of the theme with some way for merchant restoration, or duplicate the section with OLD|BACKUP etc in the name; and or or make your own section name i.e. main-section-myappname.liquid and update references in other files.
When adding a new asset make sure either in the name or top of file to note where the file came from.
https://shopify.dev/api/admin-rest/2022-10/resources/asset
For client-side replace of a section use the section rendering api.
https://shopify.dev/api/section-rendering
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
This is an accepted solution.
You need to uses the assets api to modify theme assets directly.
Before replacing ALWAYS either be making a backup of the theme with some way for merchant restoration, or duplicate the section with OLD|BACKUP etc in the name; and or or make your own section name i.e. main-section-myappname.liquid and update references in other files.
When adding a new asset make sure either in the name or top of file to note where the file came from.
https://shopify.dev/api/admin-rest/2022-10/resources/asset
For client-side replace of a section use the section rendering api.
https://shopify.dev/api/section-rendering
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Thank you a lot for such a detailed and helpful answer!