Hi,
Using 9.7.2, we are trying to render a 'Shopping cart' step inheriting from Dynamicweb.Frontend.CartViewModel. However, leading the template with
@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.CartViewModel>
will result in the following error:
Error executing template "Designs/Site/eCom7/CartV2/Step/CartOrderLines.cshtml" System.InvalidOperationException: Unable to render view model template because no view model has been set. at Dynamicweb.Rendering.Template.RenderRazorTemplate()
Is this the view model to use or is there another one that works?
Our workaround was to make a new page template inheriting from Dynamicweb.Frontend.PageViewModel, as that one has the CartViewModel available in Model.Cart, which we can then use to work our magic. With this approach, however, there is no 'Shopping cart' app to provide us with a flow.
Best regards,
Roald, Novicell