 Rank: Fanatic
Joined: 7/22/2006 Posts: 255 Location: Randers, Denmark
|
Hi fellow Umbracians I'm trying to extend the old Umbraco Ecommerce Extension, and until now it has been very nice to me. But in the checkout phase i'm getting this error: The parameterized query '(@orderId int,@productId nvarchar(14),@productName nvarchar(8),@' expects the parameter '@color', which was not supplied And it is supplied - If I step through the below-mentioned code with the debugger, I can see that the value in l.Color is present.. Any Ideas? Code:public void AddOrderLine(OrderLine l) { _OrderLines.Add(l); SqlParameter[] SqlParams = new SqlParameter[] { new SqlParameter("@orderId", _OrderId), new SqlParameter("@productId", l.ProductId), new SqlParameter("@productName", l.ProductName), new SqlParameter("@quantity", l.Quantity), new SqlParameter("@price", l.Price), new SqlParameter("@color", l.Color) <--- my addition };
SqlHelper.ExecuteNonQuery(_dbdsn,CommandType.Text, "insert into ecommerceOrderLines (orderId,productId,ProductName,quantity,price,color)" + " values(@orderId,@productId,@ProductName,@quantity,@price,@color)",SqlParams); Total += (l.Price * l.Quantity); }
Best Regards Simon Simm.dk - My base on the web - proud Umbracian since 2.0 Beta
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,696 Location: KY, USA
|
Hi Simon, I applaud your efforts to dust off the ecomm extension code. Even so, I don't recall anyone being overly successful without a lot of work. I'm thinking of Chainbox, for instance. On the other hand, have you considered Paul Sterling's dashCommerce integration? That would be much more "plug and play". I know this isn't an answer to your question, but perhaps (if you haven't already put in a lot of work) it would be worth looking elsewhere? cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
 Rank: Fanatic
Joined: 7/22/2006 Posts: 255 Location: Randers, Denmark
|
Hi Doug, You're right - it has been quite a fight to get it running, mainly because the code is poorly documented, but I am so close to have everyting working, so giving up now would be a waste :) I haven't looked into Paul Sterlings dashCom. integration, but I might do so the next time, I need to set up a shopping cart system. Have a nice day :) Simon
Best Regards Simon Simm.dk - My base on the web - proud Umbracian since 2.0 Beta
|