Comments (9)
in Cart component at line number 78, remove that onClick="", then you don't get this error...
from ecommerce_sanity_stripe.
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.
from ecommerce_sanity_stripe.
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?
from ecommerce_sanity_stripe.
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.
from ecommerce_sanity_stripe.
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
from ecommerce_sanity_stripe.
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 ecommerce_sanity_stripe.
From what I see you need to create a separate products in Sanity dashboard, not just add different pictures to the same product.
from ecommerce_sanity_stripe.
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:
from ecommerce_sanity_stripe.
same problem its a bug when add one item than add another item multiple time its is item._id is is undefianed why
from ecommerce_sanity_stripe.
Related Issues (20)
- Unable to resolve image URL from source (undefined) at 1:28 min HOT 4
- Schema error
- Sup guys if you have any issues with adding products to local storage here is the code or you wanna Margaret to next.js 13 here is the repo
- TypeError: Cannot read properties of undefined (reading 'length') bannerData.length is not fetching from sanity (sanity has 2 products in it's db) HOT 6
- components and indexjs erros HOT 14
- i have implemented local storage functionality but i was facing problem in showing totalprice in cart due to local storage.
- Error: Cannot find module '@babel/preset-react' HOT 4
- products.map HOT 2
- Problem in installing sanity HOT 3
- Stripe worked fine in localhost but not after deploying on vercel app. This is the error I am facing. HOT 1
- cannot deploy the project HOT 2
- setCartItems only updates on second click of add to cart button, with the previous product and quantity
- Stripe: Invalid integer: NaN
- Add element to cart keep same quantity HOT 3
- Error in Deploying in Vercel HOT 10
- sanity schema problem HOT 3
- Stripe redirect to Checkout failed HOT 3
- const { decQty, incQty, qty, onAdd, setShowCart } = useStateContext(); these variables are undefined in the slug.js file. On printing useStateContext() on console it shows the default value() HOT 3
- > _No description provided._ HOT 1
- "Error: Unable to resolve image URL from source (undefined)" -> [slug].js: image[index] == undefined HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecommerce_sanity_stripe.