NopCore Them has problem in Product View

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Hi! I'm trying to use nopAccelerate Core Theme but it's getting some problems. When I click in product box to view the product I am getting error page and the message below. Can someone help me?

Error
Short Message:  e:\domains\eletronicosjr.com.br\public\Themes\CoreTheme\Views\Product\_ProductAttributes.cshtml(392): error CS1061: 'Nop.Web.Models.Catalog.ProductDetailsModel.ProductAttributeValueModel' does not contain a definition for 'PictureUrl' and no extension method 'PictureUrl' accepting a first argument of type 'Nop.Web.Models.Catalog.ProductDetailsModel.ProductAttributeValueModel' could be found (are you missing a using directive or an assembly reference?)

Long Message:
System.Web.HttpCompileException (0x80004005): e:\domains\eletronicosjr.com.br\public\Themes\CoreTheme\Views\Product\_ProductAttributes.cshtml(392): error CS1061: 'Nop.Web.Models.Catalog.ProductDetailsModel.ProductAttributeValueModel' does not contain a definition for 'PictureUrl' and no extension method 'PictureUrl' accepting a first argument of type 'Nop.Web.Models.Catalog.ProductDetailsModel.ProductAttributeValueModel' could be found (are you missing a using directive or an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) at ASP._Page_Themes_CoreTheme_Views_Product_ProductTemplate_Simple_cshtml.Execute() in e:\domains\eletronicosjr.com.br\public\Themes\CoreTheme\Views\Product\ProductTemplate.Simple.cshtml:line 100 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
8 years ago
I try to download it but can not.I see the demo site and it seems they make it for nopcommerce 3.5 or 3.6.

I think you try it at nopcommerce version 3.7 and get the error, is it?
8 years ago
This error occurs at version 3.60! It seems weird this mention to directory e:\domains

e:\domains\eletronicosjr.com.br\public\Themes\CoreTheme\Views\Product\_ProductAttributes.cshtml(392): error CS1061: 'Nop.Web.Models.Catalog.ProductDetailsModel.ProductAttributeValueModel' does not contain a definition for 'PictureUrl' and no extension method 'PictureUrl' accepting a first argument of type 'Nop.Web.Models.Catalog.ProductDetailsModel.ProductAttributeValueModel' could be found (are you missing a using directive or an assembly reference?)
8 years ago
The error is very specific if I can see the _ProductAttributes.cshtml of theme then may be I can help you.:(
8 years ago
If you are developer go to the _ProductAttribute.cshtml and check this


may be problem at this section

foreach (var attributeValue in attribute.Values)
                        {
                            var pictureUrl = attributeValue.PictureModel.ImageUrl;
                            if (pictureSize == pictureDefaultSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureModel.ImageUrl;
                            }
                            else if (pictureSize == pictureFullSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureModel.FullSizeImageUrl;
                            }

                            pictureAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "'{0}',", pictureUrl);
                            numberOfJsArrayItems++;
                        }
8 years ago
Here follows the _ProductAttributes of the theme:

