Close

display order in widget zone does not display in order

Oakstone
9 years ago
#8654 Quote
Avatar
  • 29
I have several widgets in the home_page_top zone. I'm trying to put them in a certain order and have the display order correct. However, the display never is correct. Looking at _HtmlWidget.cshtml, I do not see an order by for HtmlWidgets. Should there be?
I'm using the Lighthouse template 3.2

@using SevenSpikes.Nop.Plugins.HtmlWidgets.Models;

@model HtmlWidgetsPublicFullModel

@{
    if (Model.HtmlWidgets.Count > 0)
    {
        foreach (var htmlwidget in Model.HtmlWidgets)
        {
      <div>
                @Html.Raw(htmlwidget.HtmlContent)
            </div>
        }
    }
}
hristian.dimov
9 years ago
#8656 Quote
Avatar
  • Moderator
  • 386
Oakstone wrote:
I have several widgets in the home_page_top zone. I'm trying to put them in a certain order and have the display order correct. However, the display never is correct. Looking at _HtmlWidget.cshtml, I do not see an order by for HtmlWidgets. Should there be?
I'm using the Lighthouse template 3.2

@using SevenSpikes.Nop.Plugins.HtmlWidgets.Models;

@model HtmlWidgetsPublicFullModel

@{
    if (Model.HtmlWidgets.Count > 0)
    {
        foreach (var htmlwidget in Model.HtmlWidgets)
        {
      <div>
                @Html.Raw(htmlwidget.HtmlContent)
            </div>
        }
    }
}


Hi Oakstone,

they are ordered in the controller, before the data is passed to the view.

The html widgets are ordered by the display order from the Widget Zone tab.
Regards,
Hristian Dimov
Nop-Templates.com
Oakstone
9 years ago
#8657 Quote
Avatar
  • 29
Ok. I understand. However, I do not think the order is working. It's using the Id from the table SS_HW_HtmlWidget. I have 3 widgets in a widget called home_page_top. They were are out of order.  I deleted the one out of order, and added a new one. Now it's in the correct order.

I see the table SS_MAP_EntityWidgetMappingwith the DisplayOrder field, but I feel like the ID or EntityId is used.
hristian.dimov
9 years ago
#8662 Quote
Avatar
  • Moderator
  • 386
Oakstone wrote:
Ok. I understand. However, I do not think the order is working. It's using the Id from the table SS_HW_HtmlWidget. I have 3 widgets in a widget called home_page_top. They were are out of order.  I deleted the one out of order, and added a new one. Now it's in the correct order.

I see the table SS_MAP_EntityWidgetMappingwith the DisplayOrder field, but I feel like the ID or EntityId is used.


Hi Oakstone,

I haven't seen your nopCommerce version when I wrote my last post ( I was thinking that you are using the latest - 3.50 version ). The bug exists only in the 3.20 version of the plugin. We have fixed it, thank you for reporting.

Please submit a ticket to out system so that we can send you the new version of the plugin.

Hope this helps!
Regards,
Hristian Dimov
Nop-Templates.com