Registering Users

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 14 años
I am reviewing the Nopcommerce application and I like what I see and would like to bring our current Store in house since my customer requires a lot of customizations.    So, here is the challenge.  

1. I am browsing the library folders and I see that each folder
Nop.Common
Nop.DataAccess
Nop.DataAccess.Sqlserver

Contains a set of C# Files and Project Solution.   if I were to add Properties to customer.cs do I need to recompile the .DLL?


I am using the Express 2008 Web and Visual C# and I understand VB and I am learning C#.  

Any Guidance or suggestion is great appreciated.


Registration

First Name
Last Name

Email Address
Password
{Submit}


Billing Information (Not Needed)


Shipping  
Section Number [drop down List - Auto populate below]
     First Name
     Last Name
     Store Name/Number
     Address 1
     Address 2
     City
     State / Province
     Zip / Postal Code
     Country
     Phone

Custom Question 1  Yes/No
Custom Question 2  Account Manager List



Customer Log in Determines what they can see (USA or CANADA Products)
Language is Filters within within Canada

I am sure I am going to think of other things but would like to get the ball rolling and determine where I need to make the changes.
Hace 14 años
Larry,

If you are creating a property for your business classes only (not persisting back to your data store) then only step 1 is required. For example, in customer you may have:

    public string FirstName{ get; set; }
    public string LastName{ get; set; }


public string FullName
{
return this.FirstName + " " + this.LastName;
}


Here this property is the result of two existing properties. You may also have a property running a collection e.g. for a manufacturer class:

public ProductCollection Products
{
return ProductManager.GetProductsByManufacturer(this.ManufacturerID)
}

Here the property is the result of another function.

If however you wanted to save your custom property back to your data store then both steps are required as you need the property to be added to your DBEntity class in order to map between the two layers.

Hope this helps,
Ben
Hace 14 años
Dave,

As per my response to Larry, if you need to store these custom properties in your database then you will need to follow the steps on the first page of this topic.

We are looking into an easier way of managing the fields required during registration so that the storekeeper has more control over the data collected.

Hope this helps,
Ben
Hace 14 años
Thanks Ben... I am reviewing and testing what was mentioned in the beginning of thread to add a new field.    Hope to have an answer soon.
Hace 14 años
Thanks Ben,

I am persisting the new fields in the DB, but I'm saving them as attributes so I don't have to modify the table structures.

I've verified that the data is getting saved correctly... even encrypting bank info... so I "think" the other steps are only needed if you're adding columns to the Customer or Address tables.

Larry
Hace 14 años
Admittedly I have to agree with those in favour of using ORM technologies, in that the above process is a bit long winded to add one field. However I have done a lot of work with the nopCommerce architecture recently that make extending the nopCommerce providers much easier. 

Hope this helps,
Ben


All I can say is Thank you, thank you and thank you!!
Hace 14 años
I can't offer my customers newsletters which means that I have to deactivate this function. But how do I?
Hace 14 años
I know this is an old thread, but I just added a couple fields to the database and the email queue classes... wow it felt like I had to make 100 changes just to add this.
Hace 13 años
nopCommerce team | retroviz wrote:
Adding a new field to an entity in nopCommerce

1. Add the property to your entity class in Nop.Common (e.g. Customer.cs)
2. Add the property to your DB Entity class in Nop.DataAccess (e.g. DBCustomer.cs)
3. Update the DBMapping function in your EntityManager to map the new fields from data entity to business objects (e.g. CustomerManager)
4. Update your insert and update methods in DBEntityProvider (e.g. DBCustomerProvider) to include the new parameter.
5. Update your insert and update methods in EntityManager to include a parameter for your new field (e.g. CustomerManager) and pass this to your updated DBEntityProvider methods
6. Update insert and update methods in Sql provider (e.g. SqlCustomerProvider) to accept new parameter (and pass to stored proc)
7. Update GetEntityFromReader methods in Sql provider to map new field from database.
8. Modify EntityInsert and EntityUpdate stored procs to accept new parameter (select procs should be okay since most of them are select *)

Think that's it.

Admittedly I have to agree with those in favour of using ORM technologies, in that the above process is a bit long winded to add one field. However I have done a lot of work with the nopCommerce architecture recently that make extending the nopCommerce providers much easier. With the changes I plan to implement it would only be necessary to update the Business/DB entity objects with the new field, the business insert/update methods with the new parameter and the business/sql mappings.

Hope this helps,
Ben


I did that, when the customer updates a property, lets say "TaxNumber" the value actually gets stored in the database, i checked via sql server studio, after changing to another page the value gets to "" in the server why?
This is so frustrating...
Hace 13 años
OMFG...How come nobody can answer a damn PM? I am trying to add a SIMPLE FIELD into the registration form.
Vacuum S/N:

At this point I'm happy with someone telling me how to go about changing the "Fax Number:" under the "Your Contact Information" section of the Registration form to "Vaccum S/N:"

HOW DO I GET THAT DONE????

I am running 1.60 on GoDaddy hosting.

ANY HELP OUT THERE?????
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.