How to create new textbox and link it to new field in Database

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 年 前
Hi All,

I would appreciate your support in my below enquiry.

I have installed Nopcommerce 1.9 in VS2010 and I am using SQL 2008 R2 Express.

I am trying to create a new textbox (similar to the E-mail Subscription) to store phone numbers in the Database, and to be able to export the entire phone list in the furture. I know that this textbox is available when customers register to NopCommerce website template. However, I need this to be available for anonymous users too.

I would really appreciate your help by providing steps on how to accomplish the above. just to clarify, I need to create new textbox to allow anonymous users to add their phone numbers only. And that these phone numbers must be stored in a new field in the database to be extracted in the future.

I dont need to link it to SMS gateway or to have actions in auto dialing or smsing the users. Only to have their phone numbers as a history record in the database.

Please provide a detailed steps on how to do that, I am kind of new in both ASP.Net, C# and their links to SQL express Database.


Many thanks in advance
12 年 前
I really need your help regarding this query. Please help.
12 年 前
Hi,

Perhaps I can give you some pointers.

If I'm correct you just need a form to be filled in by a customer.

I would try to copy an existing form, like the  newsletter subscription and alter the values, just step through the progress and you see what you need to change and what kind of files/pages you need to create.  

There are several things you have to do,

Add your table to the NopModel (Nop.BusinessLogic.Data)
Create a new class Like in the Nop.BusinessLogic project, the newsletter class in in the Nop.business.Messages
Create new Services
Create new page in the root op the website and create new module.

The most difficult part for me was to add the new tabel to the NopModel and create the entities.

Good Luck!
12 年 前
Many thanks Don for your guidance.

I am working on your steps. I hope to get more details, but thanks anyway, its a good start :)

Appreciate your help
12 年 前
Hi,

Just wanted to mention that I have sorted out a way to do the phone subscription. I wanted to share it with who might be interested on that.

1. Create a new table in NopCommerce Database and name it "Nop_PhoneSubscription"
2. Create the following columns in the above table:
      * Phonesubid (PK, int, not Null)
      * Phoneguid (uniqueidentifier, not Null)
      * Phoneno (nvarchar (255), not Null)
      * Active (bit, Not Null)
      * Createdon (datetime, not Null)
3. Finally, Just copy the files attached in their respective locations in your nopcommerce solutions.
4. Clean then rebuild your solution.
12 年 前
agassab wrote:
Hi,

Just wanted to mention that I have sorted out a way to do the phone subscription. I wanted to share it with who might be interested on that.

1. Create a new table in NopCommerce Database and name it "Nop_PhoneSubscription"
2. Create the following columns in the above table:
      * Phonesubid (PK, int, not Null)
      * Phoneguid (uniqueidentifier, not Null)
      * Phoneno (nvarchar (255), not Null)
      * Active (bit, Not Null)
      * Createdon (datetime, not Null)
3. Finally, Just copy the files attached in their respective locations in your nopcommerce solutions.
4. Clean then rebuild your solution.


I couldnt attach the files. Anybody who is interested, they can advice me how to attach the files to the forum.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.