Messed up my json

Messed up my json

NambiH
Tourist
3 0 1

I was trying to change something in my theme that would make the page load without any of the variants selected. I messed it up somewhere along the line and now when I select a variant the price doesn't change. I was going to reinstall the theme and reset some of the files but I can't seem to find my current theme again to download and I'm not really sure where to go from here. I don't recall which ones I ended up editing or leaving edited and which ones I reverted to the original code but I was editing:

global.js, product-form.js, product-info.js, product-modal.js, and product-model.js

 

I also tried to go back to previous versions of the edits but it didn't show a previous version assuming due to it being a json file. 

Replies 4 (4)

Shadab_dev
Shopify Partner
1526 81 168

Sounds like you messed up a great bit. Since you were doing it on your own i believe you understand code, so may be try tracking back from the errors in the console if there are errors showing. 

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
NambiH
Tourist
3 0 1

I do know a little code just am quite rusty with it especially on the web development side of things. I spent a fair bit of time working on it, tried 15+ theme iterations to try and fix the pricing problem and couldn't figure it out. Eventually I found a copy of the original theme (hiding in plain site of course) and reverted as much code as possible back to the original. Fortunately I maintained most of my website content and just had to redo a lot of the theme colours and pictures. Thank you for your response!

Shadab_dev
Shopify Partner
1526 81 168

Great to hear that. All we can say here I all's well that ends well right?? 

 

But things like these do teach us stuff. We should always take a backup before making even the smallest change when we are unaware of the outcome. 

 

One good practice i have seen one of my client doing is duplicating every time he makes changes along with good naming practice mentioning the date and also the reason for the change when naming the theme. 

 

Anyways, until next time good luck on your store and your business.

 

Best

Shadab

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
NambiH
Tourist
3 0 1

That's really good advice. I will take that on board, thank you!