0

I have a problem,commerce.js, commerce.cart.add() . I keep adding the products to the cart and it gets added, but in the console it is written that it is undefined.

  1. in App.js created a function, with which, when clicked, it takes the product id and quantity. Further as props to ProductDetails.js

2)then I used it in the button

3)when I click on the shopping icon, it says undefiend in the console

  • Please don't include images of code, error messages, etc. and instead add relevant parts of them into your question directly. This will help potential answerers find and fix problems in your code quicker. Also read: How to create a [mcve] – LW001 Aug 05 '23 at 22:11

0 Answers0