How to add a new model

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 năm cách đây
Hi all,

I have installed the nopcommerce 2.6 and I am looking to customize it.

How do I add a custom table in the database and a new model with controller (view) consequential ?
For example - i want to add a new table 'applicationperson' to  save the person information what i need.what should i do ?
Is there any documentation anywhere on customization?

Many thanks,

zhengarean
11 năm cách đây
https://www.nopcommerce.com/documentation.aspx

https://www.nopcommerce.com/docs/74/frequently-asked-development-questions.aspx

https://www.nopcommerce.com/docs/73/updating-an-existing-entity-how-to-add-a-new-property.aspx

you might want to look at customer attributes if your storing extra data

HTH

Dave
11 năm cách đây
I have followed the instructions in the documents section but i get an error when i run the application;

"The model backing the '{0}' context has changed since the database was created. Either manually delete"

I added the class to the Nop.Core.Domain and also to Nop.Data.Mapping

I then ran the app and got the error.

I then added the table manually to the database, ran the app and got the error.

How do I re run the installer so it adds the table to the database or,
How do I just get this to work?

Thanks
Steve
11 năm cách đây
Myself I update all files throughout all projects then install I tend to leave the Views untill this is Done to make sure it all works.

I tend to download a fresh file update and make the nessercary changesets and then reinstal. New.
11 năm cách đây
i have resolve this problem .
it have been add at domain, mapping, server,and also model
thank all the helpers
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.