Discussion about using NextJS with Sanity and Shopify integration

12 replies
Last updated: Aug 31, 2021
is the best/working guide to NextJS + Sanity is this paid course? https://www.udemy.com/course/nextjs-with-sanity-cms-serverless-blog-app-w-vercel/
The default template starter doesnt work and the rest of templates seems outdated
I don’t mind paying for the course but just want to make sure that it works
Aug 30, 2021, 4:02 PM
perhaps I could create a more elaborate warning message here, but you need to: (1) create a page from the “Other Pages” panel, (2) Go to the “Settings” -> General panel and set the page you created as the home page. Once you do that, navigating to the area in your screenshot above will show you your home page
Aug 30, 2021, 4:47 PM
ah i see now that makes sense. After creating pages from “Other Pages” now in Settings I can choose a page from dropdown. The only section that doesn’t is the “Shop” but I am guessing that is more around having to create “product” in Shopify first?
I keep playing around now knowing this is expected and require some configuration. Thank you!
Aug 30, 2021, 4:53 PM
“Shop” is similar, in that you need to first setup a shop “Collection” (Shop -> Collections), then you’ll be able to set it from the settings dropdown 🙂
Aug 30, 2021, 4:57 PM
user J
yeah i think its this vercel thing not working therefore messing up some configs?

product creation - [your-domain]/api/shopify/product-update
Im assuming the webhook is also not working because i already made a Collection in Shopify but its not showing up on
Anyways glad to know im super close and just need to figure out the configurations and it will work.
Aug 30, 2021, 5:04 PM
user U
the shopify webhooks shouldn’t prevent Vercel from deploying, that’s a separate thing, specifically for sync’ing shopify products into Sanity. Also: Collections are setup in Sanity itself, not through Shopify.
Aug 30, 2021, 5:06 PM
user J
got it then i guess theres a gap in my knowledge because the cookie consent, promo bar, header/footer are all greyed now and i noticed after setting up the pages the error keep going on down the list.
I think for now rather than skip the basic i try out the youtube link content and get back to these.
Once I have more understanding i feel like i should be able to figure these out by myself.
Aug 30, 2021, 5:16 PM
user U
yup, you need to at least have a document saved for each setting panel (like the cookie consent). The reason it’s grayed out is because of the nature of Sanity schemas. I touch on this in the readme file (under the Sanity section, below step 5):
Aug 30, 2021, 5:18 PM
I’d definitely brush up on some of the basics first, and then give this a shot 🙂
Aug 30, 2021, 5:18 PM
yeap this is the part in which i believed i messed up the setup because i dont understand what it means. I took it literally and commented out in the code and not sure what really happens 😅
the rest of the instructions took awhile but quite confident i followed them accurately.

I'll take that advice and pick up the basics first. All good then and thanks so much for the help and HULL!
user J
Aug 30, 2021, 5:31 PM
user J
just want to share this mini wins, I managed to get it to deploy on vercel now 🙂

next challenge is to get the Shopify parts working. I followed the instruction quite closely for Shopify part (to avoid gotchas) but somehow unable to figure out (just yet) how to make it work.
Aug 31, 2021, 3:24 PM
user U
! For Shopify I’m not sure what you’ve set up, but products will only show up once they are sync’d from Shopify. This requires the shopify webhook notifications to be properly setup with your vercel hosted site, and then you’ll need to trigger them by creating/updating/deleting products from your Shopify account.
Aug 31, 2021, 4:12 PM
got it thanks for guidance!
yea so far i think im getting all the required keys and use it for both env.local and vercel env. On shopify side im quite familiar as i am a shopify experts designer (so some of these stuffs i have limited knowledge tho)

ill tinker around and it seems i'm so near to get it all working. Thanks again!
user J
Aug 31, 2021, 5:15 PM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?