The INSERT statement conflicted with the FOREIGN KEY constraint "ac_Baskets_ac_BasketItems_FK1". The conflict occurred in database "AbleMods", table "dbo.ac_Baskets", column 'BasketId'
Foreign key insert conflicted error 7.0.3
Foreign key insert conflicted error 7.0.3
Sigh I can't find anything today. I swear I saw a fix somewhere for this error, maybe I'm wrong. I've got customers getting this during checkout. Anyone else getting this in 7.0.3 - it's a standard unmodified install.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Foreign key insert conflicted error 7.0.3
Yes, that's a known bug. I was able to patch a couple of sites.
viewtopic.php?f=42&t=11348&hilit=FOREIGN+KEY
viewtopic.php?f=42&t=11348&hilit=FOREIGN+KEY
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Foreign key insert conflicted error 7.0.3
Well apparently you missed mine
Thanks a bunch Judy, your memory serves you far better than mine these days. I've made the change, we'll see if that fixes it for me.

Thanks a bunch Judy, your memory serves you far better than mine these days. I've made the change, we'll see if that fixes it for me.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Foreign key insert conflicted error 7.0.3
Hi all,
My AC version is VERSION: 7.0.7.14481 but my customers have still got this error during checkout.
I check ConLib/OnePageCheckout.ascx.cs, I find the code basket.Package(false, true) as below:
And I check ConLib/Basket.ascx.cs, I also find basket.Package(false, false) in Page_PreRender() and GetBasketItems().
I have compared ConLib/Basket.ascx.cs in Service Release for AC 7.0.3 and my AC 7.0.7.
The different is that AC7.0.3 uses basket.Package() but AC7.0.7 uses basket.Package(false, false).
My error log is as below. I am not sure what is the solution and how to fix it?
Could anybody help me?
Thank you!!
My AC version is VERSION: 7.0.7.14481 but my customers have still got this error during checkout.
I check ConLib/OnePageCheckout.ascx.cs, I find the code basket.Package(false, true) as below:
Code: Select all
private void InitializeBasket()
{
Basket basket = Token.Instance.User.Basket;
basket.Package(false, true);
foreach (BasketShipment shipment in basket.Shipments)
{
shipment.ShipMethodId = 0;
shipment.Save();
}
basket.Recalculate();
_CurrentBasketHash = basket.GetContentHash(OrderItemType.Product);
}
Code: Select all
private BasketItemCollection GetBasketItems()
{
User user = Token.Instance.User;
Basket basket = user.Basket;
basket.Package(false, false);
_DisplayedBasketItems = new BasketItemCollection();
// ignore...
}
Code: Select all
protected void Page_PreRender(object sender, EventArgs e)
{
//GET ANY MESSAGES FROM SESSION
List<string> sessionMessages = Session["BasketMessage"] as List<string>;
//GET THE BASKET AND RECALCULATE
Basket basket = Token.Instance.User.Basket;
basket.Package(false, false);
basket.Recalculate();
// ignore...
}
The different is that AC7.0.3 uses basket.Package() but AC7.0.7 uses basket.Package(false, false).
My error log is as below. I am not sure what is the solution and how to fix it?
Could anybody help me?
Thank you!!