ecommerce_sanity_stripe
ecommerce_sanity_stripe copied to clipboard
UNABLE TO ADD DIFFERENT ITEMS TO CART. KEEPS ADDING SAME ITEM TO CART (FIRST ITEM)
Unable to add different items to cart, always add same/initial item. i have cloned this project and still not work. edit: Error message on the right solved but the issue in the title remains.
in Cart component at line number 78, remove that onClick="", then you don't get this error...
the error is gone but sadly im still unable to add different cart items. any idea? trying to add other items, only ends up adding the first item only.
I'm not sure why it's happening at your end... so let's add some screen short here to see what is going on at your project?
Again i've added the 2nd item (x2) and 3rd item (x3) and it added the first item (x5) to the cart. also the console has no more errors.
Don't mind... I think you may have missed conception to understand this thing because that 2nd or 3rd item you can't add because they are already part of the 1st product item. These pictures are just another-looking version of that specific product that you already added to your cart & after adding the product into the cart you can only see just 1st picture from that product.
So it's not an error, it's a feature behavioral pattern 🙂
But how? Just before I copy pasted the github code, it was working fine.
'These pictures are just another-looking version of that specific product that you already added to your cart'
But I manually added the items to sanity CMS.
I'm guessing the github source code actually has bugs
From what I see you need to create a separate products in Sanity dashboard, not just add different pictures to the same product.
From what I see you need to create a separate products in Sanity dashboard, not just add different pictures to the same product.
Nope. Didn't work. I've added different products once again (this time smartwatch)
Also, i followed the exact steps in the tutorial video, what adrian did.
also there's this bug too for some reason:
same problem its a bug when add one item than add another item multiple time its is item._id is is undefianed why