Error executing template "Designs/Swift/eCom/ProductCatalog/ProductViewDetail.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.get_Extender()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountProvider.GetValidDiscountsForProduct(IEnumerable`1 discounts, Product product, Language language, PriceContext priceContext, Boolean ignoreOrderConditions)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountInfoCollection.LoadDiscounts()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDiscountInfo(PriceViewModelSettings settings, Product product)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__46()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__48()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__49()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_d18d3107944248dc81dcec0f3c60e383.Execute() in C:\inetpub\solutions\Goecker-2022-Staging\Files\Templates\Designs\Swift\eCom\ProductCatalog\ProductViewDetail.cshtml:line 53
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits ViewModelTemplate<ProductViewModel> 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Core 5 6 @{ 7 string metaDescription = string.IsNullOrEmpty(Model.MetaDescription) ? Model.Name : Model.MetaDescription; 8 9 Pageview.Meta.AddTag($"<meta property=\"og:image\" content=\"{Dynamicweb.Context.Current.Request.Url.Scheme}://{Dynamicweb.Context.Current.Request.Url.Host}{Model.DefaultImage.Value}\">"); 10 Pageview.Meta.AddTag($"<meta property=\"og:image:alt\" content=\"{Model.Name}\">"); 11 Pageview.Meta.AddTag($"<meta property=\"og:description\" content=\"{metaDescription}\">"); 12 13 Pageview.Meta.AddTag("twitter:image", Model.DefaultImage.Value); 14 Pageview.Meta.AddTag("twitter:image:alt", Model.Name); 15 Pageview.Meta.AddTag("twitter:description", metaDescription); 16 } 17 18 @{ 19 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 20 { 21 Dynamicweb.Context.Current.Items["ProductDetails"] = Model; 22 } 23 else 24 { 25 Dynamicweb.Context.Current.Items.Add("ProductDetails", Model); 26 } 27 28 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 29 if (isLazyLoadingForProductInfoEnabled) 30 { 31 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 32 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 33 bool hasVariantId = !string.IsNullOrEmpty(Model.VariantId); 34 string variantIdParam = hasVariantId ? $"/{Model.VariantId}" : ""; 35 string priceFilledProperties = $"Price,PriceFormatted{(showPricesWithVat == "false" && !neverShowVat ? ",PriceWithVat,PriceWithVatFormatted" : "")}"; 36 string productInfoFeed = $@"/dwapi/ecommerce/products/{Model.Id}{variantIdParam} 37 ?UserId={Converter.ToString(Pageview.User?.ID)} 38 &LanguageId={Pageview.Area.EcomLanguageId}&CurrencyCode={Pageview.Area.EcomCurrencyId}&CountryCode={Pageview.Area.EcomCountryCode}&ShopId={Pageview.Area.EcomShopId} 39 &FilledProperties=Id,Price,PriceBeforeDiscount,StockLevel,VariantInfo,NeverOutOfstock,Prices 40 &PriceSettings.ShowPricesWithVat={Pageview.Area.EcomPricesWithVat} 41 &PriceSettings.FilledProperties={priceFilledProperties} 42 &getproductinfo=true"; 43 Dynamicweb.Context.Current.Items["ProductInfoFeed"] = productInfoFeed; 44 45 <script type="module"> 46 swift.LiveProductInfo.init(); 47 </script> 48 } 49 } 50 51 <script> 52 gtag("event", "view_item", { 53 currency: "@Model.Price.CurrencyCode", 54 value: @PriceViewModelExtensions.ToStringInvariant(Model.Price), 55 items: [ 56 { 57 item_id: "@Model.Number", 58 item_name: "@Dynamicweb.Core.Encoders.HtmlEncoder.JavaScriptStringEncode(Model.Name)", 59 currency: "@Model.Price.CurrencyCode", 60 price: @PriceViewModelExtensions.ToStringInvariant(Model.Price) 61 } 62 ] 63 }); 64 </script> 65 66 <script> 67 window.addEventListener('load', function (event) { 68 swift.Video.init(); 69 }); 70 </script> 71

EPSON PREMIUM LUSTER PHOTO PAPER A3+100 SHEET 250G

C13S041785

