X-Cart:Obtaining Upgrade Packs and Database Upgrade Scripts

From X-Cart 4 Classic
Revision as of 02:54, 11 June 2012 by Dohtur (talk | contribs)
Jump to: navigation, search

This chapter focuses on obtaining and applying upgrade packs and database upgrades. For information on the pre-upgrade and post-upgrade procedures, please consult the section Upgrading X-Cart step by step.

Upgrading to Branch 4.4.x

Depending on the branch and version your X-Cart store belongs to, you can upgrade the store to branch 4.4.x either directly or through a series of transitional steps (upgrades). You are likely to deal with the second option if you do not upgrade your store regularly, as every new branch of X-Cart is bundled with the database upgrade packs for latest minor versions for two X-Cart branches antecedent to the current branch only.

This presumes that, prior to upgrading to branch 4.4.x, you must complete the following upgrade tasks:

  • If your store belongs to branch 3.5.x, successively upgrade the database to version 4.1.12.
  • If your store belongs to branch 4.0.x, successively upgrade the database to version 4.1.12.
  • If your store belongs to branch 4.1.x, successively upgrade X-Cart to version 4.1.12.
  • If your store belongs to branch 4.2.x, successively upgrade X-Cart to version 4.2.3.
  • If your store belongs to branch 4.3.x, successively upgrade X-Cart to version 4.3.2.


Obtaining upgrade packs and database upgrade scripts

Obtaining in-branch upgrade packs

To obtain an upgrade pack for upgrading to the latest minor version within a branch:

Branch 3.5.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and open the folder X-Cart -> X-Cart supporting files for prev versions -> X-Cart 3.5 -> Upgrade kits for 3.5.x branch.
  3. Locate the archive with the required upgrade pack. X-Cart upgrade pack archives use the following name formats:
    • [current_version]-[target_version]-gold_upgrade.tgz or [current_version]-[target_version]-gold_upgrade.zip
    • [current_version]-[target_version]-pro_upgrade.tgz or [current_version]-[target_version]-pro_upgrade.zip
      where the [current_version] part is the version of your current X-Cart installation, and the [target_version] part is the X-Cart version to which you are upgrading the store. Take note that the gold or pro part must match the X-Cart edition you use: X-Cart Gold or X-Cart Pro, respectively.
  4. Download the archive with the upgrade pack to your local computer.

Branch 4.0.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and open the folder X-Cart -> X-Cart supporting files for prev versions -> X-Cart 4.0 -> Upgrade kits for 4.0.x branch.
  3. Locate an archive with the required upgrade pack. X-Cart upgrade pack archives use the following name formats:
    • [current_version]-[target_version]-gold_upgrade.tgz or [current_version]-[target_version]-gold_upgrade.zip
    • [current_version]-[target_version]-pro_upgrade.tgz or [current_version]-[target_version]-pro_upgrade.zip
      where the [current_version] part is the version of your current X-Cart installation, and the [target_version] part is the X-Cart version to which you are upgrading the store. Take note that the gold or pro part must match the X-Cart edition you use: X-Cart Gold or X-Cart Pro, respectively.
  4. Download the archive with the upgrade pack to your local computer.

Branch 4.1.x-4.4.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and click the Get upgrade pack tab.
    This will open the section 'Get upgrade pack'.
  3. Use the controls in the 'Get upgrade pack' section to configure the required upgrade pack:
    • License: Select an X-Cart license that is registered for the store you want to upgrade.
    • Modules (optional): Select commercial add-on modules and skin templates that you want to upgrade together with the store.
    • Free modules: Select free add-on modules and skin templates that you want to upgrade together with the store.
    • Upgrade pack: Select a pack to upgrade your store from the current version to the target version.
    • Archive type: Select the type of an archive for the configured pack.
  4. Click the Get upgrade pack button.
    The system will generate the upgrade pack and open a dialog box asking you what to do with the archive.
  5. Select to save the archive to your local computer.

