How to preserve customization while upgrading to a new version?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
I have extended Affiliate Module in NopCommerce 2.6 by adding two new fields like "WebsiteURL" and "Picture Upload". For that I have made changes in Affiliate Services, Affiliate Controller, Affiliate.cs,Affiliate Map,Affiliate Model files. Now If I want to make update this feature in next version of NopCommerce then how can I Integrate this functionality in that. Is there any way to do this automatically? or I have to do this customization manually?

I would like to learn how to customize in a way that helps in customization for future upgradation of NopCommerce.
11 years ago
Your options are:

1. Create a plugin. This will preserve while upgrading
2. Create an alternative implementation by implementing the appropriate interfaces and changing the DI. This may or may not preserve depending on the changes but it is more isolated than option 3.
3. Make changes to the nop files directly. This will NOT preserve while upgrading
11 years ago
keesjan wrote:
Your options are:
2. Create an alternative implementation by implementing the appropriate interfaces and changing the DI. This may or may not preserve depending on the changes but it is more isolated than option 3.


Can you elaborate this point in detail please?  It's better if you give an example with it.
11 years ago
Can you please explain how to make such changes using Plugin? Any hel for this specific requirement will be great for community to understand.
11 years ago
Dharmik wrote:
Your options are:
2. Create an alternative implementation by implementing the appropriate interfaces and changing the DI. This may or may not preserve depending on the changes but it is more isolated than option 3.


Can you elaborate this point in detail please?  It's better if you give an example with it.


Instead of making changes to AffiliateService, creat a new class MyAffiliateService and implement IAffiliateService, forward the methods you don't want to change to AffiliateService and change the methods you want. This will isolate your changes and makes it easier to upgrade
11 years ago
jariwalakrunal wrote:
Can you please explain how to make such changes using Plugin? Any hel for this specific requirement will be great for community to understand.


Was speaking in general, not everything can be done with plugins but it would be very nice if it could

Vote for this workitem to get NC in that direction
http://nopcommerce.codeplex.com/workitem/11006
11 years ago
keesjan wrote:
Your options are:
2. Create an alternative implementation by implementing the appropriate interfaces and changing the DI. This may or may not preserve depending on the changes but it is more isolated than option 3.


Can you elaborate this point in detail please?  It's better if you give an example with it.

Instead of making changes to AffiliateService, creat a new class MyAffiliateService and implement IAffiliateService, forward the methods you don't want to change to AffiliateService and change the methods you want. This will isolate your changes and makes it easier to upgrade



If I make one new class library for these types of customizations , then what will be challenges ? Is this right way to do this?

Because if this may happen then it would be great to upgrade to new version.

What do you think guys?
11 years ago
In Nop.Admin i have extended two fields(WebSite_URL & Picture_Upload) in Create and Edit methods in AffiliateController.cs. Is there any way so that i can prevent customization on in built methods of NopCommerce files ? If possible then how can i prevent this type of customization?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.