Looking for old forum posts and information? View the old forum archive here ยป
Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

A static copy of our previous forums website is available online for reference. Click here to access the forum archive.

Learn more about...

AspDotNetStorefront
DotFeed

Display upsell on minicart modal

I would like to display the upsell products on the add to cart modal v10.0.2.0 I have tried to @Html.XmlPackage("upsellproducts.xml.config") in the _MiniCart.cshtml but it does not display anything.   Any body know what needs to be done to accomplish this?
asked Sep 18 in MultiStore by Joshua (130 points)

1 Answer

0 votes

That XML package requires some context info that it isn't going to have if you just slap it on the page like that.  It needs to be run by the UpsellProducts controller, which will provide the right info.  You'll probably have more luck doing it the way upsells are added to the checkout page:

@Html.Action(ActionNames.ShoppingCartUpsells, ControllerNames.UpsellProducts)

 

answered Sep 19 by Vortx ScottS (13,010 points)
This does not seem to work, when I try to add an item I get this error Your item was not added to the cart because of an error
 
This does work @Html.XmlPackage("upsellproducts.xml.config", new { ProductID = "101" }) but I need to figure out how to get the ProductID there dynamicly. 
 
Side note the upsell products do not show on the checkout, it does show on the product page.
...