Registering Users

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 14 ans
Hi,

I've noticed when a new user registers they are not automatically made 'active'. Is this by design? i.e. do all users have to be activated via the admin console? Is it possible to automatically make them active when they register?

Also, what would need to be modified if I wanted to customise the registration process with the following?

- Replace DOB with Student Number
- Remove Post Code
- Remove Country
- Remove Newsletter options
- Remove State Providence

Thanks!
Il y a 14 ans
To require a customer to validate his emails go to admin area, then Configuration, Global Settings. Open "Other" tab and check "'Customer email validation' enabled".

Removing customer properties like postcode needs much more time.
Il y a 14 ans
I figured it wouldn't be that easy to remove them!

Thanks for the setting. Will check it out later.
Il y a 14 ans
Just to note I didn't find that setting under 'Other' as I'm using v1.11. However, I was able to edit the setting under 'All Settings' by modifying Customer.RegistrationEmailValidation.
Il y a 14 ans
When a user now registers they get an e-mail with the default message in the Customer.EmailValidationMessage Template:

Email validation message isn't implemented yet

What details do I need to put in here so that a user will be activated when they receive the Email validation message?
Il y a 14 ans
"Email validation message" option was not implemented in nopCommerce 1.11. You should use 1.20 or higher.
Il y a 14 ans
I have a similar question. Where can I add properties to the Customer object and what files need to be modified to accommodate the new properties?

Of course, I'll need to add columns in the database as well, so any advice there is greatly appreciated as well.

Thanks!

Larry
Il y a 14 ans
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
Il y a 14 ans
This will be a HUGE help. Thanks!

Larry
Il y a 14 ans
Ben,

After looking through the affected files, it seems like only steps 1 and 2 are needed if the new information is stored as an 'Attribute' instead of an actual property of the entity.

Is this correct?

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