@model IList<ProductDetailsModel.ProductAttributeModel>
@using Nop.Web.Models.Catalog;
@using Nop.Core.Domain.Catalog;
@using Nop.Core.Infrastructure;
@using System.Text;
@using System.Globalization;
@using Nop.Services.Security;
@if (Model.Count > 0)
{
    <div class="attributes">
        <dl>
            @foreach (var attribute in Model)
            {
                string controlId = string.Format("product_attribute_{0}_{1}_{2}", attribute.ProductId, attribute.ProductAttributeId, attribute.Id);
                string textPrompt = !string.IsNullOrEmpty(attribute.TextPrompt) ? attribute.TextPrompt : attribute.Name;
          <dl class="row">    
              <dt class="col-sm-3 col-md-4">
                  <label class="text-prompt">
                      @textPrompt
                  </label>
                  @if (attribute.IsRequired)
                    {
                      <span class="required">*</span>
                    }
                  @if (!string.IsNullOrEmpty(attribute.Description))
                    {
                      <div class="attribute-description">
                          @Html.Raw(attribute.Description)
                      </div>
                    }
              </dt>
              <dd class=" col-sm-6 col-md-8">
                  @switch (attribute.AttributeControlType)
                    {
                        case AttributeControlType.DropdownList:
                            {
                      <select name="@(controlId)" id="@(controlId)" class="btn-dropdown form-control">
                          @if (!attribute.IsRequired)
                          {
                              <option value="0">---</option>
                          }
                          @foreach (var attributeValue in attribute.Values)
                          {
            var attributeName = String.IsNullOrEmpty(attributeValue.PriceAdjustment) ?
            attributeValue.Name :
        T("Products.ProductAttributes.PriceAdjustment", attributeValue.Name, attributeValue.PriceAdjustment).Text;
                              <option selected="@attributeValue.IsPreSelected" value="@attributeValue.Id">
                                  @attributeName
                                  
                              </option>
                          }
                      </select>
                            }
                            break;
                        case AttributeControlType.RadioList:
                            {
                      <ul class="option-list">
                          @foreach (var attributeValue in attribute.Values)
                          {
        var attributeName = String.IsNullOrEmpty(attributeValue.PriceAdjustment) ?
                                attributeValue.Name :
                                T("Products.ProductAttributes.PriceAdjustment", attributeValue.Name, attributeValue.PriceAdjustment).Text;                              
        <li>
                                  <input id="@(controlId)_@(attributeValue.Id)" type="radio" name="@(controlId)" value="@attributeValue.Id" checked="@attributeValue.IsPreSelected" />
                                  <label for="@(controlId)_@(attributeValue.Id)">@attributeName </label>
                              </li>
                           }
                      </ul>
                            }
                            break;
                        case AttributeControlType.Checkboxes:
                        case AttributeControlType.ReadonlyCheckboxes:
                            {
                      <ul class="option-list">
                          @foreach (var attributeValue in attribute.Values)
                          {
                        var attributeName = String.IsNullOrEmpty(attributeValue.PriceAdjustment) ?
                                attributeValue.Name :
                                T("Products.ProductAttributes.PriceAdjustment", attributeValue.Name, attributeValue.PriceAdjustment).Text;
                              <li>
                                  <input id="@(controlId)_@(attributeValue.Id)" type="checkbox" name="@(controlId)" value="@attributeValue.Id" checked="@attributeValue.IsPreSelected" @(attribute.AttributeControlType == AttributeControlType.ReadonlyCheckboxes ? Html.Raw(" disabled=\"disabled\"") : null) />
                                  <label for="@(controlId)_@(attributeValue.Id)">@attributeName</label>
                              </li>
                          }
                      </ul>
                            }
                            break;
                        case AttributeControlType.TextBox:
                        {
                            <input name="@(controlId)" type="text" class="textbox form-control" id="@(controlId)" value="@attribute.DefaultValue" />
                        }
                            break;
                        case AttributeControlType.MultilineTextbox:
                        {
                            <textarea cols="20" id="@(controlId)" name="@(controlId)">@attribute.DefaultValue</textarea>
                        }
                            break;
                        case AttributeControlType.Datepicker:
                        {
                            @Html.DatePickerDropDowns(controlId + "_day", controlId + "_month", controlId + "_year", DateTime.Now.Year, DateTime.Now.Year + 1, attribute.SelectedDay, attribute.SelectedMonth, attribute.SelectedYear)
                        }
                            break;
                        case AttributeControlType.FileUpload:
                            {
                                //register CSS and JS
                                Html.AddCssFileParts("~/Scripts/fineuploader/fineuploader-4.2.2.min.css");
                                Html.AddScriptParts("~/Scripts/fineuploader/jquery.fineuploader-4.2.2.min.js");

                                //ex. ['jpg', 'jpeg', 'png', 'gif'] or []
                                var allowedFileExtensions = string.Join(", ", attribute.AllowedFileExtensions.Select(x => "'" + x.Trim() + "'").ToList());

                      <input id="@(controlId)" name="@(controlId)" type="hidden" />
                      @*fine uploader container*@
                      <div id="@(controlId)uploader"></div>
                      @*fine uploader template (keep it synchronized to \Content\fineuploader\templates\default.html)*@
                      <script type="text/template" id="@(controlId)-qq-template">
                          <div class="qq-uploader-selector qq-uploader">
                              <div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>
                                  <span>@T("Common.FileUploader.DropFiles")</span>
                              </div>
                              <div class="qq-upload-button-selector qq-upload-button">
                                  <div>@T("Common.FileUploader.Upload")</div>
                              </div>
                              <span class="qq-drop-processing-selector qq-drop-processing">
                                  <span>@T("Common.FileUploader.Processing")</span>
                                  <span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
                              </span>
                              <ul class="qq-upload-list-selector qq-upload-list">
                                  <li>
                                      <div class="qq-progress-bar-container-selector">
                                          <div class="qq-progress-bar-selector qq-progress-bar"></div>
                                      </div>
                                      <span class="qq-upload-spinner-selector qq-upload-spinner"></span>
                                      <span class="qq-edit-filename-icon-selector qq-edit-filename-icon"></span>
                                      <span class="qq-upload-file-selector qq-upload-file"></span>
                                      <input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">
                                      <span class="qq-upload-size-selector qq-upload-size"></span>
                                      <a class="qq-upload-cancel-selector qq-upload-cancel" href="#">@T("Common.FileUploader.Cancel")</a>
                                      <a class="qq-upload-retry-selector qq-upload-retry" href="#">@T("Common.FileUploader.Retry")</a>
                                      <a class="qq-upload-delete-selector qq-upload-delete" href="#">@T("Common.FileUploader.Delete")</a>
                                      <span class="qq-upload-status-text-selector qq-upload-status-text"></span>
                                  </li>
                              </ul>
                          </div>
                      </script>
                      <script type="text/javascript">
                          $(document).ready(function() {
                              $("#@(controlId)uploader").fineUploader({
                                  request: {
                                      endpoint: '@(Url.RouteUrl("UploadFileProductAttribute", new { attributeId = attribute.Id }))'
                                  },
                                  template: "@(controlId)-qq-template",
                                  multiple: false,
                                  validation: {
                                      allowedExtensions: [@Html.Raw(allowedFileExtensions)]
                                  }
                              }).on("complete", function(event, id, name, responseJSON, xhr) {
                                  $("#@(controlId)").val(responseJSON.downloadGuid);
                                  if (responseJSON.message) {
                                      alert(responseJSON.message);
                                  }
                              });
                          });
                      </script>

                            }
                            break;
                        case AttributeControlType.ColorSquares:
                            {
                      <ul class="option-list color-squares" id="color-squares-@(attribute.Id)">
                          @foreach (var attributeValue in attribute.Values)
                          {
        var attributeName = String.IsNullOrEmpty(attributeValue.PriceAdjustment) ?
                                attributeValue.Name :
                                T("Products.ProductAttributes.PriceAdjustment", attributeValue.Name, attributeValue.PriceAdjustment).Text;
                             <li @(attributeValue.IsPreSelected ? @Html.Raw(" class=\"selected-value\"") : null)>
                                  <label for="@(controlId)_@(attributeValue.Id)">
                                      <span class="color-container" title="@attributeName">
                                          <span class="color" style="background-color:@(attributeValue.ColorSquaresRgb);">&nbsp;</span>
                                      </span>
                                      <input id="@(controlId)_@(attributeValue.Id)" type="radio" name="@(controlId)" value="@attributeValue.Id" checked="@attributeValue.IsPreSelected" />
                                      @*uncomment below to display attribute value name*@
                                      @*<span class="name">@attributeName*@
                                  </label>
                              </li>
                          }
                      </ul>
                      <script type="text/javascript">
                          $(document).ready(function() {
                              $('.attributes #color-squares-@(attribute.Id)').delegate('input', 'click', function(event) {
                                  $('.attributes #color-squares-@(attribute.Id)').find('li').removeClass('selected-value');
                                  $(this).closest('li').addClass('selected-value');
                              });
                          });
                      </script>
                            }
                            break;
                    }
              </dd>

              </dl>
            }
        </dl>
    </div>
}
@if (Model.Count > 0)
{
    //dynamic price update support
    var hidePrices = !EngineContext.Current.Resolve<IPermissionService>().Authorize(StandardPermissionProvider.DisplayPrices);
    var dynamicPriceUpdate = EngineContext.Current.Resolve<CatalogSettings>().EnableDynamicPriceUpdate;
    var dynamicPriceUpdateAjax = EngineContext.Current.Resolve<CatalogSettings>().DynamicPriceUpdateAjax;
    var priceAdjustmentTableScripts = new StringBuilder();
    var priceAttributeScripts = new StringBuilder();

    var productId = Model.Any() ? Model.First().ProductId : 0;
    var priceAdjustmentTableName = string.Format("priceAdjustmentTable_{0}", productId);
    var priceAdjustmentFuncName = string.Format("adjustPrice_{0}", productId);
    if (dynamicPriceUpdate && !hidePrices)
    {
        foreach (var attribute in Model)
        {
            string controlId = string.Format("product_attribute_{0}_{1}_{2}", attribute.ProductId, attribute.ProductAttributeId, attribute.Id);


            switch (attribute.AttributeControlType)
            {
                case AttributeControlType.DropdownList:
                    {
                        priceAdjustmentTableScripts.AppendFormat("{0}['{1}'] = new Array(", priceAdjustmentTableName, controlId);
                        priceAttributeScripts.AppendFormat("$('#{0}').change(function(){{{1}();}});\n", controlId, priceAdjustmentFuncName);
                        int numberOfJsArrayItems = 0;
                        if (!attribute.IsRequired)
                        {
                            priceAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "{0},", decimal.Zero);
                            numberOfJsArrayItems++;
                        }

                        foreach (var attributeValue in attribute.Values)
                        {
                            priceAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "{0},", (float)attributeValue.PriceAdjustmentValue);
                            numberOfJsArrayItems++;
                        }

                        //If you create an array with a single numeric parameter, that number is used for specifying the number of elements in this array.
                        //so have a little hack here (we need at least two elements)
                        if (numberOfJsArrayItems == 1)
                        {
                            priceAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "{0},", decimal.Zero);
                        }
                        priceAdjustmentTableScripts.Length -= 1;
                        priceAdjustmentTableScripts.Append(");\n");
                    }
                    break;
                case AttributeControlType.RadioList:
                case AttributeControlType.ColorSquares:
                    {
                        foreach (var attributeValue in attribute.Values)
                        {
                            priceAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "{0}['{1}_{2}'] = {3};\n", priceAdjustmentTableName, controlId, attributeValue.Id, (float)attributeValue.PriceAdjustmentValue);
                            priceAttributeScripts.AppendFormat("$('#{0}_{1}').click(function(){{{2}();}});\n", controlId, attributeValue.Id, priceAdjustmentFuncName);
                        }
                    }
                    break;
                case AttributeControlType.Checkboxes:
                case AttributeControlType.ReadonlyCheckboxes:
                    {
                        foreach (var attributeValue in attribute.Values)
                        {
                            priceAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "{0}['{1}_{2}'] = {3};\n", priceAdjustmentTableName, controlId, attributeValue.Id, (float)attributeValue.PriceAdjustmentValue);
                            priceAttributeScripts.AppendFormat("$('#{0}_{1}').click(function(){{{2}();}});\n", controlId, attributeValue.Id, priceAdjustmentFuncName);
                        }
                    }
                    break;
                default:
                    break;
            }

        }
    }

    if (dynamicPriceUpdate && !hidePrices)
    {
        <script type="text/javascript">
            //Price adjustment table
            var @(priceAdjustmentTableName) = new Array();
            //Price adjustment table initialize
            @Html.Raw(priceAdjustmentTableScripts.ToString())

            //Price adjustment function
            function @(priceAdjustmentFuncName)() {

                
                @if (dynamicPriceUpdateAjax)
                {
                    //load using AJAX
                    //this way we also load GTIN, SKU, MPN
                    var priceVarClass = string.Format("price-value-{0}", productId);
                    
                    //almost the same implementation is used in the \Views\Product\_RentalInfo.cshtml file
                    
                    <text>
                    $.ajax({
                        cache: false,
                        url: '@Url.Action("ProductDetails_AttributeChange", "ShoppingCart", new {productId = productId})',
                        data: $('#product-details-form').serialize(),
                        type: 'post',
                        success: function(data) {
                            if (data.sku) {
                                $('#sku-@productId').text(data.sku);
                            }
                            if (data.mpn) {
                                $('#mpn-@productId').text(data.mpn);
                            }
                            if (data.gtin) {
                                $('#gtin-@productId').text(data.gtin);
                            }
                            if (data.price) {
                                $(".@(priceVarClass)").text(data.price);
                            }
                        }
                    });
                    </text>
                }
                else
                {
                    //calculate new price using java-script (no AJAX)
                    var priceVarName = string.Format("priceValForDynUpd_{0}", productId);
                    var priceVarClass = string.Format("price-val-for-dyn-upd-{0}", productId);
                    
                    <text>                        
                    var sum = 0;
                    for (var i in @(priceAdjustmentTableName)) {
                        var ctrl = $('#' + i);
                        if ((ctrl.is(':radio') && ctrl.is(':checked')) || (ctrl.is(':checkbox') && ctrl.is(':checked'))) {
                            sum += @(priceAdjustmentTableName)[i];
                        } else if (ctrl.is('select')) {
                            var idx = $('#' + i + " option").index($('#' + i + " option:selected"));
                            if (idx != -1) {
                                sum += @(priceAdjustmentTableName)[i][idx];
                            }
                        }
                    }
                    var res = (@(priceVarName) + sum).toFixed(2);
                    $(".@(priceVarClass)").text(res);
                    </text>
                }
            }
            
            //Price attributes handlers
            $(document).ready(function() {
                @(priceAdjustmentFuncName)();
                @Html.Raw(priceAttributeScripts.ToString())
            });
        </script>
    }
}

