Error compiling template "Designs/Dwsimple/eCom/Productlist/NoProductFound.cshtml"
Line 113: The type or namespace name 'eCommerce' does not exist in the namespace 'Dynamicweb' (are you missing an assembly reference?)

1 <div class="col-md-12 col-sm-12 col-xs-12"> 2 <h3 class="section-title"> 3 @GetString("Ecom:Group.Name") 4 </h3> 5 <div> 6 @foreach (var group in GetLoop("Subgroups")){ 7 <div class="row"> 8 <div class="col-md-12 col-sm-12 col-xs-12"> 9 <a href="@group.GetString("Ecom:Group.Link.Clean")" title="@group.GetString("Ecom:Group.Name")"> 10 <h2>@group.GetString("Ecom:Group.Name")</h2> 11 </a> 12 @{ 13 var products = Dynamicweb.eCommerce.Products.Product.GetProductsByGroupID(group.GetString("Ecom:Group.ID")); 14 } 15 16 @foreach (var product in products.Take(4)) { 17 var image = "/Files/Images/Ecom/Products/" + product.Number + ".jpg"; 18 var discount = product.Discounts.HasDiscounts.ToString(); 19 20 <div class="col-md-3 col-sm-6 col-xs-12"> 21 <div class="w-box product"> 22 @if (discount == "True") 23 { 24 <div class="bg-2 discount-sticker" style="position:absolute !important; z-index: 1 !important; width:90px !important; height:22px !important"> 25 <h3><div style="text-align: center !important; font-size: 14px !important; line-height:0px !important; color: #fff !important; margin-top:-8px !important">@Translate("On sale!", "On sale!")</div><h3> 26 </div> 27 } 28 <a href="/Default.aspx?id=@GetGlobalValue("Global:Page.ID")&groupid=@group.GetString("Ecom:Group.ID")&productid=@product.IDUrlEncoded"> 29 <figure style="min-height: 180px; min-width: 180px; background: url('/Admin/Public/Getimage.ashx?width=180&height=180&compression=99&Crop=5&image=@image') no-repeat 0 0; background-position: center;"> 30 </figure> 31 </a> 32 <h4 style="min-height:22px !important; font-size: 16px !important; text-align: center !important;"><a href="">@Truncate(product.Name, 20)</a></h4> 33 <div class="w-footer"> 34 <a href="/Default.aspx?id=@GetGlobalValue("Global:Page.ID")&groupid=@group.GetString("Ecom:Group.ID")&productid=@product.IDUrlEncoded" class="btn-xs btn-two cart-btn pull-right">@Translate("Read more", "Read more")</a> 35 @if(Dynamicweb.Input.FormatDouble(product.Price.Price) > 0){ 36 if (discount == "False") 37 { 38 <span class="price pull-left" style="font-size: 16px !important">@product.Price.PriceWithoutVATFormatted</span> 39 } else { 40 <div class="price" style="font-size: 16px !important; line-height: 8px !important">@product.Price.PriceWithoutVAT</div> 41 <div class="price" style="color: #AAAAAA !important; font-size: 10px !important; position: absolute; text-decoration: line-through; line-height: 8px !important">@product.Discounts.PriceWithDifference</div> 42 } 43 <div style="clear:both;"><small>@product.Price.PriceFormatted inkl. moms</small></div> 44 } 45 </div> 46 </div> 47 </div> 48 } 49 <div class="col-md-12 col-sm-12 col-xs-12">&nbsp;</div> 50 <div class="col-md-12 col-sm-12 col-xs-12"> 51 <a href="@group.GetString("Ecom:Group.Link.Clean")" class="btn btn-two btn-xs pull-right">@Translate("Show more products", "Show more products") &nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i></a> 52 </div> 53 <div class="col-md-12 col-sm-12 col-xs-12"> 54 <hr></hr> 55 </div> 56 </div> 57 </div> 58 <div class="row">&nbsp;</div> 59 } 60 </div> 61 </div> 62 63 @functions { 64 private string Truncate (string value, int count) 65 { 66 value = StripHtmlTagByCharArray(value); 67 68 if (value.Length > count) 69 { 70 value = value.Substring(0, count - 1) + "..."; 71 } 72 73 return value; 74 } 75 76 public static string StripHtmlTagByCharArray(string htmlString) 77 { 78 char[] array = new char[htmlString.Length]; 79 int arrayIndex = 0; 80 bool inside = false; 81 82 for (int i = 0; i < htmlString.Length; i++) 83 { 84 char let = htmlString[i]; 85 if (let == '<') 86 { 87 inside = true; 88 continue; 89 } 90 if (let == '>') 91 { 92 inside = false; 93 continue; 94 } 95 if (!inside) 96 { 97 array[arrayIndex] = let; 98 arrayIndex++; 99 } 100 } 101 return new string(array, 0, arrayIndex); 102 } 103 }

Kontaktoplysninger

  • Dansk Kassesystem A/S
  • Elholm 2
    DK-6400 Sønderborg
    CVR. 32331246
  • Telefon: +45 7412 3340
  • Email: mail@danskkassesystem.dk
 
 


www.danskkassesystem.dk