After adding few field, value won't display in front end :( (NopCommerce 2.50)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 年 前
Hi,
I've added a new property to a Product to store specification values as a text field. I've tried to place it next to the existing field FullDescription all the way thoughout the code.  In the backend, the field is working fine and can load and save the value to the database, but in the front end, the value is always empty.

Where can I have possibly missed adding this new field?  I don't see how if the value is correctly loaded in the back end, how it can be missing in the front end. Does the front end somehow use a different version of the product class?

How do I debug something like this? Despite being a proficient ASP.NET developer for many years, I'm really struggling with Nop due to it's use of MVC and Entity Framework.

Any help would be greatly appreciated.

Thanks,
Nick
12 年 前
Have you checked on the ViewModels ? MVC has two Data concepts, Models (Core Backend Data) and ViewModels (Core Data intended for Views only).

To check the ViewModel, go to your particular view, and at the top you'll have the using statement for the ViewModel. Right-click on that and choose [ Go to Definition ] and in there, debug and see if your value is being populated.

Hope this helps.

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.