Extra fileds for Addresses

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Is it possible to add new fields to the addresses?

I need to add an extra field to addresses for both shiping and billing.

Which files should I edit?.

I'm new in MVC, so is hard for me to understand the code.

Thanks....
11 years ago
you need to modify the code in following files

1) Presentation/Nop.Web/Controllers/checkoutcontroller.cs
2) Presentation/Nop.Web/Models/AddressModel.cs
3) Presentation/Nop.Web/Views/Common/BillingAddress.cshtml
4) Presentation/Nop.Web/Views/Common/ShippingAddress.cshtml


mvc simple logic flow is request come to controller. controller process the request and map the respective view with or without model. with the use of model view will deliver the final html page as response. :)
11 years ago
Thanks Elanchezhian...

I modified the files you mentioned, but nothing happened. I still don't see any new fields in the Address.

This new field must be visible and editable as any other field of an address. Like Last Name for example.

It must be required and alphanumeric from 6 to 15 characters.

I've checked the document https://www.nopcommerce.com/docs/73/updating-an-existing-entity-how-to-add-a-new-property.aspx and I could add some new fields to Affiliates and even to Customers, but not to addresses.

I don't know if a Team Member could help me with this problem.

I really need guidance here.

Thanks....
11 years ago
do modification in customer area too (controller and views).

Presentation/Nop.Web/Controllers/CustomerController.cs
Presentation/Nop.Web/Controllers/Views/Customer/

did you added necessary column in database address table?
did you added mapping in Libraries/Nop.Data/Mapping/Common/Address.cs ?
11 years ago
Hi Elanchezhian...

Yes I did, but still nothing...

The field appears, but not when editing or creating...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.