Wrox Programmer Forums
|
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2009, 04:10 PM
Authorized User
 
Join Date: Mar 2009
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Default DeleteShoppingCartItem error

I get the following error in firefox.

[ArgumentException]: The parameters dictionary contains a null entry for parameter 'productId' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult DeleteShoppingCartItem(Int32)' in 'TheBeerHouse.Controllers.CommerceController'. To make a parameter optional its type should be either a reference type or a Nullable type.

It seems like it's looking for a dictionary pair???
This is similar to DeleteShippingMethod, except that works.
I'm at my wit...................s end.
 
Old November 3rd, 2009, 04:12 PM
nberardi's Avatar
Wrox Author
 
Join Date: Aug 2008
Posts: 102
Thanks: 1
Thanked 16 Times in 16 Posts
Send a message via AIM to nberardi
Default

The "productId" parameter isn't getting submitted to the action.
__________________
Check out my blog at: http://www.coderjournal.com
The Following User Says Thank You to nberardi For This Useful Post:
ralphbethke (November 3rd, 2009)
 
Old November 3rd, 2009, 04:21 PM
Wrox Author
 
Join Date: Aug 2008
Posts: 19
Thanks: 1
Thanked 4 Times in 4 Posts
Send a message via AIM to Al_Katawazi
Default To get this working

Alright this is a bug in the code we released. If you use firebug net tab and look at the post being made you can see under the post tab it is passing id instead of productid. to fix this problem simply change the variable name in the deleteshoppingcartItem action method from productID to id. Or change the offending javascript file to pass productID instead of id. Up to you.
The Following User Says Thank You to Al_Katawazi For This Useful Post:
ralphbethke (November 3rd, 2009)
 
Old November 3rd, 2009, 04:58 PM
Authorized User
 
Join Date: Mar 2009
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Default DeleteShoppingCart error

Thanks again guys,

I'm kind of embarrassed I didn't see that.

Not only are you guys good programmers...You're extremely prompt.

I stepped out for lunch and saw your reply when I returned.

Wish me luck...I'm getting ready to try out PayPal.

You the men!
 
Old July 24th, 2010, 10:56 AM
Authorized User
 
Join Date: Dec 2008
Posts: 56
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to fh84
Default

when an iten is deleted, the Subtotal has to be updates as well.
otherwise the price remains the same.
if i refresh the page then is gone away but still is not workong properly
please advice!!!
 
Old July 30th, 2010, 09:26 AM
Authorized User
 
Join Date: Dec 2008
Posts: 56
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to fh84
Default

could anyone please reply?
 
Old August 5th, 2010, 09:30 AM
Authorized User
 
Join Date: Dec 2008
Posts: 56
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to fh84
Default

Finally!!!
I made it working with the help of AL!!!
In the ViewShoppingCart.aspx page simple add this:

[code]onclick="location.reload(true)"[/code]

within the <img> tag

hope it helps!
The Following User Says Thank You to fh84 For This Useful Post:
M3rcuryKT (March 30th, 2011)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Connection Error: Named Pipes Provider error hbansal ASP.NET 2.0 Basics 5 April 12th, 2009 09:51 AM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.