如何在NOP Commerce中添加更多字段以"与我们联系"表格?我是Nop Commerce的新手。
我在ContactUs.cshtml
上添加了一个字段,但是加载表格时我一边没有显示任何字段。
我添加了邮政地址,但没有显示
<div class="fieldset">
<div class="form-fields">
<div class="inputs">
@Html.LabelFor(model => model.FullName)
@Html.TextBoxFor(model => model.FullName, new { @class = "fullname", placeholder = T("ContactUs.FullName.Hint") })
@Html.RequiredHint()
@Html.ValidationMessageFor(model => model.FullName)
</div>
<div class="inputs">
@Html.LabelFor(model => model.PostalAddress)
@Html.TextAreaFor(model => model.PostalAddress, new { @class = "postaladdress", placeholder = T("ContactUs.PostalAddress.Hint") })
@Html.RequiredHint()
@Html.ValidationMessageFor(model => model.PostalAddress)
</div>
<div class="inputs">
@Html.LabelFor(model => model.Email)
@Html.TextBoxFor(model => model.Email, new { @class = "email", placeholder = T("ContactUs.Email.Hint") })
@Html.RequiredHint()
@Html.ValidationMessageFor(model => model.Email)
</div>
@if (Model.SubjectEnabled)
{
<div class="inputs">
@Html.LabelFor(model => model.Subject)
@Html.TextBoxFor(model => model.Subject, new { @class = "subject", placeholder = T("ContactUs.Subject.Hint") })
@Html.RequiredHint()
@Html.ValidationMessageFor(model => model.Subject)
</div>
}
<div class="inputs">
@Html.LabelFor(model => model.Enquiry)
@Html.TextAreaFor(model => model.Enquiry, new { @class = "enquiry", placeholder = T("ContactUs.Enquiry.Hint") })
@Html.RequiredHint()
@Html.ValidationMessageFor(model => model.Enquiry)
</div>
@if (Model.DisplayCaptcha)
{
<div class="captcha-box">
@Html.Raw(Html.GenerateCaptcha())
</div>
}
</div>
</div>
<div class="buttons">
<input type="submit" name="send-email" class="button-1 contact-us-button" value="@T("ContactUs.Button")" />
</div>
}
}
如果您使用的是主题,则应在文件夹"主题> namefyourtheme> whyingview"下编辑视图,而不是直接在"视图"文件夹下的视图。
检查是否是原因。