Prestashop1.4的升级方法

By | 2012/04/13

程序的升级一直是个不可回避的问题, 为了功能和安全程序应该经常升级, prestashop的升级在网上很不好找到中文文档, 这里记录一下.

prestashop如果在劫难逃.3到1.4升级比较麻烦, 但如果是1.4之间的升级很简单. 只要把修改过的modules和文件都先备份一下, 再用新版本的文件升级就可以了.

升级的方法就是在网站下建立一个新版本的prestashop文件夹, 把修改过的modules和文件覆盖进去, 运行里面install文件, 进行升级安装. 成功确认成功后再把里面的文件全部移出来就可以了.

英文的安装步骤:

There are 5 steps to follow for a successful upgrade:

  1. Save and Backup Your Current Shop
    This step consists of backing up your database and your files. This step is not to be avoided, and should never ever be ignored or skipped. Do not proceed to step 2 without completing this step.
  2. Getting Ready for the New Version
    This step consists of preparing the files that you will need to copy into the new version of PrestaShop.
  3. Starting the Update
    This step consists of starting the upgrade script which will upgrade your database.
  4. QA and Testing
    This step consists of doing various checks to make sure that the store has been properly updated to the latest version.
  5. Going Live with the New Website
    This step will accompany you in going live with the latest update.

These five steps are necessary for a successful upgrade. Please pay close attention to any of them, and do not skip any steps.

里注意要备份和覆盖的文件:

  • /mails folder has all the mails that you have modified.
    If you have never made any modification there, do not worry about this folder.
  • /img folder contains your logo and all the pictures of your store (categories, products…)
  • /modules folder, only copy the modules that you have added.
  • /themes/yourtheme folder, only copy your current theme. If you use the default theme from PrestaShop, do not copy it, you must use the one from the new version.
  • /download and /upload folders, which contain all the downloadable products, the attached files and the customizable products. If you do no use any of these functionalities, do not copy these folders.
  • /classes folder: in case you have added customized classes to this folder, copy them to the new /classes folder.
    In order to function properly with the latest version of PrestaShop, all these class files need to have their class name suffixed with “Core”:

    • Open each and every one of the class files, and find the ones where the class name is not Core-suffixed. If you are upgrading from PrestaShop 1.4.x, you shouldn’t have any (except for custom classes).
    • Rename the class name, adding the “Core” suffix. For instance, “MyClass” becomes “MyClassCore“.
      Only change the name in the PHP class within file, not the name of the file itself!
    • If all the files already have “Core” in their classname (such as “class AttributeCore extends ObjectModel“), then you do not need to change anything.
    • Save the edited files.
  • /config folder, only copy the settings.inc.phpfile, then modify the following lines:
    • The line that contains “PS_BASE_URI” must contain the name of the subfolder where you are going to do your update. For instance, “/prestashop/” instead of “/“, or of the name of current folder for your current store.
    • If you modified your database credentials (you should not have had to do that normally), update all the lines that contain “DB_NAME“, “DB_USER” and “DB_PASSWD” too.

1.4.4以后的升级可以在后台直接完成, 有明白的地方可以看一下英文版和升级指导:

http://doc.prestashop.com/display/PS14/Updating+PrestaShop