Upgrade nopcommerce 2.8 to 3.10

前端 未结 2 1332
醉话见心
醉话见心 2020-12-16 08:05

Hello,

I am new in NopCommerce. I have change in Nop.Core, Nop.Data and Nop.Services. I have change also in some controller, Model and view of Nop.web.

If i

相关标签:
2条回答
  • 2020-12-16 08:38

    There is no straight right or wrong answer. I am suggesting on the approach i took. Assuming you have code changes and database changes on top of base nop 2.80.

    Ground Work

    Write down a detailed modifications list. (Additional functions you have added on top of 2.80.)

    Check with 3.10 if any of your modification is supported out of the box.

    My modification count was 250 (very detailed up to estimation).

    Approach

    1. Upgrade 2.80 db to 3.10 db.
    2. Modify 3.10 code to support new features of 2.80.

    DB Upgrade

    1. Find a good database diff tool. ex: SQL Compare.
    2. Restore your production (2.80) DB to your dev pc and install nop 3.10 db into your dev pc as well.
    3. Compare both DB table by table. Basically, you are going to upgrade 2.80 db to 3.10 db by comparing 3.10 schema.
    4. Alter/Delete/Add new columns in 2.80 by comparing 3.10.
    5. Create Store information (Store table). This is new feature in 3.10 and StoreID is needed for most other tables.
    6. Update customer data to match 3.10 schema.
    7. Update products information. ProductVariant table is now merged with Product table. So need to update product table.
    8. Update Order details. OrderVariant is now OrderItem. So move the data.
    9. Move other tables.

    I used to create single SQL Script which,

    1. Restores Production DB from a backup file.
    2. Script block for each table which, upgrades each tables and populates data.

    This gives you flexibility of run and run and again run the script if there is any error or even this is helpful during scripting.

    In addition to this, if you are merging 2 or more stores in to one,

    1. Add all store information in step 5.
    2. Now create a separate script for each store from this point.
    3. You need to find different sequence number for OrderId & Customer id. Can't be same.
    4. When you add 2nd or more store, check for existing customer before adding.

    Check 01

    Now take a fresh 3.10 code base and run against your migrated db. All should work well if you have done migration properly.

    Code Upgrade

    There is significant changes to be done on code simple because there is noProductVariant table. So all the custom logic needs to be re written.

    Main issue is, invoicing. If you have more than one store, there is no email setting per store basis. So have to custom modify that too.

    A good approach would be,

    1. Do all the customer side eCommerce fist.
    2. Then do the admin side.
    3. If customer and admin in same functionality, do together. example, custom modification on order placing work flow.
    4. There will not be big modification needed for plugins.

    Check 02

    Run the migrated DB with Updated 3.10 code base. All should work.

    On Big Day

    1. Backup Production DB and Production Code base.
    2. Run the Upgrade scripts and Replace new code base.
    3. No 3rd Step, since you have done all the hard work before this.
    4. Ok, if you screw up, then roll back.

    Things to Note

    I learned these by testing. thank god, i found them before actual migration.

    There is no detailed instructions at the time we were migrating on how to setup a complete multi-store solution in nop commerce side. There is a instruction here on how to setup nop commerce in production server. but i is not covering all the aspects.

    We were using VPS Server to host our platform. If you are using VPS, please beware that SNI is need to be used if you set up multi-store properly. Only IIS 8 and above supports SNI. Which means you need Windows 2012 Server. See here and here for more on SNI

    We were using Pleask to manage the server. So set up master domain as primary and all other stores as alias. In IIS side, RDP in to VPS and Set up SSL for each domain using SNI feature of IIS8

    Down side of SNI, it is not supported by all old browsers. See here.

    Limitations

    If you are using Pleask, then email wont work very well. Since email box will be created only for master domains and all other alias will share the same email accounts. So you can send a reply from alias email. unfortunately, its out of nop commerce development scope.

    i haven't found a solution for this. working on this.

    0 讨论(0)
  • 2020-12-16 08:42

    I'd recommend doing the database incrementally. According to the upgrade guide, you must apply the upgrade scripts one at a time, just read through the guide and have at it.

    0 讨论(0)
提交回复
热议问题