我想在nopcommerce 2.65中的名为CustomerEnterPricePercentageSurcharge的目录设置中添加一个小数设置。我遵循How to Add New Setting Value in Customer settings线程的指示。如何在目录设置中添加新的设置值
但是,在上述线程中提到的3个步骤(下面列出并修改了目录设置)后,登录到管理部分并保存目录设置时,该值始终为0.0000。它似乎并未保存(或加载)“catalogsettings.customerenterpricepercentagesurcharge”设置值。有人能帮我澄清什么价值没有被保存?
更新Nop.Admin /模型/设置/ CatalogSettingsModel.cs与
[NopResourceDisplayName("Admin.Configuration.Settings.Catalog.CustomerEnterPricePercentageSurcharge")] public decimal CustomerEnterPricePercentageSurcharge { get; set; }
更新Nop.Admin /浏览/设置/ Catalog.cshtml与
<tr> <td class="adminTitle"> @Html.NopLabelFor(model => model.CustomerEnterPricePercentageSurcharge): </td> <td class="adminData"> @Html.EditorFor(model => model.CustomerEnterPricePercentageSurcharge) @Html.ValidationMessageFor(model => model.CustomerEnterPricePercentageSurcharge) </td> </tr>
添加:
"catalogsettings.customerenterpricepercentagesurcharge" under (configuration ->setting->AllSetting) and updating the
非常感谢您的帮助。
感谢您的帮助卡洛斯。你的建议完美运作。 – maxdmvp