@if (Model.Count > 0)
{
    //attribute picture update
    var pictureAdjustmentTableScripts = new StringBuilder();
    var pictureAttributeScripts = new StringBuilder();
    string pictureAdjustmentTableName = "";
    string pictureAdjustmentFuncName = "";
    string pictureDefaultSizePrefix = "defaultsize";
    string pictureFullSizePrefix = "fullsize";
    var pictureSizes = new [] { pictureDefaultSizePrefix, pictureFullSizePrefix };
    foreach (var attribute in Model)
    {
        string controlId = string.Format("product_attribute_{0}_{1}_{2}", attribute.ProductId, attribute.ProductAttributeId, attribute.Id);

        pictureAdjustmentTableName = string.Format("productAttributeValueAdjustmentTable_{0}", attribute.ProductId);
        pictureAdjustmentFuncName = string.Format("adjustProductAttributeValuePicture_{0}", attribute.ProductId);

        switch (attribute.AttributeControlType)
        {
            case AttributeControlType.DropdownList:
                {
                    pictureAttributeScripts.AppendFormat("$('#{0}').change(function(){{{1}('{2}',{3});}});\n", controlId, pictureAdjustmentFuncName, controlId, attribute.ProductId);

                    foreach (var pictureSize in pictureSizes)
                    {
                        pictureAdjustmentTableScripts.AppendFormat("{0}['{1}_{2}'] = new Array(", pictureAdjustmentTableName, controlId, pictureSize);
                        int numberOfJsArrayItems = 0;
                        if (!attribute.IsRequired)
                        {
                            pictureAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "'{0}',", "");
                            numberOfJsArrayItems++;
                        }
                        foreach (var attributeValue in attribute.Values)
                        {
                            var pictureUrl = attributeValue.PictureUrl;
                            if (pictureSize == pictureDefaultSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureUrl;
                            }
                            else if (pictureSize == pictureFullSizePrefix)
                            {
                                pictureUrl = attributeValue.FullSizePictureUrl;
                            }

                            pictureAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "'{0}',", pictureUrl);
                            numberOfJsArrayItems++;
                        }
                        //If you create an array with a single numeric parameter, that number is used for specifying the number of elements in this array.
                        //so have a little hack here (we need at least two elements)
                        if (numberOfJsArrayItems == 1)
                        {
                            pictureAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "'{0}',", "");
                        }
                        pictureAdjustmentTableScripts.Length -= 1;
                        pictureAdjustmentTableScripts.Append(");\n");
                    }
                }
                break;
            case AttributeControlType.RadioList:
            case AttributeControlType.ColorSquares:
                {
                    foreach (var attributeValue in attribute.Values)
                    {
                        pictureAttributeScripts.AppendFormat("$('#{0}_{1}').click(function(){{{2}('{3}_{4}',{5});}});\n", controlId, attributeValue.Id, pictureAdjustmentFuncName, controlId, attributeValue.Id, attribute.ProductId);
                        foreach (var pictureSize in pictureSizes)
                        {
                            var pictureUrl = attributeValue.PictureUrl;
                            if (pictureSize == pictureDefaultSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureUrl;
                            }
                            else if (pictureSize == pictureFullSizePrefix)
                            {
                                pictureUrl = attributeValue.FullSizePictureUrl;
                            }
                            pictureAdjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "{0}['{1}_{2}_{3}'] = '{4}';\n", pictureAdjustmentTableName, controlId, attributeValue.Id, pictureSize, pictureUrl);
                        }
                    }
                }
                break;
            case AttributeControlType.Checkboxes:
            case
