@model IList @using SmartStore.Web.Models.Catalog; @using SmartStore.Core.Domain.Catalog; @using SmartStore.Core.Infrastructure; @using SmartStore.Core; @using System.Text; @using System.Globalization; @using SmartStore.Services.Customers; @using SmartStore.Services.Security; @using SmartStore.Web; @using SmartStore.Utilities; @{ var storeUrl = EngineContext.Current.Resolve().GetStoreLocation(false); }
@foreach (var attribute in Model.Where(x => x.ShouldBeRendered())) { string controlId = string.Format("product_attribute_{0}_{1}_{2}_{3}", attribute.ProductId, attribute.BundleItemId, attribute.ProductAttributeId, attribute.Id); string textPrompt = !string.IsNullOrEmpty(attribute.TextPrompt) ? attribute.TextPrompt : attribute.Name; string disabled = (attribute.IsDisabled ? " disabled=\"disabled\"" : null);
@if (!string.IsNullOrEmpty(attribute.Description)) {
@Html.Raw(attribute.Description)
}
@switch (attribute.AttributeControlType) { case AttributeControlType.DropdownList: { } break; case AttributeControlType.RadioList: { foreach (var pvaValue in attribute.Values) { if (pvaValue.ImageUrl.HasValue()) { if (!String.IsNullOrEmpty(pvaValue.SeName)) { } else { } } } } break; case AttributeControlType.Checkboxes: { foreach (var pvaValue in attribute.Values) { if (pvaValue.ImageUrl.HasValue()) { if (!String.IsNullOrEmpty(pvaValue.SeName)) { } else { } } } } break; case AttributeControlType.TextBox: { } break; case AttributeControlType.MultilineTextbox: { } break; case AttributeControlType.Datepicker: { @Html.DatePickerDropDowns(controlId + "_day", controlId + "_month", controlId + "_year", attribute.BeginYear, attribute.EndYear, attribute.SelectedDay, attribute.SelectedMonth, attribute.SelectedYear, true, attribute.IsDisabled) } break; case AttributeControlType.FileUpload: { Html.AddScriptParts("~/bundles/fileupload"); Html.AddCssFileParts("~/css/fileupload"); var random = CommonHelper.GenerateRandomInteger(); var clientId = "upload" + CommonHelper.GenerateRandomInteger(); //ex. ['jpg', 'jpeg', 'png', 'gif'] or [] var allowedFileExtensions = string.Join("|", attribute.AllowedFileExtensions.Select(x => x.Trim()).ToList());
@T("Common.Fileuploader.Upload")
 
} break; case AttributeControlType.ColorSquares: {
    @foreach (var pvaValue in attribute.Values) {
  • }
} break; }
}