On the Index page for the WishListsController, there is the option to add the products directly to the cart.
IN the corresponding action (AddToCart), if the operation is succesfull, I redirect to the Index action of the ShoppingCartController.
If in the same page as the wishLists there is the ShoppingCartWidget thing go bananas. It looks like stuff gets redirected wrong somehow, and the result of the redirect is sometimes loaded "inside" the original page. Sometimes, we get redirected back to the wishlists' index. ALways, the quantity of added products is wrong after we add the first one, unless we do a page refresh in the mean time.
I can't really explain this in words, because it's not really clear to me what is going on.
IN the screenshot, we see that the whole /cart page has been loaded above the content for the /wishlists page. The strings "shopping cart widget" near the top are the widgets' titles.
I am trying to figure out what is going on and how to fix this.
Note that if I don't have the widget, this does not happen, and adding an item to the cart correctly redirects.
Also note that I see the same issues even if I do not redirect to the "/cart" page: any RedirectToAction will do.
On the
Index
page for theWishListsController
, there is the option to add the products directly to the cart. IN the corresponding action (AddToCart
), if the operation is succesfull, I redirect to theIndex
action of theShoppingCartController
. If in the same page as the wishLists there is theShoppingCartWidget
thing go bananas. It looks like stuff gets redirected wrong somehow, and the result of the redirect is sometimes loaded "inside" the original page. Sometimes, we get redirected back to the wishlists' index. ALways, the quantity of added products is wrong after we add the first one, unless we do a page refresh in the mean time.I can't really explain this in words, because it's not really clear to me what is going on.
IN the screenshot, we see that the whole
/cart
page has been loaded above the content for the/wishlists
page. The strings "shopping cart widget" near the top are the widgets' titles.I am trying to figure out what is going on and how to fix this.
Note that if I don't have the widget, this does not happen, and adding an item to the cart correctly redirects. Also note that I see the same issues even if I do not redirect to the "/cart" page: any
RedirectToAction
will do.