Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

When trying to add a new item to shopping cart, getting a error message

$
0
0
I'm using kentico 12. With the help from the KB article(https://docs.kentico.com/k12/e-commerce-features/developing-on-line-stores/implementing-a-checkout-process/using-a-shopping-cart-on-mvc-sites#UsingashoppingcartonMVCsites-Displayingtheshoppingcart), I am trying to add a new product to the shopping cart. I am doing it as a public user. But I'm getting the following error.@\r\n[DataConnection.HandleError]: \r\n\r\nQuery: \r\nINSERT INTO COM_ShoppingCartSKU ([ShoppingCartID], [SKUID], [SKUUnits], [CartItemCustomData], [CartItemGuid], [CartItemParentGuid], [CartItemValidTo], [CartItemBundleGUID], [CartItemText], [CartItemAutoAddedUnits]) \r\nVALUES (@ShoppingCartID, @SKUID, @SKUUnits, @CartItemCustomData, @CartItemGuid, @CartItemParentGuid, @CartItemValidTo, @CartItemBundleGUID, @CartItemText, @CartItemAutoAddedUnits);\r\n\r\nSELECT SCOPE_IDENTITY() AS [ID]\r\n\r\nCaused exception: \r\nThe INSERT statement conflicted with the FOREIGN KEY constraint \@FK_COM_ShoppingCartSKU_ShoppingCartID_COM_ShoppingCart\@.@I have checked in the DB. It is creating a new record in the ShoppingCart table but nothing in the @ShoppingCartSKU@ table. And the SKU ID is valid.Please help me. Thanks in advance.

Viewing all articles
Browse latest Browse all 8901

Trending Articles