COK ΠΟΤΗΡΙΑ ΛΑΤΕ 25CL ΣΕΤ 2

0263374
 
Error compiling template "Designs/Swift/Paragraph/DiscountExplanation.cshtml"
Line 62: ) expected
Line 62: ; expected
Line 62: } expected

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 2 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 17 using Dynamicweb.Ecommerce.ProductCatalog; 18 19 #line default 20 #line hidden 21 22 23 public class RazorEngine_0488643af8404460ad3925e4c523e2c2 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> { 24 25 #line hidden 26 27 public RazorEngine_0488643af8404460ad3925e4c523e2c2() { 28 } 29 30 public override void Execute() { 31 WriteLiteral("\r\n"); 32 33 34 #line 4 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 35 36 ProductViewModel product = null; 37 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 38 { 39 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 40 } 41 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 42 { 43 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 44 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 45 46 if (productList?.Products is object) 47 { 48 product = productList.Products[0]; 49 } 50 } 51 52 53 54 //CS NT.. 55 56 string DiscountExplanation_Text = "";//"Buy 30 euros worth of products and get this for"; 57 string DiscountExplanation_percentage = "";//"€ 5.25"; 58 59 string DiscountExplanation = ""; 60 foreach (var p in product.ProductFields) 61 { 62 if (p.Key == "DiscountExplanation" && p.Value != null !string.IsNullOrWhiteSpace(p.Value.ToString())) 63 { 64 DiscountExplanation = p.Value.ToString(); 65 DiscountExplanation = DiscountExplanation.Replace("±","€").Replace("�","€"); 66 // split based on $ character DiscountExplanation_Text 67 var DiscountExplanation_Unsplitted = DiscountExplanation.Split("$".ToCharArray()); 68 if (DiscountExplanation_Unsplitted.Length == 2) 69 { 70 if (!string.IsNullOrWhiteSpace(DiscountExplanation_Unsplitted[0])) 71 { 72 DiscountExplanation_Text = DiscountExplanation_Unsplitted[0]; 73 } 74 if (!string.IsNullOrWhiteSpace(DiscountExplanation_Unsplitted[1])) 75 { 76 DiscountExplanation_percentage = DiscountExplanation_Unsplitted[1]; 77 } 78 DiscountExplanation_Text = Translate(DiscountExplanation_Text.Trim()) + " <span class='discountExplanationPercentage_Span'>€" + DiscountExplanation_percentage + "</span>"; 79 } 80 else 81 { 82 DiscountExplanation_Text = DiscountExplanation; 83 } 84 break; 85 } 86 } 87 88 DiscountExplanation_Text = DiscountExplanation_Text.Replace("±","€").Replace("�","€"); 89 90 91 92 93 #line default 94 #line hidden 95 WriteLiteral("\r\n\r\n\r\n"); 96 97 98 #line 63 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 99 if (product is object) 100 { 101 string fontsize_style = "font-size:" + Model.Item.GetRawValueString("Font_Size", "12px") + ";"; 102 103 104 105 #line default 106 #line hidden 107 WriteLiteral(" <div"); 108 109 WriteLiteral(" class=\"DiscountExplanation_Container\""); 110 111 WriteLiteral(">\r\n"); 112 113 114 #line 68 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 115 116 117 #line default 118 #line hidden 119 120 #line 68 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 121 if(!string.IsNullOrWhiteSpace(DiscountExplanation_Text)) 122 { 123 124 125 #line default 126 #line hidden 127 WriteLiteral(" <div"); 128 129 WriteLiteral(" style=\"width:100%\""); 130 131 WriteLiteral(" class=\"DiscountExplanation\""); 132 133 WriteAttribute("style", Tuple.Create(" style=\"", 2765), Tuple.Create("\"", 2788) 134 135 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 136 , Tuple.Create(Tuple.Create("", 2773), Tuple.Create<System.Object, System.Int32>(fontsize_style 137 138 #line default 139 #line hidden 140 , 2773), false) 141 ); 142 143 WriteLiteral(">"); 144 145 146 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 147 Write(DiscountExplanation_Text); 148 149 150 #line default 151 #line hidden 152 WriteLiteral("</div>\r\n"); 153 154 155 #line 71 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 156 } 157 158 159 #line default 160 #line hidden 161 WriteLiteral(" </div>\r\n"); 162 163 164 #line 73 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 165 } 166 else if (Pageview.IsVisualEditorMode) 167 { 168 169 170 #line default 171 #line hidden 172 WriteLiteral("\t<div"); 173 174 WriteLiteral(" class=\"alert alert-dark m-0\""); 175 176 WriteLiteral(" role=\"alert\""); 177 178 WriteLiteral(">\r\n\t\t<span>"); 179 180 181 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 182 Write(Translate("No products available")); 183 184 185 #line default 186 #line hidden 187 WriteLiteral("</span>\r\n\t</div>\r\n"); 188 189 190 #line 79 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\DiscountExplanation.cshtml" 191 } 192 193 #line default 194 #line hidden 195 } 196 } 197 } 198

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 22 23 //CS NT.. 24 25 string DiscountExplanation_Text = "";//"Buy 30 euros worth of products and get this for"; 26 string DiscountExplanation_percentage = "";//"€ 5.25"; 27 28 string DiscountExplanation = ""; 29 foreach (var p in product.ProductFields) 30 { 31 if (p.Key == "DiscountExplanation" && p.Value != null !string.IsNullOrWhiteSpace(p.Value.ToString())) 32 { 33 DiscountExplanation = p.Value.ToString(); 34 DiscountExplanation = DiscountExplanation.Replace("±","€").Replace("�","€"); 35 // split based on $ character DiscountExplanation_Text 36 var DiscountExplanation_Unsplitted = DiscountExplanation.Split("$".ToCharArray()); 37 if (DiscountExplanation_Unsplitted.Length == 2) 38 { 39 if (!string.IsNullOrWhiteSpace(DiscountExplanation_Unsplitted[0])) 40 { 41 DiscountExplanation_Text = DiscountExplanation_Unsplitted[0]; 42 } 43 if (!string.IsNullOrWhiteSpace(DiscountExplanation_Unsplitted[1])) 44 { 45 DiscountExplanation_percentage = DiscountExplanation_Unsplitted[1]; 46 } 47 DiscountExplanation_Text = Translate(DiscountExplanation_Text.Trim()) + " <span class='discountExplanationPercentage_Span'>€" + DiscountExplanation_percentage + "</span>"; 48 } 49 else 50 { 51 DiscountExplanation_Text = DiscountExplanation; 52 } 53 break; 54 } 55 } 56 57 DiscountExplanation_Text = DiscountExplanation_Text.Replace("±","€").Replace("�","€"); 58 59 60 } 61 62 63 @if (product is object) 64 { 65 string fontsize_style = "font-size:" + Model.Item.GetRawValueString("Font_Size", "12px") + ";"; 66 67 <div class="DiscountExplanation_Container"> 68 @if(!string.IsNullOrWhiteSpace(DiscountExplanation_Text)) 69 { 70 <div style="width:100%" class="DiscountExplanation" style="@fontsize_style">@DiscountExplanation_Text</div> 71 } 72 </div> 73 } 74 else if (Pageview.IsVisualEditorMode) 75 { 76 <div class="alert alert-dark m-0" role="alert"> 77 <span>@Translate("No products available")</span> 78 </div> 79 }
€ 2.99 €1,50/1 pcs InStock
Σε απόθεμα
 

Λεπτομέρειες

Barcode
8435123280763
Μάρκα
Cok
Σε Προσφορά
No
Supplier Item
50-0009
Χρώμα
 
Κατηγορία
Ποτήρια
Διαστάσεις
 
Χωρητικότητα
250ml
Υλικό
 
Βάρος
900g