8 years ago
Change


                            var pictureUrl = attributeValue.PictureUrl;
                            if (pictureSize == pictureDefaultSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureUrl;
                            }
                            else if (pictureSize == pictureFullSizePrefix)
                            {
                                pictureUrl = attributeValue.FullSizePictureUrl;
                            }






By


                            var pictureUrl = attributeValue.PictureModel.ImageUrl;
                                if (pictureSize == pictureDefaultSizePrefix)
                                {
                                    pictureUrl = attributeValue.PictureModel.ImageUrl;
                                }
                                else if (pictureSize == pictureFullSizePrefix)
                                {
                                    pictureUrl = attributeValue.PictureModel.FullSizeImageUrl;
                                }
8 years ago
Also change


   var pictureUrl = attributeValue.PictureUrl;
                            if (pictureSize == pictureDefaultSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureUrl;
                            }
                            else if (pictureSize == pictureFullSizePrefix)
                            {
                                pictureUrl = attributeValue.FullSizePictureUrl;
                            }


by


var pictureUrl = attributeValue.PictureModel.ImageUrl;
                            if (pictureSize == pictureDefaultSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureModel.ImageUrl;
                            }
                            else if (pictureSize == pictureFullSizePrefix)
                            {
                                pictureUrl = attributeValue.PictureModel.FullSizeImageUrl;
                            }
8 years ago
If you change as I describe then


https://photos-1.dropbox.com/t/2/AACONCC8wTbpyAUkH_uoBf29xS-EnzkZfNtM828_Vvl64Q/12/243906097/png/32x32/1/_/1/2/ThemeError.png/EMft1doBGAkgAigC/hKsvDI2yOiQgn3llQpd7kD4RhMn3aeTbv0HV8cTNejk?size_mode=3&size=1024x768



this error will be solved.
8 years ago
Tks a Lot sina for your help! Now it´s working. This theme has Tabs for Description, Product Tags and Specifications, but it is showing Product tags first and I think it should be Product Description first, how to change this? Do you know?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.