Obtaining database upgrade scripts

To obtain a database upgrade script:

Branch 3.5.x to branch 4.1.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and open the folder X-Cart -> X-Cart supporting files for prev versions -> X-Cart 3.5 -> Upgrade kits for 3.5.x branch.
  3. Locate an archive with the required database upgrade script. X-Cart database upgrade script archives use the following name formats:
    • [current_version]-[target_version]_sql_upgrade.tgz
    • [current_version]-[target_version]_sql_upgrade.zip
  4. Download the archive with the database upgrade script to your local computer.

Branch 4.0.x to branch 4.1.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and open the folder X-Cart -> X-Cart supporting files for prev versions -> X-Cart 4.0 -> Upgrade kits 4.0.x branch.
  3. Locate an archive with the required database upgrade script. X-Cart database upgrade script archives use the following name formats:
    • [current_version]-[target_version]_sql_upgrade.tgz
    • [current_version]-[target_version]_sql_upgrade.zip
  4. Download the archive with the database upgrade script to your local computer.

Branch 4.1.x to branch 4.4.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and open the folder X-Cart -> X-Cart 4.4.0 -> DB upgrader 4.1.12->4.4.0.
  3. Locate an archive with the required database upgrade script. X-Cart database upgrade script archives use the following name formats:
    • [current_version]-[target_version]_sql_upgrade.tgz
    • [current_version]-[target_version]_sql_upgrade.zip
  4. Download the archive with the database upgrade script to your local computer.

Branch 4.2.x to branch 4.4.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and open the folder X-Cart -> X-Cart 4.4.0 -> DB upgrader 4.2.3->4.4.0.
  3. Locate an archive with the required database upgrade script. X-Cart database upgrade script archives use the following name formats:
    • [current_version]-[target_version]_sql_upgrade.tgz
    • [current_version]-[target_version]_sql_upgrade.zip
  4. Download the archive with the database upgrade script to your local computer.

Branch 4.3.x to branch 4.4.x

  1. Log in to your Help Desk account at https://secure.qtmsoft.com .
  2. Go to the 'File area' section and open the folder X-Cart -> X-Cart 4.4.0 -> DB upgrader 4.3.2->4.4.0.
  3. Locate an archive with the required database upgrade script. X-Cart database upgrade script archives use the following name formats:
    • [current_version]-[target_version]_sql_upgrade.tgz
    • [current_version]-[target_version]_sql_upgrade.zip
  4. Download the archive with the database upgrade script to your local computer.

Applying upgrade packs and database upgrade scripts

Applying upgrade packs

