Error executing template "Designs/danfilter/eCom/Product/espresso.cshtml"System.IO.FileNotFoundException: Could not load file or assembly 'Dynamicweb.Ecommerce.LiveIntegration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.File name: 'Dynamicweb.Ecommerce.LiveIntegration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'at Co3.Danfilter.Website.Services.ProductService.GetPrices(Product product, PriceType priceType)at CompiledRazorTemplates.Dynamic.RazorEngine_ca57644a32c447669a571b5271355af0.HasDiscount(String productID) in E:\Dynamicweb.NET\Solutions\danfilter.espresso4.dk\files\Templates\Designs\danfilter\eCom\Product\espresso.cshtml:line 100at CompiledRazorTemplates.Dynamic.RazorEngine_ca57644a32c447669a571b5271355af0.Execute() in E:\Dynamicweb.NET\Solutions\danfilter.espresso4.dk\files\Templates\Designs\danfilter\eCom\Product\espresso.cshtml:line 682at 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.b__0(TextWriter writer)at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)at Dynamicweb.Rendering.Template.RenderRazorTemplate()WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
1 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 2 @using System.Activities.Expressions 3 @using Dynamicweb.Ecommerce.Prices 4 @using Co3.Espresso.Website.Services 5 @using Co3.Danfilter.Website.Models 6 @using Dynamicweb.Ecommerce.Common.eCom7 7 @using Dynamicweb.Rendering 8 @using System.Web 9 @using Dynamicweb.Frontend 10 @using System.Collections.Generic 11 @using Co3.Danfilter.Data.Models 12 @using Co3.Danfilter.Data.Services 13 @using Co3.Espresso.Base.Models 14 @using Dynamicweb.Ecommerce.Common 15 @using Economic.Api.Client.WebService 16 @using Price = Co3.Danfilter.Data.Models.Price 17 @using danfilterService = Co3.Danfilter.Website.Services 18 @using System; 19 @using System.Text; 20 @using Co3.Danfilter.Website.Models.FrontEnd 21 @using Co3.Espresso.Base.Extensions 22 @using Co3.Espresso.Website.Models.FrontEnd.Elements 23 @using Dynamicweb.Ecommerce 24 @using Dynamicweb.Ecommerce.Orders 25 @using Dynamicweb.Ecommerce.Products 26 @using ProductService = Co3.Espresso.Website.Services.ProductService 27 28 @using System.Globalization 29 @using System.Security.Cryptography.X509Certificates 30 @using Co3.Danfilter.Website.Models.FrontEnd 31 @using danfilterModels = Co3.Danfilter.Data.Models 32 @using Co3.Danfilter.Website.Services 33 @using Co3.Espresso.Base.Extensions 34 @using Co3.Espresso.Website.Models.FrontEnd 35 @using Co3.Espresso.Website.Services 36 @using Dynamicweb.Content 37 @using Dynamicweb.Ecommerce 38 @using Dynamicweb.Frontend 39 @using Dynamicweb.Rendering 40 @using Dynamicweb.Rendering.Translation 41 @using EcomContext = Dynamicweb.Ecommerce.Common.Context 42 @using ProductService = Co3.Espresso.Website.Services.ProductService 43 @using danfilterService = Co3.Danfilter.Website.Services 44 @using Dynamicweb.Ecommerce.Orders 45 @using Co3.Danfilter.Data.Services 46 @using Co3.Espresso.Website.Models.FrontEnd.Elements 47 @using Dynamicweb.Ecommerce.Products 48 @using Dynamicweb.SystemTools 49 @using System.Web 50 51 @functions { 52 53 public string getCountryCodeFromArea( Area area ) 54 { 55 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); 56 return regionInfo.TwoLetterISORegionName; 57 } 58 59 public static string GetStandardCollapseToggleTextExpand() 60 { 61 return "Se mere"; 62 } 63 64 public static string GetStandardCollapseToggleTextCollapse() 65 { 66 return "Se mindre"; 67 } 68 69 public static bool HasFreeDelivery( string productID = "" ) 70 { 71 bool returnValue = false; 72 if ( !string.IsNullOrEmpty( productID ) ) 73 { 74 Shipping shippingWithLowestFreeFeeAmount = Services.Shippings.GetShippings( EcomContext.LanguageID )?.Where( s => s.Active && s.FreeFeeAmount != default( double ) )?.OrderBy( s => s.FreeFeeAmount ).FirstOrDefault(); 75 if ( shippingWithLowestFreeFeeAmount != null ) 76 { 77 EspressoPrice price = danfilterService.ProductService.Instance.GetPrice( productID ); 78 EspressoPrice priceBefore = danfilterService.ProductService.Instance.GetBeforePrice( productID ); 79 EspressoPrice priceToUse; 80 if ( priceBefore.Price != default( double ) && priceBefore.Price < price.Price ) 81 { 82 priceToUse = priceBefore; 83 } 84 else 85 { 86 priceToUse = price; 87 } 88 returnValue = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( shippingWithLowestFreeFeeAmount.FreeFeeAmount ).Price <= priceToUse.Price; 89 } 90 } 91 return returnValue; 92 } 93 94 public static bool HasDiscount( string productID = "" ) 95 { 96 bool returnValue = false; 97 98 if ( !string.IsNullOrEmpty( productID ) ) 99 {100 Co3.Danfilter.Data.Models.PriceList prices = danfilterService.ProductService.Instance.GetPrices( productID, EcomContext.LanguageID, PriceType.QuantityPrice );101 returnValue = prices.Prices.Count > 1;102 }103 return returnValue;104 }105106 public static EspressoPrice GetLowestEspressoPrice(string productID, danfilterModels.PriceList prices )107 {108 EspressoPrice returnValue = danfilterService.ProductService.Instance.GetPrice( productID );109 foreach ( KeyValuePair< double, danfilterModels.Price > price in prices.Prices )110 {111 EspressoPrice itemEspressoPrice = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductPrice ) );112 if ( itemEspressoPrice.Price < returnValue.Price )113 {114 returnValue = itemEspressoPrice;115 }116 }117 return returnValue;118 }119120 public static EspressoPrice GetLowestEspressoBeforePrice(string productID, danfilterModels.PriceList prices )121 {122 EspressoPrice espressoPrice = danfilterService.ProductService.Instance.GetPrice( productID );123 EspressoPrice returnValue = danfilterService.ProductService.Instance.GetBeforePrice( productID );124125 foreach ( KeyValuePair< double, danfilterModels.Price > price in prices.Prices )126 {127 EspressoPrice itemEspressoPrice = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductPrice ) );128 EspressoPrice itemEspressoBeforePrice = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductBasePrice ) );129 if ( itemEspressoPrice.Price < espressoPrice.Price )130 {131 returnValue = itemEspressoBeforePrice;132 }133 }134 return returnValue;135 }136137 public static EspressoPrice GetHighestEspressoPrice(string productID, danfilterModels.PriceList prices )138 {139 EspressoPrice returnValue = danfilterService.ProductService.Instance.GetPrice( productID );140 foreach ( KeyValuePair< double, danfilterModels.Price > price in prices.Prices )141 {142 EspressoPrice itemEspressoPrice = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductPrice ) );143 if ( itemEspressoPrice.Price > returnValue.Price )144 {145 returnValue = itemEspressoPrice;146 }147 }148 return returnValue;149 }150151 public static EspressoPrice GetHighestEspressoBeforePrice(string productID, danfilterModels.PriceList prices )152 {153 EspressoPrice espressoPrice = danfilterService.ProductService.Instance.GetPrice( productID );154 EspressoPrice returnValue = danfilterService.ProductService.Instance.GetBeforePrice( productID );155156 foreach ( KeyValuePair< double, danfilterModels.Price > price in prices.Prices )157 {158 EspressoPrice itemEspressoPrice = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductPrice ) );159 EspressoPrice itemEspressoBeforePrice = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductBasePrice ) );160 if ( itemEspressoPrice.Price > espressoPrice.Price )161 {162 returnValue = itemEspressoBeforePrice;163 }164 }165 return returnValue;166 }167168 public static string GetPricePrefix( string productID, danfilterModels.PriceList prices )169 {170 string returnValue = string.Empty;171 EspressoPrice espressoPrice = danfilterService.ProductService.Instance.GetPrice( productID );172 foreach ( KeyValuePair< double, danfilterModels.Price > price in prices.Prices )173 {174 EspressoPrice itemEspressoPrice = danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductPrice ) );175 if ( itemEspressoPrice.Price < espressoPrice.Price )176 {177 returnValue = string.Format("{0} ", Translation.GetTranslation( "eCom Productlist - Price from - Text" ));178 break;179 }180 }181 return returnValue;182 }183184 }185186187188189 @helper ProductDescription( string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null )190 {191 if ( string.IsNullOrEmpty( content ) == false )192 {193 ClassList headingClassList = new ClassList();194 headingClassList.AddClasses( "col-12" );195 ClassList contentClassList = new ClassList();196 contentClassList.AddClasses( "col-12" );197198 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand )199200 if ( string.IsNullOrEmpty( heading ) == false )201 {202 <div class="@headingClassList">203 <h2 class="h2">@heading</h2>204 </div>205 }206 <div class="@contentClassList">207 @content208 </div>209210 @sectionEnd()211 }212 }213214215 @helper ProductVideo( string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null )216 {217 if ( string.IsNullOrEmpty( videoURL ) == false )218 {219 ClassList headingClassList = new ClassList();220 headingClassList.AddClasses( "col-12" );221 ClassList contentClassList = new ClassList();222 contentClassList.AddClasses( "col-12" );223224225 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )226227 if ( string.IsNullOrEmpty( heading ) == false )228 {229 <div class="@headingClassList">230 <p class="h2">@heading</p>231 </div>232 }233234 <div class="@contentClassList">235 <div class="embed-responsive embed-responsive-16by9 mb-2">236 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>237 </div>238 </div>239 @sectionEnd()240 }241 }242243 @helper ProductRelatedProducts( string sectionClasses = "e-section", string contentClasses = null, string heading = null,244 IEnumerable< RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem > productLoop = null )245 {246 if ( productLoop != null && productLoop.Any() == true )247 {248 ClassList headingClassList = new ClassList();249 headingClassList.AddClasses( "col-12" );250 ClassList contentClassList = new ClassList();251 contentClassList.AddClasses( "col-12" );252253 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )254255 if ( string.IsNullOrEmpty( heading ) == false )256 {257 <div class="@headingClassList">258 <h2 class="text-center">@heading</h2>259 </div>260 }261 <div class="@contentClassList">262 <div class="e-products mb-2">263 <div class="row justify-content-center">264 @{265 string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth( null ).ToResponsiveClasses();266 }267 @foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem product in productLoop )268 {269 @ProductlistItem( product, productlistItemClassList )270 }271 </div>272 </div>273 </div>274275 @sectionEnd()276 }277 }278279 @helper ProductRelatedProductsDanFilter( string sectionClasses = "e-section", string contentClasses = null, string heading = null,280 IEnumerable< RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem > productLoop = null )281 {282 if ( productLoop != null && productLoop.Any() == true )283 {284 ClassList headingClassList = new ClassList();285 headingClassList.AddClasses( "col-12" );286 ClassList contentClassList = new ClassList();287 contentClassList.AddClasses( "col-12" );288289 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )290291 if ( string.IsNullOrEmpty( heading ) == false )292 {293 <div class="@headingClassList">294 <h2 class="text-center">@heading</h2>295 </div>296 }297 <div class="@contentClassList">298 <div class="e-products mb-2">299 <div class="row justify-content-center">300 @{301 string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth( null ).ToResponsiveClasses();302 }303 @foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem product in productLoop )304 {305 @ProductlistItemDanFilter( product, productlistItemClassList )306 }307 </div>308 </div>309 </div>310311 @sectionEnd()312 }313 }314315 @helper ProductlistItem( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem product, string productlistItemClassList = null )316 {317 if ( product != null )318 {319 dynamic filterTypes = new List< dynamic >();320 foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem productCategory in product.GetLoop( "ProductCategories" ) )321 {322 foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem productCategoryField in productCategory.GetLoop( "ProductCategoryFields" ) )323 {324 if ( productCategoryField.GetString( "Ecom:Product.CategoryField.ID" ) == "B2CFilterType" )325 {326 if ( !string.IsNullOrEmpty( productCategoryField.GetString( "Ecom:Product.CategoryField.Value.Clean" ) ) )327 {328 string[] filterTypesLabels = productCategoryField.GetString( "Ecom:Product.CategoryField.OptionLabel" ).Split( ',' );329 string[] filterTypeValues = productCategoryField.GetString( "Ecom:Product.CategoryField.Value.Clean" ).Split( ',' );330 int index = 0;331 foreach ( string filterTypeValue in filterTypeValues )332 {333 filterTypes.Add( new334 {335 url = string.Format( "/admin/public/getimage.ashx?Crop=0&amp;Image=/Files/Images/danfilter/ikon-{0}.png&Format=png&Width=40&Height=40&Quality=75", filterTypeValue ),336 label = Translation.GetTranslation("eCom Product - Filter type label - " + filterTypesLabels[ index ])337 } );338 ++index;339 }340 }341 }342 }343 }344345 danfilterModels.PriceList prices = danfilterService.ProductService.Instance.GetPrices( product.GetString( "Ecom:Product.ID" ), EcomContext.LanguageID, PriceType.QuantityPrice );346 EspressoPrice productEspressoPrice = GetLowestEspressoPrice( product.GetString( "Ecom:Product.ID" ), prices );347 EspressoPrice productEspressoBeforePrice = GetLowestEspressoBeforePrice( product.GetString( "Ecom:Product.ID" ), prices );348 string pricePrefix = GetPricePrefix(product.GetString( "Ecom:Product.ID" ), prices);349350 dynamic productData = new351 {352 id = product.GetString( "Ecom:Product.ID" ),353 variantId = product.GetString( "Ecom:Product.VariantID" ),354 url = ProductService.Instance.GetProductLink( product.GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ) ),355 number = product.GetString( "Ecom:Product.Number" ),356 name = ProductService.Instance.GetName( product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ) ),357 imageLarge = ImageService.Instance.GetImageURL( product.GetString( "Ecom:Product.ImageDefault.Clean" ), 400, 400, 5 ),358 pricePrefix = pricePrefix,359 price = productEspressoPrice,//danfilterService.ProductService.Instance.GetPrice( product.GetString( "Ecom:Product.ID" ) ),360 priceBefore = productEspressoBeforePrice,//danfilterService.ProductService.Instance.GetBeforePrice( product.GetString( "Ecom:Product.ID" ) ),361 descriptionShortExtra01 = product.GetString( "Ecom:Product:Field.DescriptionShortExtra01" ),362 discountLable = HasDiscount(product.GetString( "Ecom:Product.ID" )),363 freeDeliveryLable = HasFreeDelivery(product.GetString( "Ecom:Product.ID" )),364 filterTypes = filterTypes,365 stock = new366 {367 id = product.GetString( "Ecom:Product:Stock.ID" ),368 quantity = product.GetString( "Ecom:Product.Stock" ),369 text = product.GetString( "Ecom:Product:Stock.Text" ),370 delivery = product.GetString( "Ecom:Product:Stock.DeliveryText" )371 }372 };373 bool showBeforePrice = productData.priceBefore.Price != 0 && productData.priceBefore.Price > productData.price.Price;374375376 <div class="@productlistItemClassList">377 <div class="e-products-item js-e-products-item js-e-products-item-@productData.id js-e-block-link e-block-link " data-variant-id="@productData.variantId">378 <div class="e-products-item-container">379 <div class="e-products-item-image-container">380 <a class="e-products-item-image-wrapper" href="@productData.url" onclick="trackProductClick(@HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( productData )))">381 <img src="@productData.imageLarge" alt="" class="e-products-item-image">382 @if ( productData.freeDeliveryLable && !productData.discountLable )383 {384 <span class="danfilter-productlist-item-label label-freedelivery">385 <span class="label-text">@Translation.GetTranslation( "eCom Product - Label - Free delivery" )</span>386 </span>387 }388 @if ( productData.discountLable && !productData.freeDeliveryLable )389 {390 <span class="danfilter-productlist-item-label label-discount">391 <span class="label-text">@Translation.GetTranslation( "eCom Product - Label - Discounts" )</span>392 </span>393 }394 @if ( productData.discountLable && productData.freeDeliveryLable )395 {396 <span class="danfilter-productlist-item-label label-both">397 <span class="label-text">@Translation.GetTranslation( "eCom Product - Label - Free delivery and discounts" )</span>398 </span>399 }400 </a>401 </div>402 <div class="e-products-item-text-container text-center">403 <h3 class="e-products-item-name mb-0">404 <a href="@productData.url" onclick="trackProductClick(@HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( productData )))">405 @productData.name406 </a>407 </h3>408 <div class="danfilter-productlist-item-pictogram-wrapper">409 @if ( productData.filterTypes.Count > 0 )410 {411 foreach ( dynamic filterType in productData.filterTypes )412 {413 <img src="@filterType.url" alt="@filterType.label" title="@filterType.label">414 }415 }416 </div>417418 @{419 ProductStatus productStatus = Co3.Danfilter.Website.Services.ProductService.Instance.GetProductStatus( productData.id, productData.variantId );420 }421 @RenderingService.Instance.PartialView( "/eCom/Product/_partials/productStatusStock.cshtml", productStatus )422 @if ( showBeforePrice )423 {424 <p class="e-products-item-text mb-0 small">425 <small class="e-products-item-price m-0 e-product-price-before text-muted">426 <a href="@productData.url" onclick="trackProductClick(@HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( productData )))">427 @productData.priceBefore428 </a>429 </small>430 </p>431 }432 <p class="e-products-item-text mb-0">433 <small class="e-products-item-price">434 <a href="@productData.url" onclick="trackProductClick(@HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( productData )))">435 @string.Format("{0}{1}", pricePrefix, productData.price)436 </a>437 </small>438 </p>439440 <form action="/system/data/cart" class="e-product-form js-e-product-form" method="post">441 <input name="CartCmd" type="hidden" value="Add">442 <input type="hidden" name="ProductID" value="@productData.id">443 <input name="VariantID" type="hidden" value="">444 <input name="UnitID" type="hidden" value="">445 <input name="Redirect" type="hidden" value="">446 <div class="danfilter-product-list-add-to-cart-wrapper">447 <input name="Quantity" type="hidden" value="1">448 <button class="btn btn-primary" type="submit">@Translation.GetTranslation( "eCom Product - Add To Cart - Button" )</button>449 </div>450 </form>451452 </div>453 </div>454 </div>455 </div>456 }457 }458459460 @helper ProductlistItemDanFilter( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem product, string productlistItemClassList = null )461 {462 if ( product != null )463 {464 dynamic filterTypes = new List< dynamic >();465 foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem productCategory in product.GetLoop( "ProductCategories" ) )466 {467 foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem productCategoryField in productCategory.GetLoop( "ProductCategoryFields" ) )468 {469 if ( productCategoryField.GetString( "Ecom:Product.CategoryField.ID" ) == "B2CFilterType" )470 {471 if ( !string.IsNullOrEmpty( productCategoryField.GetString( "Ecom:Product.CategoryField.Value.Clean" ) ) )472 {473 string[] filterTypesLabels = productCategoryField.GetString( "Ecom:Product.CategoryField.OptionLabel" ).Split( ',' );474 string[] filterTypeValues = productCategoryField.GetString( "Ecom:Product.CategoryField.Value.Clean" ).Split( ',' );475 int index = 0;476 foreach ( string filterTypeValue in filterTypeValues )477 {478 filterTypes.Add( new479 {480 url = string.Format( "/admin/public/getimage.ashx?Crop=0&amp;Image=/Files/Images/danfilter/ikon-{0}.png&Format=png&Width=40&Height=40&Quality=75", filterTypeValue ),481 label = filterTypesLabels[ index ]482 } );483 ++index;484 }485 }486 }487 }488 }489490 danfilterModels.PriceList prices = danfilterService.ProductService.Instance.GetPrices( product.GetString( "Ecom:Product.ID" ), EcomContext.LanguageID, PriceType.QuantityPrice );491 EspressoPrice productEspressoPrice = GetLowestEspressoPrice( product.GetString( "Ecom:Product.ID" ), prices );492 EspressoPrice productEspressoBeforePrice = GetLowestEspressoBeforePrice( product.GetString( "Ecom:Product.ID" ), prices );493 string pricePrefix = GetPricePrefix(product.GetString( "Ecom:Product.ID" ), prices);494495 dynamic productData = new496 {497 id = product.GetString( "Ecom:Product.ID" ),498 variantId = product.GetString( "Ecom:Product.VariantID" ),499 url = ProductService.Instance.GetProductLink( product.GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ) ),500 number = product.GetString( "Ecom:Product.Number" ),501 name = ProductService.Instance.GetName( product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ) ),502 imageLarge = ImageService.Instance.GetImageURL( product.GetString( "Ecom:Product.ImageDefault.Clean" ), 400, 400, 5 ),503 pricePrefix = pricePrefix,504 price = productEspressoPrice,//danfilterService.ProductService.Instance.GetPrice( product.GetString( "Ecom:Product.ID" ) ),505 priceBefore = productEspressoBeforePrice,//danfilterService.ProductService.Instance.GetBeforePrice( product.GetString( "Ecom:Product.ID" ) ),506 descriptionShortExtra01 = product.GetString( "Ecom:Product:Field.DescriptionShortExtra01" ),507 discountLable = HasDiscount(product.GetString( "Ecom:Product.ID" )),508 freeDeliveryLable = HasFreeDelivery(product.GetString( "Ecom:Product.ID" )),509 filterTypes = filterTypes,510 stock = new511 {512 id = product.GetString( "Ecom:Product:Stock.ID" ),513 quantity = product.GetString( "Ecom:Product.Stock" ),514 text = product.GetString( "Ecom:Product:Stock.Text" ),515 delivery = product.GetString( "Ecom:Product:Stock.DeliveryText" )516 }517 };518 bool showBeforePrice = productData.priceBefore.Price != 0 && productData.priceBefore.Price > productData.price.Price;519520521 <div class="@productlistItemClassList">522 <div class="e-products-item js-e-products-item js-e-products-item-@productData.id js-e-block-link e-block-link " data-variant-id="@productData.variantId">523 <div class="e-products-item-container">524 <div class="e-products-item-image-container">525 <a class="e-products-item-image-wrapper" href="@productData.url">526 <img src="@productData.imageLarge" alt="" class="e-products-item-image">527 </a>528 </div>529 <div class="e-products-item-text-container text-center">530 <h3 class="e-products-item-name mb-0">531 <a href="@productData.url">532 @productData.name533 </a>534 </h3>535 <div class="danfilter-productlist-item-pictogram-wrapper">536 @if ( productData.filterTypes.Count > 0 )537 {538 foreach ( dynamic filterType in productData.filterTypes )539 {540 <img src="@filterType.url" alt="@filterType.label" title="@filterType.label">541 }542 }543 </div>544545 @{546 ProductStatus productStatus = Co3.Danfilter.Website.Services.ProductService.Instance.GetProductStatus( productData.id, productData.variantId );547 }548 @RenderingService.Instance.PartialView( "/eCom/Product/_partials/productStatusStock.cshtml", productStatus )549550551 <form action="/system/data/cart" class="e-product-form js-e-product-form" method="post">552 <input name="CartCmd" type="hidden" value="Add">553 <input type="hidden" name="ProductID" value="@productData.id">554 <input name="VariantID" type="hidden" value="">555 <input name="UnitID" type="hidden" value="">556 <input name="Redirect" type="hidden" value="">557 <div class="danfilter-product-list-add-to-cart-wrapper">558 <input name="Quantity" type="hidden" value="1">559 <button class="btn btn-primary" type="submit">@Translation.GetTranslation( "eCom Product - Add To Cart - Button" )</button>560 </div>561 </form>562563 </div>564 </div>565 </div>566 </div>567 }568 }569570571 @helper sectionStart( string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null )572 {573 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId;574 ClassList sectionClassList = new ClassList();575 sectionClassList.AddClasses( sectionClasses );576 ClassList contentClassList;577578 if ( contentClasses == null )579 {580 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item );581 }582 else583 {584 contentClassList = new ClassList();585 contentClassList.AddClasses( contentClasses );586 }587588 // TODO: Split collapse logic into separate helper function.589 string collapseId = Guid.NewGuid().ToString( "N" );590 ClassList collapseToggleClassList = new ClassList();591 if ( sectionCollapse )592 {593 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" );594 collapseToggleClassList.AddClasses( contentClasses );595 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" );596 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" );597 }598599 @:<section class="@sectionClassList" id="@sectionId">600 @:<div class="container-fluid">601 @:<div class="row">602603 // TODO: Split collapse logic into separate helper function.604 if ( sectionCollapse )605 {606 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId">607 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button">608 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i>609 </button>610 <small class="h4 p-section-collapse-toggle-text" data-expand-text="@( string.IsNullOrEmpty( collapseToggleTextExpand ) ? GetStandardCollapseToggleTextExpand() : collapseToggleTextExpand )" data-collapse-text="@( string.IsNullOrEmpty( collapseToggleTextCollapse ) ? GetStandardCollapseToggleTextCollapse() : collapseToggleTextCollapse )"></small>611 </div>612 }613614 @:<div class="@contentClassList" id="@collapseId">615 @:<div class="row">616 }617618 @helper sectionEnd()619 {620 @:</div>621 @:</div>622 @:</div>623 @:</div>624 @:</section>625 }626627628629630 @{631 bool isUserAuthenticated = PageView.Current().User != null;632633 @* Global Image modal variable used in part image carousel *@634 string carouselClassList = "";635 bool showImageCarouselNavigation = GetLoop( "Details" ).Any();636 if ( !showImageCarouselNavigation )637 {638 carouselClassList = "d-none";639 }640641 dynamic filterTypes = new List< dynamic >();642 foreach ( LoopItem productCategory in GetLoop( "ProductCategories" ) )643 {644 foreach ( LoopItem productCategoryField in productCategory.GetLoop( "ProductCategoryFields" ) )645 {646 if ( productCategoryField.GetString( "Ecom:Product.CategoryField.ID" ) == "B2CFilterType" )647 {648 if ( !string.IsNullOrEmpty( productCategoryField.GetString( "Ecom:Product.CategoryField.Value.Clean" ) ) )649 {650 string[] filterTypesLabels = productCategoryField.GetString( "Ecom:Product.CategoryField.OptionLabel" ).Split( ',' );651 string[] filterTypeValues = productCategoryField.GetString( "Ecom:Product.CategoryField.Value.Clean" ).Split( ',' );652 int index = 0;653 foreach ( string filterTypeValue in filterTypeValues )654 {655 filterTypes.Add( new656 {657 url = string.Format( "/admin/public/getimage.ashx?Crop=0&amp;Image=/Files/Images/danfilter/ikon-{0}.png&Format=png&Width=80&Height=80&Quality=100", filterTypeValue ),658 label = Translate("eCom Product - Filter type label - " + filterTypesLabels[ index ], filterTypesLabels[ index ])659 } );660 ++index;661 }662 }663 }664 }665 }666667 List< LoopItem > productSpecFields = new List< LoopItem >();668 foreach ( LoopItem fieldDisplayGroups in GetLoop( "FieldDisplayGroups" ) )669 {670 if ( fieldDisplayGroups.GetString( "Ecom:FieldDisplayGroup.ID" ) == "3" )671 {672 foreach ( LoopItem field in fieldDisplayGroups.GetLoop( "Fields" ) )673 {674 if ( field.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) != "" && field.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) != "0" )675 {676 productSpecFields.Add( field );677 }678 }679 }680 }681682 bool discountLable = HasDiscount( GetString( "Ecom:Product.ID" ) );683 bool freeDeliveryLable = HasFreeDelivery( GetString( "Ecom:Product.ID" ) );684685 PriceList prices = danfilterService.ProductService.Instance.GetPrices( GetString( "Ecom:Product.ID" ), Context.LanguageID, PriceType.QuantityPrice );686 EspressoPrice currentPrice = danfilterService.ProductService.Instance.GetPrice( GetString( "Ecom:Product.ID" ) );687 EspressoPrice beforePrice = danfilterService.ProductService.Instance.GetBeforePrice( GetString( "Ecom:Product.ID" ) );688689690 EspressoPrice espressoPrice = GetLowestEspressoPrice( GetString( "Ecom:Product.ID" ), prices );691 EspressoPrice espressoBeforePrice = GetLowestEspressoBeforePrice( GetString( "Ecom:Product.ID" ), prices );692 string pricePrefix = GetPricePrefix( GetString( "Ecom:Product.ID" ), prices );693 bool showBeforePrice = espressoBeforePrice.Price != 0 && espressoBeforePrice.Price > espressoPrice.Price;694695 Product product = Dynamicweb.Ecommerce.Services.Products.GetProductById( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ), Context.LanguageID );696 ProductStatus productStatus = Co3.Danfilter.Website.Services.ProductService.Instance.GetProductStatus( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ) );697 }698699 @sectionEnd()700701 <div class="e-product">702 @sectionStart( sectionClasses: "e-section pb-2" )703704 <div class="col-12">705 <div class="row">706 <div class="align-items-center col-12 col-sm-5 d-flex">707 <div class="e-product-text-container">708 <h1 class="e-product-name mb-1">709 @ProductService.Instance.GetName( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ) )710 </h1>711 <p class="small">712 @Translate( "eCom Product - Product Number - Text", "Number" ) @GetString( "Ecom:Product.Number" )713 </p>714 <div class="danfilter-pictogram-details">715 @if ( filterTypes.Count > 0 )716 {717 foreach ( dynamic filterType in filterTypes )718 {719 <img src="@filterType.url" class="mb-2 mr-1" alt="@filterType.label" title="@filterType.label">720 }721 }722 </div>723724 <div class="e-product-text mb-2">725 @GetString( "Ecom:Product.ShortDescription" )726 </div>727728 @danfilterService.RenderingService.Instance.PartialView( "/eCom/Product/_partials/productStatusStock.cshtml", productStatus )729730 <p class="e-product-price h2 mb-1 mt-0">731732 @if ( GetDouble( "Ecom:Product:Field.BeforePrice" ) != 0 )733 {734 <span class="e-product-price-before small text-muted">735 @PriceService.Instance.FormatPrice( GetDouble( "Ecom:Product:Field.BeforePrice" ) )736 </span>737 }738 @if ( showBeforePrice )739 {740 <span class="e-product-price-before small text-muted d-block">741 @*@beforePrice*@742 @espressoBeforePrice743 </span>744 }745746 @*@currentPrice*@747 @string.Format("{0}{1}", pricePrefix, espressoPrice)748749 </p>750751 @{752 if ( prices.Prices.Count > 1 )753 {754 string QuantityPricesTranslation = Translate( "eCom Product - Quantity Prices - Label", "Pris pr. stk. v/{quantity} stk." );755 <div class="border-top danfilter-quantity-price-list mb-1 small">756 @foreach ( KeyValuePair< double, Price > price in prices.Prices )757 {758 StringBuilder labelQuantityPrices = new StringBuilder( QuantityPricesTranslation );759 labelQuantityPrices.Replace( "{quantity}", price.Value.Quantity.ToString() );760761 <div class="border-bottom mx-0 row">762 <div class="col-7 pl-0">@labelQuantityPrices</div>763 <div class="col-5 pr-0">@PriceService.Instance.FormatPrice( danfilterService.ProductService.Instance.GetPriceWithOrWithoutVAT( decimal.ToDouble( price.Value.ProductPrice ) ).Price )</div>764 </div>765 }766 </div>767 }768 }769770 <div class="e-product-form-addtocart justify-content-center w-100"><form action="/system/data/cart" class="e-product-form js-e-product-form js-e-product-form-addtocart d-flex d-lg-block justify-content-center py-1" method="post"><input name="CartCmd" type="hidden" value="Add"><input name="ProductID" type="hidden" value="@GetString("Ecom:Product.ID")"><input name="VariantID" type="hidden" value=""><input name="Redirect" type="hidden" value=""><input name="Name" type="hidden" value="@ProductService.Instance.GetName(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID"))"><input name="Number" type="hidden" value="@GetString("Ecom:Product.Number")"><input name="Price" type="hidden" value="@ProductService.Instance.GetPrice(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID")).Price.ToJavaScript()"><input name="CurrencyCode" type="hidden" value="@Dynamicweb.Ecommerce.Common.Context.Currency.Code"><input name="Quantity" type="number" class="product-quantity w-25 mr-1 align-bottom font-weight-bold text-center" value="1"><button class="btn btn-success" type="submit">@Translate("eCom Product - Add To Cart - Button", "Add to cart")</button></form></div>771772 </div>773 </div>774 <div class="col-12 col-sm-7 order-first">775 <div class="e-product-image-container">776 @using Co3.Espresso.Base.Models777 @using Dynamicweb.Rendering778 @using Dynamicweb.Rendering.Translation779 <div class="e-product-image-container">780 <div class="carousel slide" data-interval="false" data-ride="carousel" id="js-e-product-image-carousel">781 <div class="e-product-image-wrapper">782783 @if ( @freeDeliveryLable && !discountLable )784 {785 <span class="danfilter-productlist-item-label label-freedelivery">786 <span class="label-text">@Translation.GetTranslation( "eCom Product - Label - Free delivery" )</span>787 </span>788 }789 @if ( discountLable && !freeDeliveryLable )790 {791 <span class="danfilter-productlist-item-label label-discount">792 <span class="label-text">@Translation.GetTranslation( "eCom Product - Label - Discounts" )</span>793 </span>794 }795 @if ( discountLable && freeDeliveryLable )796 {797 <span class="danfilter-productlist-item-label label-both">798 <span class="label-text">@Translation.GetTranslation( "eCom Product - Label - Free delivery and discounts" )</span>799 </span>800 }801802 <div class="carousel-inner">803 <div class="active carousel-item active" data-target="#js-e-product-image-modal" data-toggle="modal">804 <img src="/admin/public/getimage.ashx?Crop=0&Image=@GetValue( "Ecom:Product.ImageDefault.Clean" )&Format=jpg&Width=600&Height=&Quality=90" alt="" class="e-product-image" data-target="#js-e-product-image-modal-carousel" data-slide-to="0">805 </div>806 @foreach ( ElementWithIndex< LoopItem > image in GetLoop( "Details" ).WithIndex() )807 {808 int imageIndex = image.Index + 1;809810 <div class="carousel-item" data-target="#js-e-product-image-modal" data-toggle="modal">811 <img src="/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )&Format=jpg&Width=600&Height=&Quality=90" alt="" class="e-product-image" data-target="#js-e-product-image-modal-carousel" data-slide-to="@imageIndex">812 </div>813 }814815 <a class="carousel-control-prev @carouselClassList" data-slide="prev" data-target="#js-e-product-image-carousel"></a>816 <a class="carousel-control-next @carouselClassList" data-slide="next" data-target="#js-e-product-image-carousel"></a>817818 </div>819 </div>820 <ol class="carousel-indicators @carouselClassList">821 <li class="active" data-slide-to="0" data-target="#js-e-product-image-carousel">822 <span style="background-image: url('/admin/public/getimage.ashx?Crop=0&Image=@GetValue( "Ecom:Product.ImageDefault.Clean" )&Format=jpg&Width=50&Height=&Quality=90')"></span>823 </li>824 @foreach ( ElementWithIndex< LoopItem > image in GetLoop( "Details" ).WithIndex() )825 {826 int imageIndex = image.Index + 1;827 <li data-target="#js-e-product-image-carousel" data-slide-to="@imageIndex">828 <span style="background-image: url('/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )&Format=jpg&Width=50&Height=&Quality=75')"></span>829 </li>830 }831 </ol>832 </div>833 </div>834835 </div>836 @using Dynamicweb.Admin.dk.dynamicweb.templates837 <div class="modal modal-fullscreen fade e-product-image-modal" id="js-e-product-image-modal" data-backdrop="false" data-keyboard="true">838 <div class="modal-dialog">839 <div class="modal-content">840 <div class="modal-body">841842 <button type="button" class="close" data-dismiss="modal">843 <i class="material-icons">close</i>844 </button>845846 <div id="js-e-product-image-modal-carousel" class="carousel slide" data-keyboard="true" data-interval="false">847 <div class="carousel-inner">848 <div class="carousel-item active" style="background-image:url('/admin/public/getimage.ashx?Crop=0&Image=@GetValue("Ecom:Product.ImageDefault.Clean")&Format=jpg&Width=&Height=1800&Quality=90')">849 </div>850 @foreach (LoopItem image in GetLoop("Details")){851 <div class="carousel-item" style="background-image:url('/admin/public/getimage.ashx?Crop=0&Image=@image.GetString("Ecom:Product:Detail.Image.Clean")&Format=jpg&Width=&Height=1800&Quality=90')">852 </div>853 }854 </div>855856 <ol class="carousel-indicators @carouselClassList">857 <li data-target="#js-e-product-image-modal-carousel" data-slide-to="0" class="active">858 <span style="background-image:url('/admin/public/getimage.ashx?Crop=0&Image=@GetValue("Ecom:Product.ImageDefault.Clean")&Format=jpg&Width=50&Height=&Quality=90')"></span>859 </li>860 @foreach (ElementWithIndex<LoopItem> image in GetLoop("Details").WithIndex()){861 int imageIndex = image.Index + 1;862 <li data-target="#js-e-product-image-modal-carousel" data-slide-to="@imageIndex">863 <span style="background-image:url('/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString("Ecom:Product:Detail.Image.Clean")&Format=jpg&Width=50&Height=&Quality=75')"></span>864 </li>865 }866 </ol>867868 <a class="carousel-control-prev @carouselClassList" data-target="#js-e-product-image-modal-carousel" data-slide="prev"></a>869 <a class="carousel-control-next @carouselClassList" data-target="#js-e-product-image-modal-carousel" data-slide="next"></a>870871 </div>872 </div>873 </div>874 </div>875 </div>876877 </div>878 </div>879 </div>880881 @sectionEnd()882883 @if ( productSpecFields.Count > 0 )884 {885 int columnChangeIndex = ( int ) productSpecFields.Count / 2;886 @sectionStart( "e-section mt-1 pt-2 pb-1 mb-2 border-top", "col-12 col-md-10 col-lg-8 mx-auto is-lg" )887 <div class="col-12">888 <p class="h2">@Translate( "eCom Product - Specs - Heading", "Specifikationer" )</p>889 </div>890 <div class="col-6">891 <table class="table table-striped">892 @foreach ( ElementWithIndex< LoopItem > field in productSpecFields.WithIndex() )893 {894 <tr>895 <td>@field.Element.GetString( "Ecom:FieldDisplayGroup.Field.Name" )</td>896 <td>@field.Element.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) </td>897 </tr>898 if ( productSpecFields.Count > 3 && field.Index == columnChangeIndex )899 {900 @:</table>901 @:</div>902 @:<div class="col-6">903 @:<table class="table table-striped">904 }905 }906 </table>907 </div>908 @sectionEnd()909 }910911912 @ProductDescription(913 heading: Translate( "eCom Product - Description - Heading", "Beskrivelse" ),914 content: GetString( "Ecom:Product.LongDescription" ),915 contentClasses: "col-12 col-md-10 col-lg-8 mx-auto is-md",916 sectionClasses: "e-section mt-1 pt-2 pb-1 mb-2 bg-light",917 collapseToggleTextExpand: Translate( "eCom Product - View more - Text", "View more" ),918 collapseToggleTextCollapse: Translate( "eCom Product - View less - Text", "View less" ),919 sectionCollapse: true920 )921922 @GetString( "Ecom:Product:Field.DescriptionExtra01" )923924 @ProductVideo(925 heading: GetString( "Ecom:Product:Field.VideoHeading" ),926 videoURL: GetString( "Ecom:Product:Field.Video" ),927 contentClasses: "col-12 col-md-10 col-lg-8 pt-4 pb-4 mx-auto text-center"928 )929930931 @foreach ( LoopItem group in GetLoop( "ProductRelatedGroups" ) )932 {933 @ProductRelatedProducts(934 heading: group.GetString( "Ecom:Product:RelatedGroup.Name" ),935 productLoop: group.GetLoop( "RelatedProducts" ).Take( 4 )936 )937 }938 @* @ProductRelatedProducts( *@939 @* heading: Translate( "eCom Product - Others bought these alternatives - Heading", "Others bought these alternatives" ), *@940 @* productLoop: GetLoop( "eCom:Related.WhatAboutTheseProducts" ).Where( p => p.GetString( "Ecom:Product.Number" ) != GetString( "Ecom:Product.Number" ) ).Take( 4 ), *@941 @* sectionClasses: "e-section p-section p-section-border-top" *@942 @* ) *@943944 @* @ProductRelatedProducts( *@945 @* heading: Translate( "eCom Product - Customers who bought this also bought - Heading", "Customers who bought this also bought" ), *@946 @* productLoop: GetLoop( "eCom:Related.CustomersWhoBoughtThisItemAlsoBought" ).Take( 4 ), *@947 @* sectionClasses: "e-section p-section p-section-border-top" *@948 @* ) *@949950 @* @ProductRelatedProducts( *@951 @* heading: Translate( "eCom Product - Recently viewed items - Heading", "Recently viewed items" ), *@952 @* productLoop: GetLoop( "eCom:Related.YouHaveSeenTheseProducts" ).Take( 4 ), *@953 @* sectionClasses: "e-section p-section p-section-border-top" *@954 @* ) *@955956 @sectionStart( "e-section d-none" )957958 <div class="e-product-text-container">959 <h2 class="m-0">@ProductService.Instance.GetName( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ) )</h2>960 <p class="small">961 @Translate( "eCom Product - Product Number - Text", "Number" ) @GetString( "Ecom:Product.Number" )962 </p>963 <div class="e-product-delivery mb-2">964 @if ( string.IsNullOrEmpty( GetString( "Ecom:Product:Stock.ID" ) ) == false )965 {966 <ul class="material-icons-ul list-condensed mb-0 text-heading font-weight-bold">967 @if ( GetInteger( "Ecom:Product.Stock" ) > 0 )968 {969 <li class="d-none">970 <i class="material-icons text-primary">check</i>@GetString( "Ecom:Product:Stock.Text" )</li>971 }972 else973 {974 <li class="d-none">975 <i class="material-icons text-danger">close</i>@GetString( "Ecom:Product:Stock.Text" )</li>976 }977 <li>978 <i class="material-icons text-primary">check</i>@GetString( "Ecom:Product:Stock.DeliveryText" )</li>979 <li>980 <i class="material-icons text-primary">check</i>@Translate( "eCom Product - Delivery Policy - Text", "Free delivery" )</li>981 <li>982 <i class="material-icons text-primary">check</i>@Translate( "eCom Product - Return Policy - Text", "Free returns" )</li>983 </ul>984 }985986987 </div>988 <p class="e-product-price h4 mb-2">989 @if ( showBeforePrice )990 {991 <span class="e-product-price-before small text-muted d-block">992 @*@beforePrice*@993 @espressoBeforePrice994 </span>995 }996997 @*@currentPrice*@998 @string.Format("{0}{1}", pricePrefix, espressoPrice)9991000 </p>1001 <div class="e-product-form-addtocart justify-content-center w-100"><form action="/system/data/cart" class="e-product-form js-e-product-form js-e-product-form-addtocart d-flex d-lg-block justify-content-center py-1" method="post"><input name="CartCmd" type="hidden" value="Add"><input name="ProductID" type="hidden" value="@GetString("Ecom:Product.ID")"><input name="VariantID" type="hidden" value=""><input name="Redirect" type="hidden" value=""><input name="Name" type="hidden" value="@ProductService.Instance.GetName(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID"))"><input name="Number" type="hidden" value="@GetString("Ecom:Product.Number")"><input name="Price" type="hidden" value="@ProductService.Instance.GetPrice(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID")).Price.ToJavaScript()"><input name="CurrencyCode" type="hidden" value="@Dynamicweb.Ecommerce.Common.Context.Currency.Code"><input name="Quantity" type="number" class="product-quantity w-25 mr-1 align-bottom font-weight-bold text-center" value="1"><button class="btn btn-success" type="submit">@Translate("eCom Product - Add To Cart - Button", "Add to cart")</button></form></div>1002 </div>10031004 @sectionEnd()10051006 <script type="application/ld+json">1007 {1008 "@@context" : "http://schema.org",1009 "@@type" : "Product",1010 "description" : "@HttpUtility.HtmlEncode( GetString("Ecom:Product.LongDescription").StripHtml() )",1011 "mpn" : "@GetString("Ecom:Product.Number").StripHtml()",1012 "name" : "@ProductService.Instance.GetName( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ) ).StripHtml()",1013 "image" : "@( HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + GetString("Ecom:Product.ImageDefault.Clean") )",1014 "offers" : {1015 "@@type" : "Offer",1016 "availability" : "http://schema.org/InStock",1017 "price" : "@ProductService.Instance.GetPrice( GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID") ).Price.ToJavaScript()",1018 "priceCurrency" : "@EcomContext.Currency.Code"1019 }1020 }1021 </script>102210231024 <script>1025 dataLayer.push({1026 "ecommerce": {1027 "detail": {1028 "products": [{1029 "name": "@ProductService.Instance.GetName( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ) )",1030 "id": "@GetString("Ecom:Product.Number")",1031 "price": "@ProductService.Instance.GetPrice( GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID") ).Price.ToJavaScript()"1032 }]1033 }1034 }1035 });1036 </script>1037103810391040 <code class="js-e-breadcrumb-item-append" data-text="@HttpUtility.HtmlAttributeEncode( GetString( "Ecom:Product.Name" ) )" data-link="@HttpUtility.HtmlAttributeEncode( ProductService.Instance.GetProductLink( GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), GetString( "Ecom:Product.ID" ) ) )"></code>10411042 </div >1043 @sectionStart()1044
keyboard_arrow_up