Create new table nopcommerce 1.90?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,
i would like to ask if there is a way to create a new table in the database so i can store my visitor's emails  (something like the way newsletters works).What i want to achieve is to be able to give special offers to clients by drawing lots after giving their email.If there is a better way to go around this problem i would appreciate it. (I work in nopcommerce 1.90)
13 years ago
Creating the DB tables is not a problem.  Create the tables, columns, and relationships you want in the DB using Visual Studio, Web MAtrix, or the SQL management console.  Then you will have to update and rebuild the NopModel.edmx to update the EF ORM.  You should then be able to code against the new model that includes your new table.  

Forgot You will also have to manually create a class in the NopObjectContext.ObjetsSet  if you do not VS you will get a compile error and VS will ask you to create the class.  Be careful that the names match exactly the ones from the edmx this drove me crazy for a while because of an upper-lower case mismatch.
13 years ago
Do you have an example of the class you would add for a table with columns:

id
testName
testEmail

Where would you put the class in the project please?

Thanks for your help.
13 years ago
Please review this.
https://www.nopcommerce.com/boards/t/6968/i-need-help-in-adding-extra-product-fields-in-database.aspx?p=3
13 years ago
nglocng wrote:

u r right all is already written here.thanx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.