Member 14557688 Ответов: 1

На сайте электронной коммерции в корзине покупок мы сталкиваемся с пунктом добавить в корзину после того как я получаю следующую ошибку


[DataConnection.HandleError]: 

Query: 
INSERT INTO COM_ShoppingCart ([ShoppingCartGUID], [ShoppingCartUserID], [ShoppingCartSiteID], [ShoppingCartLastUpdate], [ShoppingCartCurrencyID], [ShoppingCartPaymentOptionID], [ShoppingCartShippingOptionID], [ShoppingCartBillingAddressID], [ShoppingCartShippingAddressID], [ShoppingCartCustomerID], [ShoppingCartNote], [ShoppingCartCompanyAddressID], [ShoppingCartCustomData], [ShoppingCartContactID], [ShoppingCartCampaignID], [ShoppingCartProgramID], [ShoppingCartDistributorID], [ShoppingCartInventoryType], [BusinessUnitIDForDistributor], [ShoppingCartRequestedDeliveryDate], [ShoppingCartCarrierAccountNumber], [ShoppingCartFranchiseNumber], [ShoppingCartStoreID]) 
VALUES (@ShoppingCartGUID, @ShoppingCartUserID, @ShoppingCartSiteID, @ShoppingCartLastUpdate, @ShoppingCartCurrencyID, @ShoppingCartPaymentOptionID, @ShoppingCartShippingOptionID, @ShoppingCartBillingAddressID, @ShoppingCartShippingAddressID, @ShoppingCartCustomerID, @ShoppingCartNote, @ShoppingCartCompanyAddressID, @ShoppingCartCustomData, @ShoppingCartContactID, @ShoppingCartCampaignID, @ShoppingCartProgramID, @ShoppingCartDistributorID, @ShoppingCartInventoryType, @BusinessUnitIDForDistributor, @ShoppingCartRequestedDeliveryDate, @ShoppingCartCarrierAccountNumber, @ShoppingCartFranchiseNumber, @ShoppingCartStoreID);

SELECT SCOPE_IDENTITY() AS [ID]

Caused exception: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_COM_ShoppingCart_ShoppingCartCustomerID_COM_Customer". The conflict occurred in database "K11_KDA_QA", table "dbo.COM_Customer", column 'CustomerID'.
The statement has been terminated.


Что я уже пробовал:

[DataConnection.HandleError]: 

Query: 
INSERT INTO COM_ShoppingCart ([ShoppingCartGUID], [ShoppingCartUserID], [ShoppingCartSiteID], [ShoppingCartLastUpdate], [ShoppingCartCurrencyID], [ShoppingCartPaymentOptionID], [ShoppingCartShippingOptionID], [ShoppingCartBillingAddressID], [ShoppingCartShippingAddressID], [ShoppingCartCustomerID], [ShoppingCartNote], [ShoppingCartCompanyAddressID], [ShoppingCartCustomData], [ShoppingCartContactID], [ShoppingCartCampaignID], [ShoppingCartProgramID], [ShoppingCartDistributorID], [ShoppingCartInventoryType], [BusinessUnitIDForDistributor], [ShoppingCartRequestedDeliveryDate], [ShoppingCartCarrierAccountNumber], [ShoppingCartFranchiseNumber], [ShoppingCartStoreID]) 
VALUES (@ShoppingCartGUID, @ShoppingCartUserID, @ShoppingCartSiteID, @ShoppingCartLastUpdate, @ShoppingCartCurrencyID, @ShoppingCartPaymentOptionID, @ShoppingCartShippingOptionID, @ShoppingCartBillingAddressID, @ShoppingCartShippingAddressID, @ShoppingCartCustomerID, @ShoppingCartNote, @ShoppingCartCompanyAddressID, @ShoppingCartCustomData, @ShoppingCartContactID, @ShoppingCartCampaignID, @ShoppingCartProgramID, @ShoppingCartDistributorID, @ShoppingCartInventoryType, @BusinessUnitIDForDistributor, @ShoppingCartRequestedDeliveryDate, @ShoppingCartCarrierAccountNumber, @ShoppingCartFranchiseNumber, @ShoppingCartStoreID);

SELECT SCOPE_IDENTITY() AS [ID]

Caused exception: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_COM_ShoppingCart_ShoppingCartCustomerID_COM_Customer". The conflict occurred in database "K11_KDA_QA", table "dbo.COM_Customer", column 'CustomerID'.
The statement has been terminated.

1 Ответов

Рейтинг:
5

Richard Deeming

Вы пытаетесь вставить корзину для клиента, которого нет в вашем магазине. COM_Customer стол.