Hello,
I'm having an issue with the Ecom:Product:Field.[TagName] in a project we're working on. I checked the documentation for this and tried the following on PromotionProducts.cshtml page:
var kampanj= Model.Item.GetBoolean("Ecom:Product:Field.Kampanj");
This gives the error:
Exception in template (\Designs\Rapido\Paragraph\PromotionProducts.cshtml): System.Exception: A field with the name Ecom:Product:Field.Kampanj does not exist at Dynamicweb.Frontend.ItemViewModel.GetField(String systemName) at Dynamicweb.Frontend.ItemViewModel.GetBoolean(String systemName) at CompiledRazorTemplates.Dynamic.ffbbaddff.Execute() at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
I created the field in Settings>Ecommerce>Product fields with the FIELD NAME being: Kampanj SYSTEM NAME Kampanj and TEMPLATE TAG: Kampanj and FIELD TYPE: Checkbox
I also tested a field called descriptionShort, which also was not found.
Also, while in the PromotionProducts.cshtml, the razor code for template tags doesn't work, but the HTML code for the template tags works.
Any ideas why this is?