Typically, custom product templates use their own subclass of Workarea::Storefront::ProductViewModel, but this isn't supposed to be necessary if there's no custom logic that needs to be in the view model layer. However, when developers tried to add a custom template without the view model, they received an error. To prevent this, Workarea will now catch the NameError thrown by Storefront::ProductViewModel.wrap in the event of a custom product template not having a view model defined.
Typically, custom product templates use their own subclass of
Workarea::Storefront::ProductViewModel
, but this isn't supposed to be necessary if there's no custom logic that needs to be in the view model layer. However, when developers tried to add a custom template without the view model, they received an error. To prevent this, Workarea will now catch theNameError
thrown byStorefront::ProductViewModel.wrap
in the event of a custom product template not having a view model defined.