ecommerce_sanity_stripe icon indicating copy to clipboard operation
ecommerce_sanity_stripe copied to clipboard

500 (Internal Server Error)

Open Pannu786 opened this issue 2 years ago • 9 comments

Hi

I almost finished this project, but I face this one issue and need help here. Screenshot 2022-05-23 125935

Screenshot 2022-05-23 125851

My slug file FireShot Capture 004 - ecommerce_ slug js at main · Pannu786_ecommerce - github com

Pannu786 avatar May 23 '22 07:05 Pannu786

@Pannu786 is it only happening when you click the Buy Now button in the banner or any product on the home page?

miahthegreat avatar May 25 '22 07:05 miahthegreat

@Pannu786 is it only happening when you click the Buy Now button in the banner or any product on the home page? Just the BUY NOW button on the banner. Other than that rest of the app works fine.

Pannu786 avatar May 25 '22 08:05 Pannu786

It's more than likely an issue with the product slug that the banner points too. Either the product doesn't exist in Sanity or there is no image published for the product.

miahthegreat avatar May 25 '22 16:05 miahthegreat

Hmm, I will have a look. Thank for the help tho.

Pannu786 avatar May 25 '22 16:05 Pannu786

I think i found the problem, you imported capital Product from components when it should have been lower case product and i think this is the reason all four properties of lowercase product is null. Import product instead and let me know if this helps.

dmroberts302 avatar Jun 04 '22 02:06 dmroberts302

@dmr019 I wish I could say it worked but it did not.

Pannu786 avatar Jun 05 '22 13:06 Pannu786

@dmr019 I wish I could say it worked but it did not.

Its the problem with ur sanity database, u have to go to banner section (open localhost:3333) and there u have "product" field. There u have to change it to a slug that is already existing in the database of any product u wanna display. Since there is no product with slug "Headphones" you are getting an error.

AM-Darshan avatar Jun 08 '22 18:06 AM-Darshan

Oh thank you for pointing that out.. I might have a look some day again into this but I appreciate you took a look. Thanks again to all of you.

On Sat, 1 Oct 2022, 21:33 Pradhan1999, @.***> wrote:

@dmr019 I wish I could say it worked but it did not.

bro you've not write logic for Buy Now button. Add code for that in HerroBanner.jsx.

— Reply to this email directly, view it on GitHub https://github.com/adrianhajdin/ecommerce_sanity_stripe/issues/26#issuecomment-1264406460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKO6XDUGQCK65S36JMYWNCLWBBOFVANCNFSM5WU3YOQA . You are receiving this because you were mentioned.Message ID: @.***>

Pannu786 avatar Oct 01 '22 16:10 Pannu786

@dmr019 I wish I could say it worked but it did not.

Here, slug name in Product and product name in Banner sholud be same. image image

Pradhan1999 avatar Oct 01 '22 17:10 Pradhan1999