This question is for app develpoment and seeks to avoid theme modifications. Is this how one would add a React.js app after a Cart button on Shopify product pages on the front end:
1. Find a common id for Cart buttons and/or divs in popular Shopify themes.
2. Use the Script Tag API to load a javascript file.
3. The javascript file selects the common ID. Then it uses insertAdjacentHTML() to insert a new div with an id like "injectionDiv"
4. A 2nd call to the Script Tag API loads a bundle.js file. This is the React.js application
5. This app/widget targets "injectionDiv", thus rendering the app.
Please let me know if I am understanding the flow correctly, thank you.
I'm also wondering how to do this. Any updates? The lack of response in this forum is frustrating.
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |