如何更改nopcommerce下拉列表中项目的顺序

how to make change the order of items in dropdownlist of nopcommerce

我们正在 nopcommerce 3 中创建一个 Web 应用程序。8.in 我们正在做一些自定义 codes.but 我们被困在更改产品添加页面中下拉列表的顺序。 现在在下拉列表中添加产品时,第一项是简单产品,第二项是分组产品,我想更改它,以便第一个是分组产品,第二个是简单产品。

查看我发现的以下内容

<div class="form-group @(Model.ProductEditorSettingsModel.ProductType ? null : "advanced-setting")">
                    <div class="col-md-3">

                            @Html.NopLabelFor(model => model.ProductTypeId)

                    </div>
                    <div class="col-md-9">

                        @Html.NopDropDownListFor(model => model.ProductTypeId, ((ProductType)Model.ProductTypeId).ToSelectList())

                        @Html.ValidationMessageFor(model => model.ProductTypeId)

                    </div>
                </div>

请提供解决方案

转到 Nop.Core\Domain\Catalog\ProductType.cs 并更改项目的顺序。它应该是这样的:

    /// <summary>
    /// Grouped (product with variants)
    /// </summary>
    GroupedProduct = 10,
    /// <summary>
    /// Simple
    /// </summary>
    SimpleProduct = 5