Next.js 14 E-Commerce Website with Stripe, and Sanity.io | Full Stack Tutorial | 2023

Поділитися
Вставка
  • Опубліковано 5 сер 2024
  • Build a modern and performant full stack Next.js 14 Ecommerce Website complete with secure Stripe payment integration, efficient content management through Sanity.io and beautiful styling using Tailwindcss and Shadcn UI for accessible components.
    👨🏻‍💻Github Repository: www.janmarshal.com/courses/ne...
    ☕️ Buy me a coffe: www.buymeacoffee.com/janmarshal
    📧 Business ONLY: jan@alenix.de
    Installation Command: npm i stripe use-shopping-cart next-sanity @stripe/stripe-js @sanity/image-url --force
    Resources used:
    Next.js: nextjs.org/
    Sanity.io: www.sanity.io/
    Stripe: stripe.com/
    Shadcn/UI: ui.shadcn.com/
    Use Shopping Cart: useshoppingcart.com/
    Timestamps
    00:00 Intro
    01:02 Demo
    03:10 Installation
    09:30 Sanity.io Setup
    28:30 Create UI
    01:25:00 Create Product Page
    02:03:00 Implement Payment
    02:56:00 Deployment to Vercel
    ‪@VercelHQ‬ ‪@sanity_io‬ ‪@stripe‬

