升级nopcommerce 2.8〜3.10 [英] Upgrade nopcommerce 2.8 to 3.10

查看:150
本文介绍了升级nopcommerce 2.8〜3.10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我在NopCommerce新。我在Nop.Core,Nop.Data和Nop.Services变化。我也改变了一些控制器,模型和视图Nop.web的。

如果我希望从2.8 nopcommerce版本升级到3.10的话,哪条路是容易的,最好的。

1)备份我的文件,并得到更新。一旦更新完成的话,我可以只更换其中我已经更新,并从原来的code不同的一部分吗?我想补充新方法这是我的备份文件,但不是在原来的code?

2),我可能要创建新的插件或其他方式。

[例如:我在产品表中的变化,并添加如大小,年龄,肤色新领域。]

请让我知道您的宝贵意见。

感谢


解决方案

有没有直正确或错误的答案。我建议对我采取的方法。假设你有基础的顶部code的变化和数据库的变化NOP 2.80。

地面工作

写下了详细的修改清单。 (附加功能已添加在2.80上方。)

请与3.10,如果您的任何修改的支持开箱即用。

我修改计数250(非常详细达估算)。

办法


  1. 升级2.80分贝3.10分贝。​​

  2. 修改3.10 code,支持2.80的新功能。

DB升级


  1. 找到一个好的数据库比较工具。例:SQL比较

  2. 您的生产(2.80)DB恢复到您的开发PC,安装NOP3.10分贝到您的开发PC也是如此。

  3. 将表比较两个数据表。基本上,你会通过比较3.10架构升级2.80分贝3.10分贝。​​

  4. 变更/删除/通过比较3.10 2.80添加新列。

  5. 创建存储信息(Store表)。这是新功能在3.10和需要对大多数其他表STOREID。

  6. 更新客户数据,以匹配3.10架构。

  7. 更新产品信息。 ProductVariant表现合并产品表。因此,需要更新产品表。

  8. 更新订单详细信息。 OrderVariant现在OrderItem的。因此移动数据。

  9. 将其他表。

我用来创建一个SQL脚本,


  1. 从备份文件恢复生产DB。

  2. 脚本块为每个表当中,每个升级表和填充数据。

这让你运行和运行,并再次运行该脚本的灵活性,如果有任何错误,甚至这是有帮助的脚本中。

在除了这一点,如果要合并2个或多个存储在一,


  1. 添加的所有信息存储在步骤5中。

  2. 现在,创建一个单独的脚本从这个角度各店铺。

  3. 您需要找到的OrderId与放大器不同的序列号;客户ID。不能相同。

  4. 当您添加第二个或多个专卖店,检查前加入现有的客户。

检查01

现在取新鲜3.10 code碱基,并运行对迁移的数据库。都应该很好地工作,如果你有正确完成迁移。

code升级

有被上code简单完成,因为有noProductVariant表显著变化。因此,所有的自定义逻辑需要重新编写。

主要问题是,开发票。如果你有一个以上的专卖店,还有每家店的基础上没有电子邮件设置。因此,有自定义修改了。

一个好的做法是,


  1. 请所有的客户端电子商务拳头。

  2. 然后做管理的一面。

  3. 如果客户和管理员在相同的功能,一起做。订单配售工作流程为例,自定义修改。

  4. 将不会有需要的插件大的修改。

检查02

与更新3.10 code碱基运行迁移数据库。所有应该工作。

在大日子


  1. 备份生产DB和生产code基地。

  2. 运行升级脚本,并更换新的code碱基。

  3. 没有3步,既然你已经做了所有的辛勤工作在此之前。

  4. 好吧,如果你搞砸了,然后回退。

要注意的事项

我通过测试得知这些。感谢上帝,我发现他们实际迁移之前。

有在当时我们正在迁移如何设置在NOP商业身边一个完整的多店的解决方案没有详细说明。有一个指令<一个href=\"http://www.nopcommerce.com/boards/t/21356/multi-store-roadmap-lets-discuss-update-done.aspx?p=3#89679\"相对=nofollow>这里如何设置NOP商贸生产服务器。但我并不涵盖所有方面。

我们正在使用VPS服务器来承载我们的平台。如果您正在使用VPS,请提防 SNI 是需要使用,如果你设置了多妥善保管。只有IIS 8.0及以上支持SNI。这意味着你需要的Windows 2012服务器。见<一href=\"http://blogs.msdn.com/b/kaushal/archive/2012/09/04/server-name-indication-sni-in-iis-8-windows-server-2012.aspx\"相对=nofollow>这里和<一个href=\"http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-server-name-indication-sni-ssl-scalability\"相对=nofollow>这里更多关于SNI

我们用Pleask来管理服务器。因此,设置主域小学和所有其他商店的别名。在IIS端,RDP到VPS并使用IIS8的SNI功能设置SSL为每个域

下SNI的一面,并非所有旧的浏览器的支持。请参见这里

限制

如果您使用的是Pleask,然后通过电子邮件不会很好地工作。由于邮箱将只对主域和所有其他别名创建将共享相同的电子邮件帐户。所以,你可以发送从别名电子邮件回复。不幸的是,它的出NOP电子商务发展范围。

我还没有找到一个解决方案。在做这个。

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 wish to upgrade nopcommerce version from 2.8 to 3.10 then, which way is easy and best.

1) I backup my file and get update. Once update is finished then, may i replace only those part which i have updated and differ from original code? May i add new method which is in my backup file but not in original code?

2) Or May i have to create new plugin or other way.

[For example: I have change in product table and add new fields like size, age, color.]

Please let me know your valuable feedback.

Thanks

解决方案

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.

这篇关于升级nopcommerce 2.8〜3.10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