Error executing template "Designs/Swift/Paragraph/Swift_ProductPrice_Custom.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.get_Extender()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountProvider.GetValidDiscountsForProduct(IEnumerable`1 discounts, Product product, Language language, PriceContext priceContext, Boolean ignoreOrderConditions)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountInfoCollection.LoadDiscounts()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDiscountInfo(PriceViewModelSettings settings, Product product)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__46()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__48()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__49()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at CompiledRazorTemplates.Dynamic.RazorEngine_aa986cae7c2e42aabe41ff612cf7dc25.Execute() in C:\inetpub\solutions\Goecker-2022-Staging\Files\Templates\Designs\Swift\Paragraph\Swift_ProductPrice_Custom.cshtml:line 106
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 @using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites 4 @using System.Linq 5 @using Dynamicweb.Core 6 @using NLWI.Core.Factory 7 @using NLWI.Platforms.Dynamicweb9.Specs.ViewModels 8 @using NLWI.Platforms.Dynamicweb9.Specs.Services 9 @using NORRIQ.CustomCode.Razor 10 @using NORRIQ.CustomCode.StockLocations 11 @using System.Text; 12 @using System.Web; 13 14 @* CUSTOMIZED STANDARD SWIFT (v1.15.0) TEMPLATE *@ 15 16 @{ 17 ProductViewModel product = new ProductViewModel(); 18 19 ProductViewModelSettings productSetting = new ProductViewModelSettings 20 { 21 LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID, 22 CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 23 CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2, 24 ShopId = Pageview.Area.EcomShopId 25 }; 26 27 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 28 { 29 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 30 } 31 else if (Pageview.Item["DummyProduct"] != null) 32 { 33 34 string dummyProductId = ""; 35 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 36 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 37 if (productList.Products != null) 38 { 39 foreach (var p in productList.Products) { dummyProductId = p.Id; } 40 ProductViewModel dummyProduct = dummyProductId != "" ? ViewModelFactory.CreateView(productSetting, dummyProductId) : new ProductViewModel(); 41 product = dummyProduct; 42 } 43 else 44 { 45 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 46 } 47 } 48 else if (Pageview.Item["DummyProduct"] == null) 49 { 50 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 51 } 52 53 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 54 bool anonymousUser = Pageview.User == null; 55 bool isErpConnectionDown = !Dynamicweb.Ecommerce.DynamicwebLiveIntegration.TemplatesHelper.IsWebServiceConnectionAvailable(); 56 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 57 58 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 59 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 60 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 61 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 62 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 63 64 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 65 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 66 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 67 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 68 69 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 70 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 71 string order = layout == "horizontal" ? string.Empty : "order-2"; 72 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "px-2 theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 73 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 74 75 var disablePrice = product.ProductFields.ContainsKey("Custom_DisablePrice") ? Convert.ToBoolean(product.ProductFields["Custom_DisablePrice"].Value) : false; //CUSTOM 76 } 77 78 @if (!hidePrice && product.Id != null && !disablePrice) //CUSTOM 79 { 80 string showPricesWithVat = HttpContext.Current.Session["Smartpage:ShowPricesWithVat"] != null ? Convert.ToString(HttpContext.Current.Session["Smartpage:ShowPricesWithVat"]) : Pageview.Area.EcomPricesWithVat.ToLower(); 81 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 82 83 string priceMin = ""; 84 string priceMax = ""; 85 86 string liveInfoClass = ""; 87 string productInfoFeed = ""; 88 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Ecommerce.DynamicwebLiveIntegration.TemplatesHelper.IsLazyLoadingForProductInfoEnabled; 89 if (isLazyLoadingForProductInfoEnabled) 90 { 91 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 92 { 93 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 94 if (!string.IsNullOrEmpty(productInfoFeed)) 95 { 96 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 97 } 98 } 99 liveInfoClass = "js-live-info"; 100 } 101 102 FieldValueViewModel fieldValueViewModel = null; 103 product.ProductFields.TryGetValue("SchillingShowBeforePrice", out fieldValueViewModel); 104 bool showBeforePrice = fieldValueViewModel != null ? Converter.ToBoolean(fieldValueViewModel.Value) : false; 105 106 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" @productInfoFeed> 107 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 108 <span itemprop="priceCurrency" content="@product.Price.CurrencyCode" class="d-none"></span> 109 110 @if (showPricesWithVat == "false" && !neverShowVat) 111 { 112 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 113 { 114 <span itemprop="price" content="" class="d-none"></span> 115 <span class="text-decoration-line-through js-text-decoration-line-through opacity-75 me-3 text-price js-text-price d-none" data-show-if="LiveProductInfo.product.Price.Price != LiveProductInfo.product.PriceBeforeDiscount.Price"></span> 116 } 117 else 118 { 119 string beforePrice = product.PriceBeforeDiscount.PriceWithoutVatFormatted; 120 string informativePrice = product.PriceInformative.PriceWithoutVatFormatted; 121 122 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 123 if (product.Price.Price != product.PriceBeforeDiscount.Price) 124 { 125 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 126 } 127 else if (product.PriceInformative.Price > 0) 128 { 129 <span class="text-decoration-line-through opacity-75 @order">@informativePrice</span> 130 } 131 } 132 } 133 else 134 { 135 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 136 { 137 <span itemprop="price" content="" class="d-none"></span> 138 <span class="text-decoration-line-through js-text-decoration-line-through opacity-75 me-3 text-price js-text-price d-none" data-show-if="LiveProductInfo.product.Price.Price != LiveProductInfo.product.PriceBeforeDiscount.Price"></span> 139 } 140 else 141 { 142 string beforePrice = product.PriceBeforeDiscount.PriceFormatted; 143 string informativePrice = product.PriceInformative.PriceFormatted; 144 145 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 146 147 if (product.Price.Price != product.PriceBeforeDiscount.Price) 148 { 149 <span class="text-decoration-line-through opacity-75 @order"> 150 <span class="text-price">@beforePrice</span> 151 </span> 152 } 153 else if (product.PriceInformative.Price > 0) 154 { 155 <span class="text-decoration-line-through opacity-75 @order"> 156 <span class="text-price">@informativePrice</span> 157 </span> 158 } 159 } 160 } 161 162 @if (showPricesWithVat == "false" && !neverShowVat) 163 { 164 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 165 { 166 <span class="text-price js-text-price"> 167 <div class="spinner-border" role="status"></div> 168 </span> 169 } 170 else 171 { 172 string price = product.Price.PriceWithoutVatFormatted; 173 if (product?.VariantInfo?.VariantInfo != null) 174 { 175 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 176 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 177 } 178 if (priceMin != priceMax) 179 { 180 price = priceMin + " - " + priceMax; 181 } 182 <span class="@theme"> 183 <span class="text-price">@price</span> 184 </span> 185 } 186 } 187 else 188 { 189 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 190 { 191 <span class="text-price js-text-price"> 192 <div class="spinner-border" role="status"></div> 193 </span> 194 } 195 else 196 { 197 string price = product.Price.PriceFormatted; 198 if (product?.VariantInfo?.VariantInfo != null) 199 { 200 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 201 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 202 } 203 if (priceMin != priceMax) 204 { 205 price = priceMin + " - " + priceMax; 206 } 207 <span class="@theme"> 208 <span class="text-price">@price</span> 209 </span> 210 } 211 } 212 213 @* Stock state for Schema.org, start *@ 214 @{ 215 Uri url = Dynamicweb.Context.Current.Request.Url; 216 } 217 218 @{ 219 // Custom: ViaBill integration 220 if (Model.Item.GetBoolean("CustomActivateViaBill") && showPricesWithVat != "false") 221 { 222 <div class="viabill-pricetag" 223 data-view="product" 224 data-price="@product.Price.Price" 225 data-currency="@Dynamicweb.Ecommerce.Common.Context.Currency.Code" 226 data-dynamic-price-trigger-delay="@Model.Item.GetInt32("CustomViaBillPriceDelay")"></div> 227 @Model.Item.GetRawValueString("CustomViaBillScript") 228 } 229 230 // Custom: Anyday integration 231 if (Model.Item.GetBoolean("CustomActivateAnyday") && !String.IsNullOrEmpty(Model.Item.GetRawValueString("CustomAnydayToken")) && showPricesWithVat != "false") 232 { 233 var locale = Dynamicweb.Frontend.PageView.Current().Area.CultureInfo.ToString(); 234 <anyday-price-widget theme="@Model.Item.GetRawValueString("CustomAnydayTheme")" 235 currency="@product.Price.CurrencyCode" 236 price="@product.Price.Price" 237 price-format-locale="@locale" 238 locale="@locale" 239 token="@Model.Item.GetRawValueString("CustomAnydayToken")" 240 fully-clickable="true" 241 debug="info"> 242 </anyday-price-widget> 243 244 @Model.Item.GetRawValueString("CustomAnydayScript") 245 } 246 } 247 248 249 <link itemprop="url" href="@url"> 250 251 @{ 252 bool IsNeverOutOfStock = product.NeverOutOfstock; 253 } 254 255 @if (IsNeverOutOfStock) 256 { 257 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 258 } 259 else 260 { 261 if (product.StockLevel > 0) 262 { 263 <span itemprop="availability" class="d-none">InStock</span> 264 } 265 else 266 { 267 <span itemprop="availability" class="d-none">OutOfStock</span> 268 } 269 } 270 @* Stock state for Schema.org, stop *@ 271 272 </div> 273 274 @if (showPricesWithVat == "false" && !neverShowVat) 275 { 276 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 277 { 278 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate(" Incl. VAT")"></small> 279 } 280 else 281 { 282 string price = product.Price.PriceWithVatFormatted; 283 if (product?.VariantInfo?.VariantInfo != null) 284 { 285 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 286 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 287 } 288 if (priceMin != priceMax) 289 { 290 price = priceMin + " - " + priceMax; 291 } 292 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 293 } 294 } 295 </div> 296 } 297 else if (Pageview.IsVisualEditorMode) 298 { 299 <div class="alert alert-dark m-0" role="alert"> 300 <span>@Translate("No products available")</span> 301 </div> 302 } 303

Beregn pris inkl. fragt

Produktpris
Fragt
Moms
I alt
Error executing template "Designs/Swift/Paragraph/Swift_ProductAddToCart_Custom.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.get_Extender()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountProvider.GetValidDiscountsForProduct(IEnumerable`1 discounts, Product product, Language language, PriceContext priceContext, Boolean ignoreOrderConditions)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountInfoCollection.LoadDiscounts()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDiscountInfo(PriceViewModelSettings settings, Product product)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__46()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__48()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__49()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at CompiledRazorTemplates.Dynamic.RazorEngine_18ebe74f370747248185c2357abbcb91.Execute() in C:\inetpub\solutions\Goecker-2022-Staging\Files\Templates\Designs\Swift\Paragraph\Swift_ProductAddToCart_Custom.cshtml:line 102
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 @using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites 4 @using NLWI.Core.Factory 5 @using NLWI.Platforms.Dynamicweb9.Specs.Services 6 @using NORRIQ.CustomCode.Razor 7 @using System.Web 8 @using System.Globalization 9 @using Dynamicweb.Core.Encoders 10 11 @* CUSTOMIZED STANDARD SWIFT (v1.15.0) TEMPLATE *@ 12 @* NOTE: Item contains unsupported itemfields: ShowAddToFavorites, ShowFavoritesSelectorMasterProduct, ShowQuantitySelector, ShowUnitsSelector, WhenVariantsExist, HideButtonText, Icon, ButtonSize, HideInventory, HideStockState, VariantSelectorServicePageId *@ 13 14 @{ 15 ProductViewModel product = new ProductViewModel(); 16 17 ProductViewModelSettings productSetting = new ProductViewModelSettings 18 { 19 LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID, 20 CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 21 CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2, 22 ShopId = Pageview.Area.EcomShopId 23 }; 24 25 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 26 { 27 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 28 } 29 else if (Pageview.Item["DummyProduct"] != null) 30 { 31 32 string dummyProductId = ""; 33 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 34 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 35 if (productList.Products != null) 36 { 37 foreach (var p in productList.Products) { dummyProductId = p.Id; } 38 ProductViewModel dummyProduct = dummyProductId != "" ? ViewModelFactory.CreateView(productSetting, dummyProductId) : new ProductViewModel(); 39 product = dummyProduct; 40 } 41 else 42 { 43 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetAllProducts(Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 44 } 45 } 46 else if (Pageview.Item["DummyProduct"] == null) 47 { 48 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetAllProducts(Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 49 } 50 51 string fullWidth = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "w-100" : ""; 52 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 53 horizontalAlign = horizontalAlign == "center" ? "justify-content-center" : horizontalAlign; 54 horizontalAlign = horizontalAlign == "end" ? "justify-content-end" : horizontalAlign; 55 horizontalAlign = horizontalAlign == "full" ? "" : horizontalAlign; 56 57 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 58 bool anonymousUser = Pageview.User == null; 59 bool hideAddToCart = anonymousUsersLimitations.Contains("cart") && anonymousUser; 60 hideAddToCart = product.VariantInfo.VariantInfo != null && Model.Item.GetBoolean("CustomHideVariantSelector") ? true : hideAddToCart; 61 hideAddToCart = product.ProductFields.ContainsKey("Custom_DisablePurchase") ? Convert.ToBoolean(product.ProductFields["Custom_DisablePurchase"].Value) : hideAddToCart; //CUSTOM 62 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser; 63 bool hideFavoritesSelector = !string.IsNullOrEmpty(Model.Item.GetString("CustomHideFavoritesSelector")) ? Model.Item.GetBoolean("CustomHideFavoritesSelector") : false; 64 65 var favoriteParameters = new Dictionary<string, object>(); 66 if (!anonymousUser && !hideFavoritesSelector) 67 { 68 IEnumerable<FavoriteList> favoreiteLists = Pageview.User.GetFavoriteLists(); 69 int defaultFavoriteListId = 0; 70 71 if (favoreiteLists.Count() == 1) 72 { 73 foreach (FavoriteList list in favoreiteLists) 74 { 75 defaultFavoriteListId = list.ListId; 76 } 77 } 78 79 favoriteParameters.Add("ListId", defaultFavoriteListId); 80 } 81 } 82 83 @if (!hideAddToCart && product.Id != null) 84 { 85 string url = "/Default.aspx?ID=" + (GetPageIdByNavigationTag("CartService")); 86 if (!url.Contains("LayoutTemplate")) 87 { 88 url += url.Contains("?") ? "&LayoutTemplate=Swift_MiniCart.cshtml" : "?LayoutTemplate=Swift_MiniCart.cshtml"; 89 } 90 91 var productSpecificationService = ObjectFactory.GetInstance<IProductSpecificationService>(); 92 var productSpecs = productSpecificationService.GetProductSpecifications(product.GetAutoId()); 93 94 string flexFill = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "flex-fill" : ""; 95 96 string minQty = product.PurchaseMinimumQuantity != 1 ? "min=\"" + product.PurchaseMinimumQuantity.ToString() + "\"" : "min=\"1\""; 97 string stepQty = product.PurchaseQuantityStep > 1 ? product.PurchaseQuantityStep.ToString() : "1"; 98 string valueQty = product.PurchaseMinimumQuantity > product.PurchaseQuantityStep ? product.PurchaseMinimumQuantity.ToString() : stepQty; 99 string qtyValidCheck = stepQty != "1" ? "onkeyup=\"swift.Cart.QuantityValidate(event)\"" : ""; 100 101 string showPricesWithVat = HttpContext.Current.Session["Smartpage:ShowPricesWithVat"] != null ? Convert.ToString(HttpContext.Current.Session["Smartpage:ShowPricesWithVat"]) : Pageview.Area.EcomPricesWithVat.ToLower(); 102 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 103 104 <div class="d-flex @horizontalAlign @fullWidth item_@Model.Item.SystemName.ToLower()"> 105 <form method="post" action="@url" class="@fullWidth"> 106 <input type="hidden" name="redirect" value="false" /> 107 <input type="hidden" name="ProductId" value="@product.Id" /> 108 <input type="hidden" name="ProductName" value="@HtmlEncoder.HtmlEncode(product.Name)" /> 109 <input type="hidden" name="ProductVariantName" value="@HtmlEncoder.HtmlEncode(product.VariantName)" /> 110 <input type="hidden" name="ProductCurrency" value="@productSetting.CurrencyCode" /> 111 <input type="hidden" name="ProductPrice" value="@(showPricesWithVat == "false" && !neverShowVat ? product.Price.PriceWithoutVat.ToString("0.00", CultureInfo.InvariantCulture) : product.Price.Price.ToString("0.00", CultureInfo.InvariantCulture))" /> 112 <input type="hidden" name="ProductReferer" value="component_ProductAddToCart_Custom"> 113 <input type="hidden" name="cartcmd" value="add" /> 114 115 <input type="hidden" class="js-product-id" value="@product.Id" /> 116 117 @if (!string.IsNullOrEmpty(product.VariantId)) 118 { 119 <input type="hidden" name="VariantId" value="@product.VariantId" /> 120 } 121 @if (!Model.Item.GetBoolean("CustomUseQuantitySelector")) 122 { 123 <input id="Quantity_@product.Id" name="Quantity" value="@valueQty" type="hidden"> 124 125 if (!productSpecs.GetByKey("Preorder").Value.IsYes()) 126 { 127 <button type="button" onclick="swift.Cart.Update(event)" class="btn btn-primary w-100 js-add-to-cart-button" title="@HttpUtility.HtmlEncode(Translate("Add to cart"))" id="AddToCartButton@(product.Id)">@Translate("Add to cart")</button> 128 } 129 else 130 { 131 <button type="button" class="btn btn-secondary w-100 text-uppercase" onclick="Form(this).addData('@HttpUtility.HtmlEncode(product.Name)', '@product.Id')" data-bs-toggle="modal" data-bs-target="#preorderModal"> 132 @Translate("Preorder") 133 </button> 134 } 135 } 136 else 137 { 138 <div class="input-group input-primary-button-group js-input-group d-flex flex-row flex-nowrap"> 139 <label for="Quantity_@(product.Id)" class="visually-hidden">@Translate("Quantity")</label> 140 <input id="Quantity_@product.Id" name="Quantity" value="@valueQty" step="@stepQty" @minQty class="form-control" style="max-width: 96px; min-width:64px;" type="number"> 141 <button type="button" onclick="swift.Cart.Update(event)" class="btn btn-primary flex-fill js-add-to-cart-button" title="@Translate("Add to cart")" id="AddToCartButton@(product.Id)">@Translate("Add to cart")</button> 142 </div> 143 144 if (stepQty != "1") 145 { 146 <div class="invalid-feedback d-none"> 147 @Translate("Please select a quantity that is dividable by") @stepQty 148 </div> 149 } 150 } 151 </form> 152 @if (!anonymousUser && !hideFavoritesSelector) 153 { 154 @RenderPartial("Components/ToggleFavorite.cshtml", product, favoriteParameters) 155 } 156 </div> 157 } 158 else if (!anonymousUser && !hideFavoritesSelector) 159 { 160 <div class="d-flex @horizontalAlign @fullWidth item_@Model.Item.SystemName.ToLower()"> 161 <div class="flex-fill"> 162 @Translate("Add to favorites") @RenderPartial("Components/ToggleFavorite.cshtml", product, favoriteParameters) 163 </div> 164 </div> 165 } 166 else if (Pageview.IsVisualEditorMode) 167 { 168 <div class="alert alert-dark m-0">@Translate("No products available")</div> 169 } 170
  • Fjernlager (2-4 dages lev.) På lager
  • Århus Ikke på lager
  • København På lager

Gør et kup!

Produktet er en del af denne kampagne

Passer godt til

Vores eksperter er klar til at rådgive dig.

Vælg din ekspert herunder eller ring på telefon 35 82 11 00

Henrik Duus Preuss
henrik@goecker.dk
35865108
København

Jakob Worre
jakob@goecker.dk
35865142
Aarhus

Søren Jakobsen
jakobsen@goecker.dk
35865120
København

Bo Christensen
bc@goecker.dk
35865144
Aarhus

Beskrivelse

Premium Luster Photo Paper

Bryllups-, portræt- og kunstfotografer har tradition for at benytte glittet papir til deres fotografier for at opnå førsteklasses resultater.

Epsons Premium Luster Photo Paper er fantastisk til digitale trykkerier og er egnet til brug med alle Epsons blækpatroner. Det har en meget høj farvemætning ved at levere maksimal blækdækning og høj D-Max, så resultatet bliver en ægte fotografisk gengivelse.

Den harpiksbelagte base på 0,25 mm giver en følelse af ægte fotos, og den glittede overflade gengiver en finish, der er kendt for at være foretrukket af professionelle fotografer.

Ligesom alle Epsons medier er dette papir udviklet til at give den højest mulige opløsning og farvemætning.

Specifikationer

Producent Epson
Kategori Papir ark
Overflade Luster
Gramvægt 250 GSM
Base Plast
Størrelse papir ark A3+
Antal ark 100