When I add a product to my cart I get the following error:
No such entity with id = 0
This happens with every product in the store, can anyone help point me in the right direction?
When I add a product to my cart I get the following error:
No such entity with id = 0
This happens with every product in the store, can anyone help point me in the right direction?
Please check customer_group table for "NOT LOGGED IN" group.
If its customer_group_id is not zero, truncate table
Then run following query.
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
Please check customer_group
table in Magento2 database.
Check NOT LOGGED IN value in customer_group_code
field. If it's not available in that field, that means the customer cannot add to cart product without sign-in.
And if 'NOT LOGGED IN' value available in that field then set itscustomer_group_id
'0'.
First, you need to sign-in and then Add to Cart.
This work for me properly. I hope this will help you.
I had missing General group with id = 1 in the customer_group table. After adding of the group, products started to get added and no error message anymore.
"This worked for me, after trying everything:
Assuming your site is in Developer Mode, you can change it to Production Mode, clear/flush cache and then switch back to Developer Mode."
THIS WORKED FOR ME IT'S LIFE SAVER! THANK YOU!!
This worked for me, after trying everything:
Assuming your site is in Developer Mode
, you can change it to Production Mode
, clear/flush cache and then switch back to Developer Mode
.
I had this issue in the front end, as I recently moved the database from one server to another. I managed to solve it by doing this.