Enter Password to Access This Site

Incorrect password

SEBAMED

(0)

SEBAMED SENSITIVE SKIN NOURISHING HAND CREAM 75 ML

12769
PACKET
LYD 24,000 OutOfStock

You need a prescription to purchase this product. Book an appointment with our doctors.

Error executing template "/Designs/Swift/Paragraph/Cus_Quantity_ProductAddToCart.cshtml"
System.FormatException: The input string '-1' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Convert.ToDouble(String value)
   at CustomServices.Services.DiscountService.GetLiveStock(String productNumber, String shopId, String unitId, String langId)
   at CompiledRazorTemplates.Dynamic.RazorEngine_14e50284724c4e4eb480e095447cee72.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   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> @using Dynamicweb.Ecommerce.ProductCatalog @using Dynamicweb.Core.Encoders @using System.Globalization @using Dynamicweb.Ecommerce.Products @using CustomServices.Services @using System.Net; @functions { string DoubleToString(double? value) { if (value.HasValue) { return value.Value.ToString(CultureInfo.InvariantCulture); } return null; } } @{ ProductViewModel product = null; if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) { product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; } else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) { var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); if (productList?.Products is object) { product = productList.Products[0]; } } string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); bool anonymousUser = Pageview.User == null; bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); bool hideAddToCart = anonymousUsersLimitations.Contains("cart") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHideAddToCart") && isErpConnectionDown; hideAddToCart = Pageview.IsVisualEditorMode ? false : hideAddToCart; } @if (product is object && !hideAddToCart) { string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); horizontalAlign = horizontalAlign == "center" ? "justify-content-center" : horizontalAlign; horizontalAlign = horizontalAlign == "end" ? "justify-content-end" : horizontalAlign; horizontalAlign = horizontalAlign == "full" ? "" : horizontalAlign; bool favoritesSelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowAddToFavorites")) ? Model.Item.GetBoolean("ShowAddToFavorites") : false; bool quantitySelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowQuantitySelector")) ? Model.Item.GetBoolean("ShowQuantitySelector") : false; bool unitsSelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowUnitsSelector")) ? Model.Item.GetBoolean("ShowUnitsSelector") : false; bool hideInventory = !string.IsNullOrEmpty(Model.Item.GetString("HideInventory")) ? Model.Item.GetBoolean("HideInventory") : false; bool hideStockState = !string.IsNullOrEmpty(Model.Item.GetString("HideStockState")) ? Model.Item.GetBoolean("HideStockState") : false; string display = ""; display = product.ProductType == ProductType.Service ? "d-none" : ""; string buttonSize = Model.Item.GetRawValueString("ButtonSize", "regular"); string inputSize = string.Empty; switch (buttonSize) { case "small": inputSize = " input-group-sm"; buttonSize = " btn-sm"; break; case "regular": buttonSize = string.Empty; break; case "large": inputSize = " input-group-lg"; buttonSize = " btn-lg"; break; } string iconPath = "/Files/icons/"; string url = "/Default.aspx?ID=" + (GetPageIdByNavigationTag("CartService")); if (!url.Contains("LayoutTemplate")) { url += url.Contains("?") ? "&LayoutTemplate=Swift_MiniCart.cshtml" : "?LayoutTemplate=Swift_MiniCart.cshtml"; } string whenVariantsExist = Model.Item.GetRawValueString("WhenVariantsExist", "hide"); string flexFill = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "flex-fill" : ""; string fullWidth = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "w-100" : ""; string addToCartIcon = Model.Item.GetRawValueString("Icon", iconPath + "shopping-cart.svg"); string addToCartLabel = !addToCartIcon.Contains("_none") ? $"<span class=\"icon-2\">{ReadFile(addToCartIcon)}</span>" : ""; addToCartLabel += !addToCartIcon.Contains("_none") && !Model.Item.GetBoolean("HideButtonText") ? " " : ""; addToCartLabel += !Model.Item.GetBoolean("HideButtonText") ? $"<span>{Translate("ADD TO CART")}</span>" : ""; bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); bool userHasPendingQuote = Dynamicweb.Ecommerce.Common.Context.Cart != null && Dynamicweb.Ecommerce.Common.Context.Cart.IsQuote; if (product.VariantInfo.VariantInfo == null || whenVariantsExist == "disable") { string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : product.DefaultUnitId; if (string.IsNullOrEmpty(unitId) && product?.UnitOptions != null) { if (product.UnitOptions.FirstOrDefault<UnitOptionViewModel>() != null) { unitId = product.UnitOptions.FirstOrDefault<UnitOptionViewModel>().Id; } } double? stepQty = product.PurchaseQuantityStep > 0 ? product.PurchaseQuantityStep : 1; double? minQty = product.PurchaseMinimumQuantity > 0 ? product.PurchaseMinimumQuantity : 1; double? valueQty = minQty > stepQty ? minQty : stepQty; string disableAddToCart = null; double? maxQty = null; DiscountService discountService = new DiscountService(); 2 double stock = discountService.GetLiveStock(product.Number, Pageview.Area.EcomShopId, unitId, Pageview.Area.EcomLanguageId); 3 4 if (product.ProductType == Dynamicweb.Ecommerce.Products.ProductType.Stock && !product.NeverOutOfstock) { disableAddToCart = (stock <= 0) || (!product.NeverOutOfstock && isLazyLoadingForProductInfoEnabled) ? "disabled" : disableAddToCart; 5 maxQty = stock; 6 } disableAddToCart = whenVariantsExist == "disable" && product.VariantInfo.VariantInfo != null && string.IsNullOrEmpty(product.VariantId) ? "disabled" : disableAddToCart; var currentCart = Dynamicweb.Ecommerce.Common.Context.Cart; bool isClickCollect = false; int orderlinecount = 0; if (currentCart != null) { if (currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "isClickAndCollect").Value != null) { if (currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "isClickAndCollect").Value.ToString() != "") { isClickCollect = Convert.ToBoolean(currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "isClickAndCollect").Value.ToString()); } } if (currentCart.OrderLines != null) { orderlinecount = currentCart.OrderLines.CountOnlyProducts; } } disableAddToCart = (isClickCollect && orderlinecount > 0) ? "disabled" : disableAddToCart; if (unitsSelector && product.UnitOptions.Count > 0) { <form method="post" action="/Default.aspx?ID=@(Pageview.Page.ID)&ProductId=@product.Id" id="UnitSelectorForm_@(product.Id)_@(product.VariantId.Replace(".", "_"))_@Model.ID"> <input type="hidden" name="redirect" value="false"> <input type="hidden" name="VariantID" value="@product.VariantId"> <input type="hidden" name="UnitID" class="js-unit-id" value="@unitId"> </form> 7 } <div class="d-flex @horizontalAlign @fullWidth js-input-group item_@Model.Item.SystemName.ToLower() @display"> @if (!anonymousUser && favoritesSelector) { @RenderPartial("Components/ToggleFavorite.cshtml", product) } <form method="post" action="@url" class="@fullWidth" style="z-index: 1"> <input type="hidden" name="redirect" value="false"> <input type="hidden" name="ProductId" value="@product.Id"> <input type="hidden" name="ProductName" value="@HtmlEncoder.HtmlEncode(product.Name)"> <input type="hidden" name="ProductVariantName" value="@product.VariantName"> <input type="hidden" name="ProductCurrency" value="@Dynamicweb.Ecommerce.Common.Context.Currency.Code"> <input type="hidden" name="ProductPrice" value="@PriceViewModelExtensions.ToStringInvariant(product.Price)"> <input type="hidden" name="ProductReferer" value="component_ProductAddToCart"> <input type="hidden" name="cartcmd" value="add"> <input type="submit" class="d-none" onclick="event.preventDefault();"> @* Fix for enterKey should not redirect to minicart page *@ @if (!string.IsNullOrEmpty(product.VariantId)) { <input type="hidden" name="VariantId" value="@product.VariantId"> } <template class="js-step-quantity-warning"> <div class="modal-header"> <h1 class="modal-title fs-5">@Translate("The quantity is not valid")</h1> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> @Translate("Please select a quantity that is dividable by") @stepQty </div> </template> <template class="js-min-quantity-warning"> <div class="modal-header"> <h1 class="modal-title fs-5">@Translate("The product could not be added to the cart")</h1> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> @Translate("The quantity is not valid. You must buy at least") @product.PurchaseMinimumQuantity </div> </template> <template class="js-value-missing-warning"> <div class="modal-header"> <h1 class="modal-title fs-5">@Translate("No amount specified")</h1> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> @Translate("Specify an amount to add to the cart") </div> </template> @if (userHasPendingQuote) { <input type="hidden" name="PendingQuote" value="true"> <template class="js-pending-quote-notice"> <div class="modal-header"> <h1 class="modal-title fs-5">@Translate("Pending Quote")</h1> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="@Translate("Close")"></button> </div> <div class="modal-body"> @Translate("You need to complete your current quote or empty the cart before adding this product to cart.") </div> </template> } @if (quantitySelector || (!anonymousUser && product.VariantInfo.VariantInfo != null) || (!anonymousUser && favoritesSelector)) { <input type="hidden" id="Unit_@(product.Id)_@product.VariantId.Replace(".", "_")" name="UnitID" value="@unitId" /> } <div class="w-100 cus-detail__addcartsec"> <div class="input-primary-button-group flex-nowrap@(inputSize)"> @if (quantitySelector) { <div class="cus_quantity-container cus_bg cus_RoundCorners"> <button type="button" id="decrease" onclick="DecrDetailQty('@minQty');">&#8722;</button> <input id="InputQuantity" name="Quantity" value="@DoubleToString(valueQty)" step="@DoubleToString(stepQty)" min="@DoubleToString(minQty)" class="form-control swift_quantity-field" style="min-width: 60px; max-width: 100px; z-index: 1" type="number"> <button type="button" id="increase" onclick="IncrDetailQty('@product.Id','@product.VariantId.Replace(".", "_")','@unitId');">&#43;</button> </div> } </div> <div class="d-flex w-100 "> <button type="button" style="display:none;" id="AddToCartButton_@(product.Id)_@(product.VariantId)" onclick="swift.Cart.Update(event);UpdateClickCollectStoreForProduct('',0,'@product.Id','@unitId');" /> <button type="button" onclick="CustomDetailAddtoCartFeed('@product.Id','@product.VariantId','@unitId');" class="btn btn-primary ProductAddToCartBtn @(buttonSize) @flexFill js-add-to-cart-button" style="white-space: nowrap;" @disableAddToCart title="@Translate("Add to cart")" id="AddToCartButton@(product.Id)_@Pageview.CurrentParagraph.ID"> @if (!Model.Item.GetBoolean("HideButtonText")) { <span class="text-nowrap d-flex align-items-center justify-content-center gap-2"> @addToCartLabel </span> } else { @addToCartLabel } </button> </div> </div> </form> </div> } else if (whenVariantsExist == "modal") { string ButtonShape = Model.Item.GetRawValueString("VariantButtonShape", "square"); string buttonAspectRatio = Model.Item.GetRawValueString("VariantImageAspectRatio", "56%"); string buttonText = Translate("Select"); string variantId = !string.IsNullOrWhiteSpace(product.VariantId) ? product.VariantId : product.DefaultVariantId; string variantSelectorServicePageId = !string.IsNullOrEmpty(Model.Item.GetString("VariantSelectorServicePageId")) ? Model.Item.GetLink("VariantSelectorServicePageId").PageId.ToString() : ""; variantSelectorServicePageId = variantSelectorServicePageId != "" ? variantSelectorServicePageId : GetPageIdByNavigationTag("VariantSelectorService").ToString(); <div class="d-flex @horizontalAlign w-100 item_@Model.Item.SystemName.ToLower()"> @if (!anonymousUser && favoritesSelector) { @RenderPartial("Components/ToggleFavorite.cshtml", product) } <form action="/Default.aspx?ID=@variantSelectorServicePageId" data-response-target-element="DynamicModalContent" data-preloader="inline" style="z-index: 1" class="@fullWidth"> <input type="hidden" name="ProductID" value="@product.Id"> <input type="hidden" name="VariantID" value="@variantId"> <input type="hidden" name="QuantitySelector" value="@quantitySelector.ToString()"> <input type="hidden" name="HideInventory" value="@hideInventory.ToString()"> <input type="hidden" name="HideStockState" value="@hideStockState.ToString()"> <input type="hidden" name="ButtonLayout" value="@ButtonShape"> <input type="hidden" name="ButtonAspectRatio" value="@buttonAspectRatio"> <input type="hidden" name="VariantSelectorServicePage" value="@variantSelectorServicePageId"> <input type="hidden" name="ViewType" value="ModalContent"> @if (isLazyLoadingForProductInfoEnabled) { @* If lazy loading is enabled, bypass it because we're loading a modal window, so render everything as if it was server-side *@ <input type="hidden" name="getproductinfo" value="true"> } <button type="button" onclick="swift.PageUpdater.Update(event)" class="btn btn-primary@(buttonSize) @fullWidth" title="@Translate("Select")" data-bs-toggle="modal" data-bs-target="#DynamicModal" id="OpenVariantSelectorModal@(product.Id)_@Pageview.CurrentParagraph.ID">@buttonText</button> </form> </div> } } else if (Pageview.IsVisualEditorMode) { <div class="alert alert-dark m-0">@Translate("No products available")</div> }
Error executing template "/Designs/Swift/Paragraph/Custom_Swift_ProductClickCollect.cshtml"
System.FormatException: The input string '-1' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Convert.ToDouble(String value)
   at CustomServices.Services.DiscountService.GetCCLiveStock(String productNumber, String storeId, String unitId, String langId)
   at CompiledRazorTemplates.Dynamic.RazorEngine_f3abe334c5b14822b76fed4f69053710.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   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.Products 4 @using Dynamicweb.Core.Encoders 5 @using System.Globalization 6 @using Dynamicweb.Ecommerce.Stocks; 7 @using CustomServices.Services 8 9 @functions { 10 string DoubleToString(double? value) 11 { 12 if (value.HasValue) 13 { 14 return value.Value.ToString(CultureInfo.InvariantCulture); 15 } 16 return null; 17 } 18 } 19 20 @{ 21 ProductViewModel product = null; 22 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 23 { 24 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 25 } 26 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 27 { 28 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 29 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 30 31 if (productList?.Products is object) 32 { 33 product = productList.Products[0]; 34 } 35 } 36 37 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 38 bool anonymousUser = Pageview.User == null; 39 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 40 bool hideAddToCart = anonymousUsersLimitations.Contains("cart") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHideAddToCart") && isErpConnectionDown; 41 hideAddToCart = Pageview.IsVisualEditorMode ? false : hideAddToCart; 42 43 var currentCart = Dynamicweb.Ecommerce.Common.Context.Cart; 44 bool isClickCollect = false; 45 string CCStoreId = ""; 46 int orderlinecount = 0; 47 if (currentCart != null) 48 { 49 if (currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "isClickAndCollect").Value != null) 50 { 51 if (currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "isClickAndCollect").Value.ToString() != "") 52 { 53 isClickCollect = Convert.ToBoolean(currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "isClickAndCollect").Value.ToString()); 54 } 55 } 56 if (currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "ClickAndCollectStore").Value != null) 57 { 58 CCStoreId = currentCart.OrderFieldValues.FirstOrDefault(x => x.OrderField.SystemName == "ClickAndCollectStore").Value.ToString(); 59 } 60 if (currentCart.OrderLines != null) 61 { 62 orderlinecount = currentCart.OrderLines.CountOnlyProducts; 63 } 64 } 65 string unitId = ""; 66 } 67 68 @if (product is object && !hideAddToCart) 69 { 70 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 71 horizontalAlign = horizontalAlign == "center" ? "justify-content-center" : horizontalAlign; 72 horizontalAlign = horizontalAlign == "end" ? "justify-content-end" : horizontalAlign; 73 horizontalAlign = horizontalAlign == "full" ? "" : horizontalAlign; 74 75 bool favoritesSelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowAddToFavorites")) ? Model.Item.GetBoolean("ShowAddToFavorites") : false; 76 bool quantitySelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowQuantitySelector")) ? Model.Item.GetBoolean("ShowQuantitySelector") : false; 77 bool unitsSelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowUnitsSelector")) ? Model.Item.GetBoolean("ShowUnitsSelector") : false; 78 bool hideInventory = !string.IsNullOrEmpty(Model.Item.GetString("HideInventory")) ? Model.Item.GetBoolean("HideInventory") : false; 79 bool hideStockState = !string.IsNullOrEmpty(Model.Item.GetString("HideStockState")) ? Model.Item.GetBoolean("HideStockState") : false; 80 81 string display = ""; 82 display = product.ProductType == ProductType.Service ? "d-none" : ""; 83 string buttonSize = Model.Item.GetRawValueString("ButtonSize", "regular"); 84 string inputSize = string.Empty; 85 86 switch (buttonSize) 87 { 88 case "small": 89 inputSize = " input-group-sm"; 90 buttonSize = " btn-sm"; 91 break; 92 case "regular": 93 buttonSize = string.Empty; 94 break; 95 case "large": 96 inputSize = " input-group-lg"; 97 buttonSize = " btn-lg"; 98 break; 99 } 100 101 string iconPath = "/Files/icons/"; 102 string url = "/Default.aspx?ID=" + (GetPageIdByNavigationTag("CartService")); 103 if (!url.Contains("LayoutTemplate")) 104 { 105 url += url.Contains("?") ? "&LayoutTemplate=Swift_MiniCart.cshtml" : "?LayoutTemplate=Swift_MiniCart.cshtml"; 106 } 107 108 string whenVariantsExist = Model.Item.GetRawValueString("WhenVariantsExist", "hide"); 109 string flexFill = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "flex-fill" : ""; 110 string fullWidth = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "w-100" : ""; 111 string addToCartIcon = Model.Item.GetRawValueString("Icon", iconPath + "shopping-cart.svg"); 112 string addToCartLabel = !addToCartIcon.Contains("_none") ? $"<span class=\"icon-2\">{ReadFile(addToCartIcon)}</span>" : ""; 113 addToCartLabel += !addToCartIcon.Contains("_none") && !Model.Item.GetBoolean("HideButtonText") ? " " : ""; 114 addToCartLabel += !Model.Item.GetBoolean("HideButtonText") ? $"<span class=\"d-none d-md-inline\">{Translate("Click and Collect")}</span><span class=\"d-inline d-md-none\">{Translate("Click and Collect")}</span>" : ""; 115 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 116 117 bool userHasPendingQuote = Dynamicweb.Ecommerce.Common.Context.Cart != null && Dynamicweb.Ecommerce.Common.Context.Cart.IsQuote; 118 119 if (product.VariantInfo.VariantInfo == null || whenVariantsExist == "disable") 120 { 121 unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : product.DefaultUnitId; 122 if (string.IsNullOrEmpty(unitId) && product?.UnitOptions != null) 123 { 124 if (product.UnitOptions.FirstOrDefault<UnitOptionViewModel>() != null) 125 { 126 unitId = product.UnitOptions.FirstOrDefault<UnitOptionViewModel>().Id; 127 } 128 } 129 130 double? stepQty = product.PurchaseQuantityStep > 0 ? product.PurchaseQuantityStep : 1; 131 double? minQty = product.PurchaseMinimumQuantity > 0 ? product.PurchaseMinimumQuantity : 1; 132 double? valueQty = minQty > stepQty ? minQty : stepQty; 133 string disableAddToCart = null; 134 double? maxQty = null; 135 double totalstock = 0; 136 137 long CCStoreIdInt = 0; 138 139 IEnumerable<StockLocation> stocklocList = Dynamicweb.Ecommerce.Services.StockService.GetStockLocations(); 140 foreach (StockLocation stockloc in stocklocList) 141 { 142 string description = stockloc.GetDescription(Dynamicweb.Ecommerce.Common.Context.LanguageID); 143 DiscountService discountService = new DiscountService(); 144 double StockLevel = discountService.GetCCLiveStock(product.Number, description, unitId, Pageview.Area.EcomLanguageId); 145 if (StockLevel > 0) 146 { 147 totalstock = totalstock + StockLevel; 148 } 149 150 if (!String.IsNullOrEmpty(CCStoreId)) 151 { 152 if (description == CCStoreId) 153 { 154 CCStoreIdInt = stockloc.ID; 155 } 156 } 157 158 } 159 160 if (product.ProductType == Dynamicweb.Ecommerce.Products.ProductType.Stock && !product.NeverOutOfstock) 161 { 162 disableAddToCart = (totalstock <= 0) || (!product.NeverOutOfstock && isLazyLoadingForProductInfoEnabled) ? "disabled" : disableAddToCart; 163 maxQty = totalstock; 164 } 165 166 disableAddToCart = whenVariantsExist == "disable" && product.VariantInfo.VariantInfo != null && string.IsNullOrEmpty(product.VariantId) ? "disabled" : disableAddToCart; 167 disableAddToCart = (!isClickCollect && orderlinecount > 0) ? "disabled" : disableAddToCart; 168 169 if (unitsSelector && product.UnitOptions.Count > 0) 170 { 171 <form method="post" action="/Default.aspx?ID=@(Pageview.Page.ID)&ProductId=@product.Id" id="UnitSelectorForm_@(product.Id)_@(product.VariantId.Replace(".", "_"))_@Model.ID"> 172 <input type="hidden" name="redirect" value="false"> 173 <input type="hidden" name="VariantID" value="@product.VariantId"> 174 <input type="hidden" name="UnitID" class="js-unit-id" value="@unitId"> 175 </form> 176 } 177 178 <div class="d-flex @horizontalAlign @fullWidth js-input-group item_@Model.Item.SystemName.ToLower() @display"> 179 @if (!anonymousUser && favoritesSelector) 180 { 181 @RenderPartial("Components/ToggleFavorite.cshtml", product) 182 } 183 184 <form method="post" action="@url" class="@fullWidth" style="z-index: 1"> 185 <input type="hidden" name="redirect" value="false"> 186 <input type="hidden" name="ProductId" value="@product.Id"> 187 <input type="hidden" name="ProductName" value="@HtmlEncoder.HtmlEncode(product.Name)"> 188 <input type="hidden" name="ProductVariantName" value="@product.VariantName"> 189 <input type="hidden" name="ProductCurrency" value="@Dynamicweb.Ecommerce.Common.Context.Currency.Code"> 190 <input type="hidden" name="ProductPrice" value="@PriceViewModelExtensions.ToStringInvariant(product.Price)"> 191 <input type="hidden" name="ProductReferer" value="component_ProductAddToCart"> 192 <input type="hidden" name="cartcmd" value="add"> 193 <input type="hidden" name="StockLocationId" id="StockLocationId" value="@CCStoreIdInt" /> 194 <input type="hidden" id="CusClickCollectOrder" value="@isClickCollect" /> 195 @* <input type="submit" class="d-none" onclick="event.preventDefault(); swift.Cart.Update(event)"> @* Fix for enterKey should not redirect to minicart page *@ 196 197 @if (!string.IsNullOrEmpty(product.VariantId)) 198 { 199 <input type="hidden" name="VariantId" value="@product.VariantId"> 200 } 201 202 <template class="js-step-quantity-warning"> 203 <div class="modal-header"> 204 <h1 class="modal-title fs-5">@Translate("The quantity is not valid")</h1> 205 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> 206 </div> 207 <div class="modal-body"> 208 @Translate("Please select a quantity that is dividable by") @stepQty 209 </div> 210 </template> 211 212 213 <template class="js-min-quantity-warning"> 214 <div class="modal-header"> 215 <h1 class="modal-title fs-5">@Translate("The product could not be added to the cart")</h1> 216 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> 217 </div> 218 <div class="modal-body"> 219 @Translate("The quantity is not valid. You must buy at least") @product.PurchaseMinimumQuantity 220 </div> 221 </template> 222 223 <template class="js-value-missing-warning"> 224 <div class="modal-header"> 225 <h1 class="modal-title fs-5">@Translate("No amount specified")</h1> 226 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> 227 </div> 228 <div class="modal-body"> 229 @Translate("Specify an amount to add to the cart") 230 </div> 231 </template> 232 233 234 @if (userHasPendingQuote) 235 { 236 <input type="hidden" name="PendingQuote" value="true"> 237 238 <template class="js-pending-quote-notice"> 239 <div class="modal-header"> 240 <h1 class="modal-title fs-5">@Translate("Pending Quote")</h1> 241 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="@Translate("Close")"></button> 242 </div> 243 <div class="modal-body"> 244 @Translate("You need to complete your current quote or empty the cart before adding this product to cart.") 245 </div> 246 </template> 247 } 248 249 <input type="hidden" id="Unit_@(product.Id)_@product.VariantId.Replace(".", "_")" name="UnitID" value="@unitId" /> 250 251 <div class="d-flex flex-row w-100"> 252 @if (!quantitySelector) 253 { 254 <input id="Quantity_@(product.Id)_@product.VariantId.Replace(".", "_")" class="swift_quantity_field" name="Quantity" value="@valueQty" type="hidden" @disableAddToCart> 255 } 256 257 @if (unitsSelector && product.UnitOptions.Count > 0) 258 { 259 string selectedUnitName = !string.IsNullOrEmpty(unitId) && product?.UnitOptions != null ? unitId : product.UnitOptions.FirstOrDefault<UnitOptionViewModel>().Name; 260 261 foreach (var unitOption in product.UnitOptions) 262 { 263 if (unitOption.Id == unitId) 264 { 265 selectedUnitName = unitOption.Name; 266 } 267 } 268 269 <div class="d-flex flex-column gap-2 w-100"> 270 <div class="input-group input-primary-button-group flex-nowrap@(inputSize)"> 271 272 @if (quantitySelector) 273 { 274 <input id="Quantity_@(product.Id)_@product.VariantId.Replace(".", "_")" name="Quantity" value="@DoubleToString(valueQty)" step="@DoubleToString(stepQty)" min="@DoubleToString(minQty)" max="@DoubleToString(maxQty)" class="form-control swift_quantity-field" style="min-width: 60px; max-width: 100px; z-index: 1" type="number" @disableAddToCart> 275 } 276 277 <button class="btn btn-secondary @flexFill dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> 278 @selectedUnitName 279 </button> 280 281 <ul class="dropdown-menu swift_unit-field"> 282 @foreach (var unitOption in product.UnitOptions) 283 { 284 var selectedUnit = unitOption.Id == unitId ? "selected" : ""; 285 286 <li> 287 <button type="button" class="btn dropdown-item" data-value="@unitOption.Id" onclick="document.querySelector('#UnitSelectorForm_@(product.Id)_@(product.VariantId.Replace(".", "_"))_@Model.ID').querySelector('.js-unit-id').value = this.getAttribute('data-value'); 288 document.querySelector('#Unit_@(product.Id)_@product.VariantId.Replace(".", "_")').value = this.getAttribute('data-value'); 289 swift.PageUpdater.Update(document.querySelector('#UnitSelectorForm_@(product.Id)_@(product.VariantId.Replace(".", "_"))_@Model.ID'))"> 290 <span>@unitOption.Name</span> 291 <span> 292 @if (unitOption.StockLevel > 0 || unitOption.NeverOutOfStock) 293 { 294 if (!Model.Item.GetBoolean("HideInventory") && !unitOption.NeverOutOfStock) 295 { 296 <span class="small text-success">@unitOption.StockLevel @Translate("In stock")</span> 297 } 298 else 299 { 300 <span class="small text-success">@Translate("In stock")</span> 301 } 302 } 303 else 304 { 305 <span class="small text-danger">@Translate("Out of Stock")</span> 306 } 307 </span> 308 </button> 309 </li> 310 } 311 </ul> 312 </div> 313 <button type="button" onclick="clicktoCollect(event,'@product.Id','@unitId');" class="btn btn-primary CCAddToCartBtn @(buttonSize) js-add-to-cart-button" style="white-space: nowrap" @disableAddToCart title="@Translate("Add to cart")" id="AddToCartButton@(product.Id)_@Pageview.CurrentParagraph.ID"> 314 @if (!Model.Item.GetBoolean("HideButtonText")) 315 { 316 <span class="text-nowrap d-flex align-items-center justify-content-center gap-2"> 317 @addToCartLabel 318 </span> 319 } 320 else 321 { 322 @addToCartLabel 323 } 324 </button> 325 </div> 326 } 327 else 328 { 329 <div class="input-group input-primary-button-group flex-nowrap@(inputSize)"> 330 @if (quantitySelector) 331 { 332 <input id="Quantity_@(product.Id)_@product.VariantId.Replace(".", "_")" name="Quantity" value="@DoubleToString(valueQty)" step="@DoubleToString(stepQty)" min="@DoubleToString(minQty)" max="@DoubleToString(maxQty)" class="form-control swift_quantity-field" style="min-width: 60px; max-width: 100px; z-index: 1" type="number" @disableAddToCart> 333 } 334 335 <button type="button" onclick="clicktoCollect(event,'@product.Id','@unitId');" class="btn btn-primary CCAddToCartBtn @(buttonSize) @flexFill js-add-to-cart-button" style="white-space: nowrap" @disableAddToCart title="@Translate("Add to cart")" id="AddToCartButton@(product.Id)_@Pageview.CurrentParagraph.ID"> 336 @if (!Model.Item.GetBoolean("HideButtonText")) 337 { 338 <span class="text-nowrap d-flex align-items-center justify-content-center gap-2"> 339 @addToCartLabel 340 </span> 341 } 342 else 343 { 344 @addToCartLabel 345 } 346 </button> 347 </div> 348 } 349 </div> 350 351 <button type="button" id="cus_ClickCollect" class="d-none" onclick="swift.Cart.Update(event)">@Translate("Click and Collect")</button> 352 <div id="Cus_ClickCollectContent"> 353 <div class="cus-collectModel__bg"> 354 <div class="cus-collectModel__con"> 355 <div class="cus_colloct__header cus_p10"> 356 <div>@Translate("In-store stock availability")</div> 357 <button type="button" class="btn cus_svg p-0" onclick="HideClickandCollect()">@ReadFile("/Files/Icons/x.svg")</button> 358 </div> 359 <div class="cus_colloct__body cus_p10"> 360 <div class="cus_fw700 cus_darkblue">@product.Name</div> 361 <div class="cus_clt__container"> 362 @{ 363 IEnumerable<StockLocation> ccstocklocList = Dynamicweb.Ecommerce.Services.StockService.GetStockLocations(); 364 foreach (StockLocation stockloc in ccstocklocList) 365 { 366 string description = stockloc.GetDescription(Dynamicweb.Ecommerce.Common.Context.LanguageID); 367 DiscountService discountService = new DiscountService(); 368 double StockLevel = discountService.GetCCLiveStock(product.Number, description, unitId, Pageview.Area.EcomLanguageId); 369 if (StockLevel > 0) 370 { 371 <div class="cus_btn_con"> 372 <div class="cus_w75"> 373 <div> 374 <span class="cus_chechIcon">@ReadFile("/Files/Icons/check.svg")</span> 375 <span class="cus_lightgreen"> @stockloc.GetName(Dynamicweb.Ecommerce.Common.Context.LanguageID)</span> 376 </div> 377 <div class="cus_darkblue">@Translate("In stock") (@StockLevel @Translate("qty"))</div> 378 </div> 379 <div class="cus_w25 cus_darkblue"><button class="btn cus_btn" onclick="AddClickCollectProduct('@stockloc.ID','@description',event); CollectItem();">@Translate("Collect")</button></div> 380 </div> 381 } 382 383 } 384 } 385 386 </div> 387 <div> 388 <div class="cus_fw700 cus_darkblue">@Translate("Choose you store to:")</div> 389 <div class="cus_darkblue"> 390 <div> 391 @Translate("Access its contact details, opening hours, services, etc.") 392 </div> 393 <div> 394 @Translate("View all available products and commercial offers") 395 </div> 396 </div> 397 </div> 398 </div> 399 <div class="cus_colloct__footer cus_p10"> 400 <div>@Translate("Our entire online offer can be found directly in store.")</div> 401 </div> 402 </div> 403 </div> 404 </form> 405 </div> 406 407 } 408 else if (whenVariantsExist == "modal") 409 { 410 string ButtonShape = Model.Item.GetRawValueString("VariantButtonShape", "square"); 411 string buttonAspectRatio = Model.Item.GetRawValueString("VariantImageAspectRatio", "56%"); 412 413 string buttonText = Translate("Select"); 414 string variantId = !string.IsNullOrWhiteSpace(product.VariantId) ? product.VariantId : product.DefaultVariantId; 415 416 string variantSelectorServicePageId = !string.IsNullOrEmpty(Model.Item.GetString("VariantSelectorServicePageId")) ? Model.Item.GetLink("VariantSelectorServicePageId").PageId.ToString() : ""; 417 variantSelectorServicePageId = variantSelectorServicePageId != "" ? variantSelectorServicePageId : GetPageIdByNavigationTag("VariantSelectorService").ToString(); 418 419 <div class="d-flex @horizontalAlign w-100 item_@Model.Item.SystemName.ToLower()"> 420 @if (!anonymousUser && favoritesSelector) 421 { 422 @RenderPartial("Components/ToggleFavorite.cshtml", product) 423 } 424 <form action="/Default.aspx?ID=@variantSelectorServicePageId" data-response-target-element="DynamicModalContent" data-preloader="inline" style="z-index: 1" class="@fullWidth"> 425 <input type="hidden" name="ProductID" value="@product.Id"> 426 <input type="hidden" name="VariantID" value="@variantId"> 427 <input type="hidden" name="QuantitySelector" value="@quantitySelector.ToString()"> 428 <input type="hidden" name="HideInventory" value="@hideInventory.ToString()"> 429 <input type="hidden" name="HideStockState" value="@hideStockState.ToString()"> 430 <input type="hidden" name="ButtonLayout" value="@ButtonShape"> 431 <input type="hidden" name="ButtonAspectRatio" value="@buttonAspectRatio"> 432 <input type="hidden" name="VariantSelectorServicePage" value="@variantSelectorServicePageId"> 433 <input type="hidden" name="ViewType" value="ModalContent"> 434 @if (isLazyLoadingForProductInfoEnabled) 435 { 436 @* If lazy loading is enabled, bypass it because we're loading a modal window, so render everything as if it was server-side *@ 437 <input type="hidden" name="getproductinfo" value="true"> 438 } 439 <button type="button" onclick="swift.PageUpdater.Update(event)" class="btn btn-primary@(buttonSize) @fullWidth" title="@Translate("Select")" data-bs-toggle="modal" data-bs-target="#DynamicModal" id="OpenVariantSelectorModal@(product.Id)_@Pageview.CurrentParagraph.ID">@buttonText</button> 440 </form> 441 </div> 442 } 443 } 444 else if (Pageview.IsVisualEditorMode) 445 { 446 <div class="alert alert-dark m-0">@Translate("No products available")</div> 447 } 448 449 <script> 450 function HideClickandCollect() { 451 $(".cus-collectModel__bg").removeClass("show"); 452 } 453 function CollectItem() { 454 HideClickandCollect(); 455 } 456 function AddClickCollectProduct(stocklocId, storeId, event) { 457 $("#StockLocationId").val(stocklocId); 458 const clickCollectBtn = document.getElementById("cus_ClickCollect"); 459 clickCollectBtn.click(); 460 const addcartTimeout = setTimeout(function () { 461 UpdateClickCollectStoreForProduct(storeId, stocklocId, "@product.Id","@unitId"); 462 }, 200); 463 } 464 </script>

الوصف

مركب مرطب مع الصبار وزيت الأفوكادو تركيبة متجددة مع البابونج وفيتامين E للبشرة العادية إلى الجافة

المزيد من المعلومات

يغذي اليدين ويجعلها ناعمة ومرنة يجدد البشرة تركيبة غير دهنية وسريعة الامتصاص

You Might Like also

;
بالنقر على "قبول الكل"، فإنك توافق على أنه يجوز لنا جمع معلومات عنك لأغراض مختلفة، بما في ذلك: الإحصائيات والتسويق