0

Hi there how do you add fields to the contact us page for nop commerce step by step im new to nop commerce I tried to add a field in ProductContactUs.cshtml but i got a error

Plugins/SevenSpikes.Nop.Plugins.NopQuickTabs/Views/ProductTab/_ProductContactUs.cshtml

the field i added was postaladdress like so

                     <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>

Where else should I add the field. Thanks in advance

Grampiano
  • 99
  • 1
  • 7
  • You need to add PostalAddress to the ContactUsModel model. The location of the viewmodel at Nop.Web==>Models==>Common. It will get read of your application from initial error but it will not reflect the change to the functionality of the plugin. – sina_Islam Oct 05 '17 at 07:51
  • Hi sina_Islam can you be more specific where to find models is it in views plugins where – Grampiano Oct 05 '17 at 10:43
  • im looking for ContactUsModel but i dont find it in my files – Grampiano Oct 05 '17 at 11:10
  • if go to the Nop.Web==>Plugins==>SevenSpikes.Nop.Plugins.NopQuickTabs==>Views==>ProductTab==>_ProductContactUs.cshtml at the top of the partialview you will see `@using Nop.Web.Models.Common; @model ContactUsModel` so the partial view strongly tied to the ContactUsModel which is situated at Presentation==>Nop.Web==>Models==>Common==>ContactUsModel.cs(you can see that only if you work with nopcommerce source code). – sina_Islam Oct 05 '17 at 11:26

0 Answers0