how to use 2 model in a views (not use controller, not edit model).
#1
Geschrieben: 14 July 2016 - 10:53
#2
Geschrieben: 14 July 2016 - 11:38
Marcus Gesing
Smartstore AG
#3
Geschrieben: 15 July 2016 - 03:30
In the action method you can pass a reference of the second (third etc.) model through ViewBag or ViewData into your view.Or you can use the property "CustomProperties" of the first (main) model to pass any extra data into your view.
thanks for your answer. but all of them need edited on Controller or Model. While i designing, I only changed on View. Is there any way use 2 model on a view just edit Viewer?
Ty.
#4
Geschrieben: 15 July 2016 - 11:42
No, not by only changing the view. That would conflict MVC architectural pattern by the way.
Marcus Gesing
Smartstore AG
#5
Geschrieben: 22 July 2016 - 10:32
Thanks you. i'm writing new shopbar, but Shopping cart not update quantity and list of product when i click Add to cart. please tell me why?
#6
Geschrieben: 22 July 2016 - 12:04
Shopbar infos are updated through public.shopbar.js, method loadSummary. Probably your new HTML does not use the expected id and class names like "shopbar-button".
Marcus Gesing
Smartstore AG