КОМЕНТАРІ • 197

  • @bingerminn
    @bingerminn 8 місяців тому +48

    NextJs deprecated domains. It's replaced with remotePatterns.
    images: {
    remotePatterns: [
    {
    protocol: "https",
    hostname: "cdn.sanity.io**",
    },
    ],
    },

  • @petrzajkas337
    @petrzajkas337 6 місяців тому

    Great tutorial, thanks for what you doing! It's well explained in detail and an easy-to-follow tutorial. You just earned yourself a subscriber. :) More tutorials like this, please. Stay safe.

  • @ElNicopewpew
    @ElNicopewpew 9 місяців тому +10

    Sweet! If you would like to expand on this tutorial, I think we the people would love to see you implement a dynamic navbar, so the user can add new categories from sanity, and perhaps a search function?

  • @tommytanti1776
    @tommytanti1776 5 місяців тому +2

    Thanks brother, you have been a life savior.

  • @anjumraza8003
    @anjumraza8003 8 місяців тому

    Hello Jan Marshal,
    Nice Job, Thank you so much for such wonderful tutorial build.

  • @DevVibes9863
    @DevVibes9863 2 місяці тому

    Nice Project! Helped me to increase my Website Development skills from basic to very high level. Best project ever in my life.

  • @user786-d4w
    @user786-d4w 19 днів тому

    Such a Great Tutorial..👏👏💙

  • @Schick3r
    @Schick3r 2 місяці тому

    Thank you! i subscribed to you directly. i also use the aura theme in vs code :)

  • @omarzaeda
    @omarzaeda 5 місяців тому +1

    I made it : ), thanks bro

  • @yoann-philippewilson4791
    @yoann-philippewilson4791 3 місяці тому

    thank you bro you are the best

  • @syedahafsadeveloper
    @syedahafsadeveloper 4 місяці тому

    Amazing website

  • @SatyamChaturvedi-ej9zk
    @SatyamChaturvedi-ej9zk 3 місяці тому

    Great tutorial Jan btw anyone facing issues while fetching data in sanity, I am getting drafts as well when fetching products

  • @CptJuke
    @CptJuke 6 місяців тому

    Great Tutorial! You make everything look so easy…

    • @janmarshalcoding
      @janmarshalcoding  6 місяців тому +1

      I wish haha

    • @CptJuke
      @CptJuke 6 місяців тому +1

      @@janmarshalcoding yeah i wish it was that easy aswell! haha

  • @syedahafsadeveloper
    @syedahafsadeveloper 4 місяці тому

    you earned a subscriber

  • @fiimble
    @fiimble 8 місяців тому

    Hello Jan,
    Thanks so much for such wonderful tutorial build.
    Thanks again!

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      Thanks 😀

    • @fiimble
      @fiimble 8 місяців тому

      Hey @@janmarshalcoding
      I implemented the 'clearCart()' method upon a successful payment on localhost. It works and the cart is emptied when I return to the store. But when I use the live server -vercel- for testing the cart still shows the items in it, even after a successful test transaction. Do I have to be on "LIVE" mode and NOT on "TEST" on Stripe for it to work?
      Best regards,
      Jorge

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      Hey Gorge,
      I haven't tried clearCart, but will try to reproduce it later tonight and will come back with my results. So cool that you try to tackle problems you face yourself, most just complain 🤌🏻👍🏻. Also to clarify, you mean emptying the cart works on localhost with clearCart() but not in production using vercel?

  • @sitheekmohamedarsath
    @sitheekmohamedarsath 8 місяців тому

    Great work.

  • @mahendranath2504
    @mahendranath2504 8 місяців тому

    nice thank you so much, liked and subscribed 😍😍🎉🎉🎊🎊👍👍👌👌🙌🙌

  • @yantaosong
    @yantaosong 7 місяців тому

    thanks Jan , it is a wonderful vedio about e-commerce site , hope adding the paypal of payment .

  • @TKTBC777
    @TKTBC777 6 місяців тому

    Thanks!

  • @bijendernagar15
    @bijendernagar15 8 місяців тому +2

    Thanks for your efforts best tutor on youtube you explain every thing in detail and simple words for begainers understand properly thanks again Subscribed you Love From India

  • @MrMrkram18
    @MrMrkram18 8 місяців тому +4

    Just deployed to Vercel with stripe & sanity great video.

  • @tenr01
    @tenr01 7 місяців тому

    @20:42 to make a reference from one document to another. Super important, when you are using numerous documents!

  • @UAng-ro9kt
    @UAng-ro9kt 7 місяців тому

    nice UI

  • @davelyashuk7979
    @davelyashuk7979 4 місяці тому

    Спасибо!

  • @rootbindev
    @rootbindev 9 місяців тому

    Awesome

  • @ShahnawazSayyad
    @ShahnawazSayyad 8 місяців тому

    This is nice.. request you to do more of Remix tuts

  • @fexzi4074
    @fexzi4074 5 місяців тому +1

    Just deployed to vercel and its working. Thanks. Can you make another tutorial to explain react crash course.

    • @janmarshalcoding
      @janmarshalcoding  5 місяців тому

      Great!
      I will probably do it at some point...

  • @paulreidy8131
    @paulreidy8131 3 місяці тому

    Hi Jan, scratch that last question, I'd named the Newest.tsx as a .jsx file.

  • @user-jx4is8kr9l
    @user-jx4is8kr9l 9 місяців тому +4

    Please, how do I modify the stripe checkout page and collect the customer's address?

  • @MarosiMate-sq2wm
    @MarosiMate-sq2wm 9 місяців тому +1

    Great video! Also, you look like someone I know irl.

  • @jeffqseid2169
    @jeffqseid2169 5 місяців тому +1

    Error: async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.
    for both CheckNow and AddToBag :(

  • @tattooedvl
    @tattooedvl 7 місяців тому

    Thanks for ur video. Can u help me: why I can't see the price including sale percent inside my shopping cart? for example, newest page have sale price, when I click category - same, but when inside my cart can c only normal price without sale. How I can fix it ? Thanks

  • @victoriousinsight
    @victoriousinsight 9 місяців тому

    Thank you

  • @wowgaming2663
    @wowgaming2663 4 місяці тому

    Its functional add to card etc where you implemented please time stemp

  • @zunnoorainrafi5985
    @zunnoorainrafi5985 9 місяців тому +1

    Will you please make an e-commerce website using Remix which includes pagination, infinite scrolling، image optimization, uploading images , authentication with credentials and also with Google.

  • @Kmkn308
    @Kmkn308 8 місяців тому

    Hey Jan Marshall Bro .
    Hope you are fine
    Brother dynamic page images you didn't discuss which api you use to get images i am stuck there ..

  • @user-fe2gi6fr3p
    @user-fe2gi6fr3p 4 місяці тому

    Hi Jan any idea how to remove the old images i have been following the tutorial up to 1.04 however when i try to replace the images the old ones stay. Please help..

  • @harunalrd
    @harunalrd 9 місяців тому +1

    First, and it was 4.55 AM in my country 😂

  • @JDUDEadventure
    @JDUDEadventure 4 місяці тому

    Hi Jan, On the global.css tailwind imports how do you fix the error underline? I keep getting that and its annoying.

  • @ahmedyarkhan7006
    @ahmedyarkhan7006 8 місяців тому +2

    ver nice tutorial can u add clerk auth

  • @adelekeadeyemo9672
    @adelekeadeyemo9672 4 місяці тому

    Thanks for this project Mr Jan. Please I'm getting an error whenever i try to fetch my hero images @58.40 minutes. the error says: Error: Dataset not found - Dataset "production" not found for project ID. kindly help because I'm stuck. Thank you

  • @vineetjadhav1785
    @vineetjadhav1785 4 місяці тому

    When i treid to checkout its says in my console log no such plans does anyone know this fix of error

  • @abodfta6159
    @abodfta6159 7 місяців тому

    how to get dynamic product id from stripe?

  • @theintjengineer
    @theintjengineer 9 місяців тому

    Second, and it's 01:05 a.m in my country 😂

  • @alexiizz1222
    @alexiizz1222 Місяць тому

    I got an error at 1:20:30 TypeError: Cannot read properties of null (reading 'default'), maybe i did something wrong but if you are getting the same error i solved it adding a 5 instead of a 4 to [_type == "product"][0...5]

  • @lordsonmateleddi5481
    @lordsonmateleddi5481 9 місяців тому

    great work ❤

    • @janmarshalcoding
      @janmarshalcoding  9 місяців тому

      Thanks 😄

    • @lordsonmateleddi5481
      @lordsonmateleddi5481 9 місяців тому

      @@janmarshalcoding there aren't so much course on sanity on youtube so keep up the good work

    • @MarosiMate-sq2wm
      @MarosiMate-sq2wm 9 місяців тому +2

      @@lordsonmateleddi5481 meh, throw the Sanity part. There are probably no videos on Next 14, right now.

    • @rootbindev
      @rootbindev 9 місяців тому

      actually he doesnt even use next 14 in this one @@MarosiMate-sq2wm

  • @user786-d4w
    @user786-d4w 2 дні тому

    hi my checkout button still not working after change the button what the issue can anyone guide me??

  • @MERCEDES_AMG_F1
    @MERCEDES_AMG_F1 5 місяців тому

    How show all iteam in see all can somone help?

  • @emenikedaniel
    @emenikedaniel 8 місяців тому

    Tried following this but use-shopping-cart dependencies are not well managed. I used pnpm for this project, it kept complaining about that package. Thanks a lot for this tutorial. Appreciate

    • @webunveilers
      @webunveilers 7 місяців тому

      it's just a warning. because it is outdated

  • @Pikachu-cj9he
    @Pikachu-cj9he 9 місяців тому

    nice project. Can you please specify that in this project you use reactJs or typescript only.

    • @janmarshalcoding
      @janmarshalcoding  9 місяців тому +1

      At the end of the day typescript is still JavaScript. So when you follow the project just don’t create any types (interfaces etc.)

  • @Damian.30_d
    @Damian.30_d 6 місяців тому +2

    Thank you so much for this video, I've learnt a lot but when i add a second product to the cart, it just increases the quantity of the previously added product. I can only seem to add one product, every other thing i add just increases the quantity of the product that's already there

    • @sergioafanadorbayona2043
      @sergioafanadorbayona2043 5 місяців тому

      I was getting the same bug, double check if you are adding "key={data._id}" into " " tag in "app>product>[slug]>page.tsx " that worked for me

    • @fexzi4074
      @fexzi4074 5 місяців тому

      hmm this didnt work though@@sergioafanadorbayona2043

  • @randerins
    @randerins 9 місяців тому

    Great project! There's just a problem, you Vercel link to the project is not working...

    • @janmarshalcoding
      @janmarshalcoding  9 місяців тому

      Because I don't have unlimited bandwidth 😂 and therefore I deleted the deployment.

  • @sanagolzar
    @sanagolzar Місяць тому

    Hey bro , Thank you for the awesome tutorial , I'm a beginner in JS and I'm starting using your tutorials, however in this one , when I wanted to config sanity I noticed that they completely changed their project in their latest update and made a standalone studio and whatnot, How can I continue? Can this project be done without sanity ? I am more keen to create my own admin dashboard and database for the project.

    • @janmarshalcoding
      @janmarshalcoding  Місяць тому +2

      Well, then I have great news for you, because I will release an ecommerce tut this week with all the thing you just mentioned. Stay tuned.

    • @sanagolzar
      @sanagolzar Місяць тому

      @@janmarshalcoding ​ Wow, that's awesome! I'll be waiting for it. Thanks!

  • @liu-river
    @liu-river 7 місяців тому

    Do you know how I can use revalidatePath with sanity webhook instead of force-dynamic all the ssg pages? I can't find an example online with app router

    • @janmarshalcoding
      @janmarshalcoding  7 місяців тому +1

      Well, you could do that, but I surely would not do that... I would rather delete force-dynamic and add the following: export const revalidate = 3600 // revalidate the data at most every hour
      then change the seconds to what ever you prefer...

    • @liu-river
      @liu-river 7 місяців тому

      @@janmarshalcoding But what if I need almost instant revalidation but have thousands of routes. What is the actual cost of this data refetching, say if I have 1000 dynamic routes, it gets rebuilt 1000 times every minute, do you know if there is a limit on Vercel?

  • @kazimwrites5030
    @kazimwrites5030 6 місяців тому +2

    Hello Jan
    I hev error cannot ready property of undefined ('reading' 'disptach') how to solve this guide mr

    • @sergioafanadorbayona2043
      @sergioafanadorbayona2043 5 місяців тому

      I'm having the same issue right now "TypeError: Cannot read properties of undefined (reading 'dispatch')" it shows that the error is coming from the "const {cartCount}= useShoppingCart();" part

    • @sergioafanadorbayona2043
      @sergioafanadorbayona2043 5 місяців тому

      solved, i was importing {CartProvider} from "use-shopping-cart" insted of import CartProvider from "./components/Providers" into Layout.tsx

    • @damidelOK
      @damidelOK 3 місяці тому

      Were you able to solve it? The same thing happens to me in Navbar.tsx ' ⨯ node_modules
      eact-redux\es\hooks\useDispatch.js (18:0) @ useDispatch
      ⨯ TypeError: Cannot read properties of undefined (reading 'dispatch')
      in the navigation bar (./app/components/NavBar.tsx:38:99)
      zero

  • @paulreidy8131
    @paulreidy8131 3 місяці тому

    Hope you can help Jan.
    At 1:14 when the interface.ts file is created and the line
    const data = await getData(); changes to
    const data: simplifiedProduct[ ] = await getData();
    I get an error 'const' declarations must be initialized.
    Do you know whats going on here?

    • @muktarayodeji7257
      @muktarayodeji7257 Місяць тому

      Are you still experiencing this issue? if so try declaring 'const data = client.fetch(query)' in the getData function

    • @paulreidy8131
      @paulreidy8131 Місяць тому

      @@muktarayodeji7257 Thanks for replying, my problem was with a jsx file extension that should have been tsx.

  • @davidt510
    @davidt510 8 місяців тому +1

    Nice video!
    Could this be deployed for real world use?
    I'm just thinking about how it would work if you had customers - there isn't a register/login/user account area so would they be able to see previous orders etc?

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому +2

      Thanks,
      well, it can be deployed for real world use, but I would definitely NOT recommend it. This ecommerce store is very "basic" and as you already mentioned features like account are not implemented. Also, I would not really recommend using stripe for Ecommerce for various reasons. Therefore, my recommendation is either you invest a lot of time and create a custom ecommerce storefront or just use Shopify, which makes it like 1000x easier.

    • @webunveilers
      @webunveilers 7 місяців тому

      why stripe isn't a good option and what is alternative@@janmarshalcoding

    • @anasahmed3480
      @anasahmed3480 7 місяців тому

      Can I ask please?
      Why stripe isn't recommended for real life use?@@janmarshalcoding

    • @yantaosong
      @yantaosong 7 місяців тому

      @@janmarshalcoding add next-auth for login and user information , or any other ?

  • @umersiddiqui4530
    @umersiddiqui4530 7 місяців тому

    Can you make an e-commerce applications using next js 14 and mongodb

  • @piyushshrestha3651
    @piyushshrestha3651 5 місяців тому

    Is it practically applicable

  • @Lokaoxisde1
    @Lokaoxisde1 9 місяців тому

    I'm getting this error on my lib/sanity.ts file: Value of type 'typeof ImageUrlBuilder' is not callable. Did you mean to include 'new'?ts(2348), the line is const builder = ImageUrlBuilder(client); can someone help me?

    • @loveoner
      @loveoner 8 місяців тому

      You are importing the type, you need to import the function with lowercase imageUrlBuilder

    • @barmejtech
      @barmejtech 7 місяців тому +2

      use this code. it will fix your mentioned issue.
      =========================================
      import imageUrlBuilder from '@sanity/image-url'
      const builder = imageUrlBuilder(client)

  • @tonihaq5576
    @tonihaq5576 3 місяці тому

    when clicking the checkout button not directed to the stripe link I see the console server not responded 404 how do I fix it

    • @muktarayodeji7257
      @muktarayodeji7257 Місяць тому

      hi. Have you resolved this? i'm also experiencing a similar issue myself

  • @Isticsek
    @Isticsek 8 місяців тому

    Hello Jan! First of all, great tutorial, thank you! Great explanations on every aspect. Subscribed! However I'm facing hydration error when I wrap my entire DOM with the CartProvider: Error: Hydration failed because the initial UI does not match what was rendered on the server. I don't see this happening on the video while following you along. Could you help me fix this? Thanks!

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      Hey Pasztor 👋, I appreciate it, thank you. So to clarify when you don't add the cart provider you get the hydration warning but if you don't, you don't get one? Could you also test if you get a hydration warning in the incognito tab?

    • @Isticsek
      @Isticsek 8 місяців тому

      @@janmarshalcoding Thanks for the quick response! Yes, I've already tested in incognito, but the issue seems to come after the fact that we are trying to embed a server component inside a Client component which CartProvider is.

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      So without seeing your code, I can't definitely say where the error comes from. I personally dont think that there is a error with the cartprovider since i did not have any problems with hydration but rather with html element nesting or not closing tags.
      Now there to things we can do, you can check your code against my in my GitHub and learn how to debug code (the preferable way...)
      Or even tough I don't like offering this, you can send me your code by email, and I will try to look at it when I have the time.

    • @abhishekgiri013
      @abhishekgiri013 3 місяці тому

      @@Isticsek is your issue resolved ?

    • @Isticsek
      @Isticsek 3 місяці тому

      @@abhishekgiri013 unfortunately nope. But I guess the issue was that we try to use a server component inside a client component.

  • @luiscarlosdelorenzicantero7379
    @luiscarlosdelorenzicantero7379 8 місяців тому

    how do you do yo make your build so fast when you type 'npm run dev' without taking so an eternity to compile???

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому +2

      The power of video edits... 😂. But yeah, the dev startup can take a few secs

  • @KingPacavision
    @KingPacavision 7 місяців тому

    Do you know why I cant query into my sanity studio? its saying "Cannot read properties of null (reading 'image1')". When I console log it out its saying that my query is null like its just not returning any data my code looks the same as yours. Thank you

    • @KingPacavision
      @KingPacavision 7 місяців тому

      nvm I just had to update my projectID in the lib/sanity.ts I guess my project was never connected to my sanity server.

    • @tommytanti1776
      @tommytanti1776 5 місяців тому

      ​@@KingPacavisionhow did you fix it? I'm getting the same error, and project id is already updated.

    • @tommytanti1776
      @tommytanti1776 5 місяців тому

      Got it resolved. First check the query if it has any value reflected as "null" on the vision page. Update the sanity content page with valid value. Then go to lib folder, sanity.ts change the useCdn as false.

  • @victoriousinsight
    @victoriousinsight 8 місяців тому

    After setting up my sanity studio with the initial data it worked, but whenever i make a change and publish it, it still shows me my previous data in my next app. I even had to delete some data in the studio but the changes are not reflected in the next app

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому +1

      Did you add revalidate tags ?

    • @victoriousinsight
      @victoriousinsight 8 місяців тому

      @@janmarshalcoding Where should I add it? I didn't see that in the video. If it's in the video please paste the timestamp

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      Well it’s at the end of the vid, 3 hours mark or so

  • @lordsonmateleddi5481
    @lordsonmateleddi5481 9 місяців тому

    I don't know, can sanity work with user authentication tools like auth.js or clerk

    • @MarosiMate-sq2wm
      @MarosiMate-sq2wm 9 місяців тому

      It works with NextAuth, there's a plugin: npm i next-auth-sanity

    • @lordsonmateleddi5481
      @lordsonmateleddi5481 9 місяців тому

      @@MarosiMate-sq2wm alright. will surely check that out ☺

  • @xtreem057
    @xtreem057 3 місяці тому

    I am getting this issue : github.com/shadcn-ui/ui/issues/1129 Can you help please?

  • @spiriteddave
    @spiriteddave 5 місяців тому

    Can you help? I can't the hero images from sanity. Its "null" after I console.log

    • @sIate9
      @sIate9 4 місяці тому

      i have the same problem have you found a solution?

    • @muktarayodeji7257
      @muktarayodeji7257 Місяць тому

      Are you still experiencing this issue? you can try referencing the image as a url in your groq query e.g "image": image.asset -> url or you can access the first image url if you set it as an array in sanity e.g "image": image.asset[0].url

  • @nomxxn
    @nomxxn 8 місяців тому

    how do you create the logic for the see all? how come you didnt go through it?

    • @nomxxn
      @nomxxn 8 місяців тому

      nvm I got it to work

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      ✅🚀

    • @nomxxn
      @nomxxn 8 місяців тому

      @@janmarshalcoding literally realised we done it twice during the project 😂 love the video mate

  • @rootbindev
    @rootbindev 9 місяців тому +5

    Error: Cannot read properties of null (reading 'image1')

    • @MrMrkram18
      @MrMrkram18 8 місяців тому

      if you add export const dynamic = "force-dynamic"; to the root page it will work, had same problem

    • @loveoner
      @loveoner 8 місяців тому

      @@MrMrkram18 even after adding the export above, it didn't fix the issue for me

    • @Imam.Mehdi_
      @Imam.Mehdi_ 8 місяців тому

      ​@@loveonerif you selected html element using js... Then correct them

    • @barmejtech
      @barmejtech 7 місяців тому

      check the const query = " here spells"

    • @isaevallahverdi
      @isaevallahverdi 7 місяців тому

      ​@@MrMrkram18 can u explain more detailly pls

  • @MERCEDES_AMG_F1
    @MERCEDES_AMG_F1 5 місяців тому

    Hello Jan first amazing project and tutorial but I have a error can you help me to fix :
    Unhandled Runtime Error
    Error: Cannot read properties of null (reading images')
    Source
    app \product\[slug]\page.tsx (39:37) @ images
    37.
    38
    39
    ‹div className="mx-auto max-w-screen-xl px-4 md:px-8">
    ‹div className="grid gap-8 md:grid-cols-2">
    «ImageGallery images={data. images} />
    C
    40
    4.1
    42
    Show collapsed frames
    ‹div className="md:py-8".›
    ‹div className="mb-2 md: mb-3">

    • @tommytanti1776
      @tommytanti1776 5 місяців тому

      Is it fixed getting the same error?

  • @ltwoz9
    @ltwoz9 9 місяців тому

    1:25:00

  • @wasif4068
    @wasif4068 8 місяців тому

    51:49

  • @tundejames_20
    @tundejames_20 8 місяців тому

    Thanks, Jan for this wonderful video tutorial, I have learned a lot. However I am getting this error message when I click on the checkout button in the console: "IntegrationError: No such plan: '4c2f6f9d-31dd.......'".
    I have checked online to resolve the error but haven't gotten an answer yet. Please can you help?

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      Hey, please check two things: have you enabled the client only integration and did you use the price Id? In stripe there are two id’s and you need the price id

    • @tundejames_20
      @tundejames_20 8 місяців тому

      Yes, the client only is set and I used the price id generated for each product. the price id starts with price_ right?@@janmarshalcoding

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      Yes... Can you go into stripe dashboard and check the logs and tell me what is says when you try to check out

    • @tundejames_20
      @tundejames_20 8 місяців тому

      @@janmarshalcoding This is the response from the log: resource_missing - items
      No such plan: '4c2f6f9d-31dd-4ab4-ad5a-4e075f70c14e'
      Status: 400 ERR

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      Ok so the error tells you that such ID does not exist, this is also correct since as you already mentioned the stripe id starts with price_. So going from that I'm pretty sure you are passing the wrong id to your AddToBag component. It seems to me that instead of the price_id you are passing the id of the product to stripe, which is generated by sanity. Thats why stripe is throwing a error since id that you pass is not equivalent to the stripe price_id. Based on this, Please check your props

  • @snowin_jj
    @snowin_jj 6 місяців тому +2

    The explanation and the contents are good. But imagine if you're building an application for a client. Creating the price ID from Stripe and adding it to the sanity is a bit annoying.

    • @janmarshalcoding
      @janmarshalcoding  6 місяців тому +1

      You could always listen to a webhook and do it that way. But that's to overkill for this free vid.

    • @omererkul1669
      @omererkul1669 5 місяців тому

      @@janmarshalcoding Do you mean whenever you create a new product in Sanity, you will add this through the Stripe api in the Stripe dashbooard?

    • @marumaru296
      @marumaru296 4 місяці тому

      Nah its not annoying at all im agree with u if u have hundreds of item bu t for small businesses it is okay

  • @taketwochickens2888
    @taketwochickens2888 7 місяців тому

    Really cool, but what's the incentive for developers to build e-commerce websites (or people with no coding experience who want to set up a ecommerce website) when you have sites like Shopify and Squarespace thay have this already?

    • @janmarshalcoding
      @janmarshalcoding  7 місяців тому +3

      Well, the question is what do you need… Something not all too complex with groundbreaking design, then Shopify and its alternatives are fully ok. I mean, Gymshark scaled with Shopify to a multi Billion Company. But if you want 100% control over your store or can't use Shopify (certain Countries are Sanctioned/Banned), you don't really have a choice but to build the store manually.

  • @ahmedrafi7463
    @ahmedrafi7463 2 місяці тому

    How will the owner of the e-commerce website knows what all order has been made and who did it?

    • @janmarshalcoding
      @janmarshalcoding  2 місяці тому +1

      Stripe Dashboard

    • @ahmedrafi7463
      @ahmedrafi7463 2 місяці тому

      @@janmarshalcodingokay great, but I cannot get the user delivery address, how can I have that

  • @thanks_man1268
    @thanks_man1268 8 місяців тому

    Is the website responsive on mobile?

  • @jeanpierreayala5324
    @jeanpierreayala5324 9 місяців тому

    vscode theme pleaseeee?!!!

  • @available2574
    @available2574 5 місяців тому

    is it responsive?

  • @wasif4068
    @wasif4068 8 місяців тому

    Why i can't deploy I follow all steps deploying failed but its working in localhost

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      whats the error?

    • @wasif4068
      @wasif4068 8 місяців тому

      @@janmarshalcoding Type error: Cannot find module '@sanity/vision' or its corresponding type declarations.

    • @wasif4068
      @wasif4068 8 місяців тому

      Error: Command "npm run build" exited with 1

    • @janmarshalcoding
      @janmarshalcoding  8 місяців тому

      You forgot to add the .vercelignore, i talk about it in the vid

    • @wasif4068
      @wasif4068 8 місяців тому

      @@janmarshalcoding i already have it and I put sanity there

  • @andreiamariei655
    @andreiamariei655 5 місяців тому

    MAFIA

  • @joshuayevu
    @joshuayevu 9 місяців тому

    Is this project responsive

  • @NateTron99
    @NateTron99 9 місяців тому

    at 53:06 u just go back to sanity my sanity wont even open anymore its so Infurating

  • @Jankee187
    @Jankee187 8 місяців тому

    are you german?

  • @karacan2469
    @karacan2469 9 місяців тому +1

    it the 8th minutes of video, I find this is another kind of tutorials watching from second monitor and coding in first monitor to show like I am a developer, I think better to try record a video that shows real development life, it is not realistic at all.
    by the way All my respect to what you are going to do and teach what you can but it's not really the way

    • @janmarshalcoding
      @janmarshalcoding  9 місяців тому

      With all my respect, this is a free tutorial... I understand your concern, but at the end of the day, UA-cam is not my job and i don't get any money from this. Anyway... I think it's great if there is more content on UA-cam, so i highly encourage you to create your own videos, so others can learn. Thanks and good luck

    • @karacan2469
      @karacan2469 9 місяців тому +1

      @janmarshalcoding Think about it, what you do is respectable, I just said my opinion.

  • @shanulhaq1670
    @shanulhaq1670 6 місяців тому

    What a great project!! I have created it. Kindly share your Linkedin id then tag it.