What's your biggest current challenge? Have your say in Community Polls along the right column.

Coding in the index.json file

Coding in the index.json file

Cthom1964
Excursionist
34 0 4

I am attempting to add a dropdown storytelling box to collections on my homepage and asked chatgpt for the code. I am supposed to put the code in the index.liquid file which I guess is the index.json file in Craft? but there is a warning at the top of the page...

"
* IMPORTANT: The contents of this file are auto-generated.
*
* This file may be updated by the Shopify admin theme editor
* or related systems. Please exercise caution as any changes
* made to this file may be overwritten."

 

if it is going to be overwritten, where do I change the code? or is there a way to stop any updates to it? Thanks for any assistance!

 

Replies 3 (3)

PaulNewton
Shopify Partner
7516 662 1578

Teaching theme development is beyond the scope of the forums.

Start here:  https://shopify.dev/themes/architecture and put code in the relevant sections not JSON templates.

 

💣Use chatgpt and other LLMS are not a replacement for knowledge

They are text generators they are not knowledge bases and will give wrong information in a field you are incapable of recognizing as flawed or how much effort it takes to correct.

Use such tools as summarizers or incremental guidance for  knowledge you HAVE not as a way to generate more work for others.

 

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


Cthom1964
Excursionist
34 0 4

Thank you for your input. I'm obviously not a coder nor do I wish to be. I'm just trying to get my website better so I can do the things I love to do in my business. I use chat as an assistant in areas I am not knowledgeable about.

tim
Shopify Partner
3911 394 1435

Understandable. However, AI often suggests things which do not work 😞

Also, developers exist for a reason too 🙂

 

Anyways, your best/safest bet in this case would be adding a "Custom  Liquid" section to either your page main area or Header/Footer group if you want it to run on all pages and then paste code from chat in this section.

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com