To apply an upgrade pack to your X-Cart installation:

  1. Place the files of your upgrade pack in the X-Cart root directory on your server or hosting account.
    • If you use a Windows-based server, or a UNIX-based server without terminal access:
      Decompress the upgrade pack archive to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
      Use an FTP client to upload all the files of the upgrade pack (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
    • If you use a UNIX-based server with terminal access:
      Use an FTP client to upload the upgrade pack archive to the X-Cart root directory on your server or your hosting account.
      Decompress the archive using the following command:
      tar -xzvf <archive_filename>
  2. Make sure that the files that will be patched during the upgrade have world writable permissions. Names of the files to be patched are listed in the file <xcart_dir>/upgrade/[source-version]-[target-version]/file.lst.
    If you use a UNIX-based server, to set world writable permissions to the required files you can run the following shell command:
    for i in `sed -e 's/,.*$//g' < upgrade/[source-version]-[target-version]/file.lst`; do chmod 666 $i ; done
    replacing the [source-version] and [target-version] parts with the source and target versions of the X-Cart installation that you upgrade.
    Important! You must run the command from the X-Cart root directory.
  3. Log in to the X-Cart Admin area.
  4. Go to the 'Patch/Upgrade Center' page (Tools menu -> Patch/Upgrade. Before X-Cart 4.4.x: Administration menu -> Patch/Upgrade).
  5. In the 'Upgrade' section of the 'Patch/Upgrade Center' page, use the 'Target version' drop-down box to select the version to which you are going to upgrade your store (This corresponds to the upgrade pack you have uploaded). Also, in the 'I confirm that:' list, select all the checkboxes that apply. Click the Apply button.
    X-Cart will test whether the files that need to be patched by the upgrade pack can be patched successfully and will list the respective files showing their status. The file status definitions are as follows:
    • OK - File can be patched successfully.
    • Checksum error - Patch is corrupted. Try to download the patch again.
    • Non-writable - File does not have write permissions. Set write permissions on the file.
    • Not a file - Target is not a file. The original X-Cart structure has been modified and you need to apply the patch manually.
    • Not exists - File is missing. The original X-Cart structure has been modified and you need to apply the patch manually.
    • Could not patch - Patch cannot be applied to the file automatically, as the original X-Cart structure has been modified, and you need to apply the patch manually.
    • Already patched - File has been patched already.
      If your Patch/Upgrade center detects any problems (errors - marked in red), you will not be able to proceed with upgrading your X-Cart based store until these problems are resolved. You will have to go back, make the necessary corrections and run the upgrade pack applicability test once again.
      As soon as the applicability test has been passed successfully, you can continue with the upgrade pack application.
  6. Click the Apply patch button at the bottom of the page.
    X-Cart will start patching the files. After the upgrade pack has been applied, X-Cart will display the list of patched files and a detailed report about the changes that have been made.
  7. Click the Finish button at the bottom of the page to complete the upgrade pack application.

Applying database upgrade scripts

To apply a database upgrade script:

  1. Place the database upgrade script in the X-Cart root directory on your server or hosting account.
    • If you use a Windows-based server, or a UNIX-based server without terminal access:
      Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
      Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
    • If you use a UNIX-based server with terminal access:
      Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
      Decompress the package using the following commands.
      tar -xzvf <archive_filename>
  2. In a web browser, run the upgrade script <xcart_dir>/upgrade_sql.php replacing the <xcart_dir> part with the true URL of your X-Cart installation. For example, http://www.example.com/xcart/upgrade_sql.php.
  3. Read the X-Cart License Agreement and click the Proceed with Upgrade button.
    The script will display the progress of the upgrade task and finally report about the results.
  4. Retrieve the value of the variable $blowfish_key from the file config.php in the root directory of your existing X-Cart installation and temporarily save it somewhere on your local computer.
    You will be asked to provide the Blowfish key later in order that X-Cart to decrypt the data in the upgraded database.
  5. Install a fresh copy of X-Cart 4.3.x as described in the section Installing X-Cart earlier in this manual. Make sure the copy of X-Cart that you are going to install is the same as the the version of the upgraded database.
    When installing X-Cart:
    • If you install X-Cart to the directory on your server or hosting account where a previous version of X-Cart is located, at the first step of the installation wizard select the radio button New Installation and enter the Auth code for the existing X-Cart installation. If you do not remember the code, retrieve the value of the variable $installation_auth_code from the file <xcart_dir>/include/install.php.
    • At the step Preparing to Install X-Cart Database of the installation wizard, select the check box Update config.php only and enter Blowfish key for the upgraded database.

Troubleshooting

Checksum errors during upgrade

Firstly, if you use WinZip for extracting the files from the upgrade/distribution kit, you need to change its default configuration as follows: Click Options, Configuration, then select the Miscellaneous tab and clear the 'TAR file smart CR/LF conversion' option. After that, unpack the files from the archive once again and re-submit the files to your server.

Secondly, when you use an FTP client for uploading text files to the server, the FTP application may alter your files (if it's set to transfer data in the 'ASCII'/'Text' mode). It replaces the line-break characters that are different in Unix and Windows systems whereas all the other text is left the same. These changes are not visible, but X-Cart checks the files' checksum and the values appear different from the expected ones. In order to solve the problem, you set your FTP client in the 'Binary' mode and upload the upgrade package files to the server again.