Developer forum

Forum » Swift » Media Gallery missing code to handle dummy product

Media Gallery missing code to handle dummy product

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Hi,

Swift_ProductDetailsGallery.cshtml is missing code to handle the dummy product in visual editor mode, now it is just:

@* Get the product data *@
if (Dynamicweb.Context.Current.Items.Contains("ProductDetails"))
{
product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"];
}
 
Which causes an exception when in the visual editor. 
The component does work on the real page, as it is finding product data then.
 
Cheers,
Justin

Replies

 

You must be logged in to post in the forum