X-Cart:After the upgrade

From X-Cart 4 Classic
Jump to: navigation, search

After you have upgraded the development copy of your store, it is important to make sure that everything works correctly before your start replacing your live store with the upgraded copy. The Post-Upgrade Checklist section covers the basic X-Cart functionality and is intended to help you test most critical features.

Besides, after an upgrade it is important to carry out a number of tasks that pertain to the store maintenance (see section Basic Maintenance Jobs) and restore the original file permissions that were modified during the upgrade (see section Restoring File Permissions).

NEED HELP? Feel free to contact our support team via your personal Help Desk accounts should you require any help in upgrading your X-Cart store to the latest version.

Basic Maintenance Jobs

After you have upgraded the store you need to carry out some basic maintenance-related tasks, which include regenerating the Blowfish key and cleaning the template cache.

Regenerating the Blowfish key

To regenerate the Blowfish key:

  1. Log in to the X-Cart Admin area.
  2. Use the Re-generate the Blowfish Encryption Key tool.

Clearing the template cache

To clear the template cache:

  1. Log in to the X-Cart Admin area.
  2. Use the Clear Templates/X-Cart Cache tool.

Restoring File Permissions

Original file permissions get changed during an upgrade, and you need to restore them after the upgrade to ensure correct functioning of the store. The instructions below describe what permissions must be set for X-Cart files and folders. The examples are provided for the Apache web server running on a UNIX-based operating system. If you use a different bundle, please refer to the documentation for the web server and operating system you use, or contact your hosting team for help.

General info

The exact set of file permissions would depend on whether the scripts are run in the privileged mode or non-privileged mode. The privileged mode means that scripts are run under the user who is the owner of the files while in the non-privileged mode scripts are run under a different user. This implies two different approaches to setting up file permissions:

  • In the privileged mode, permissions must be granted to the owner of the files only as the scripts run under that user. Permissions for the members of the files' group and other users must be disabled then.
  • In the non-privileged mode, permissions must be granted to the owner of the files, members of the files' group and other users who are not the owner of the file or members of the group.

On the Apache web server running on a UNIX-based operating system you can find out the current mode by running in a web browser the PHP script below. The script will display two user names: the name of the script owner who put the files to the server through FTP or SSH, and the name of the user who runs the scripts. If the two names coincide, the privileged mode is enabled; otherwise, you work in the non-privileged mode.

<?php
$processUser = posix_getpwuid(posix_geteuid());
print get_current_user() . " / " . $processUser['name'];
?>

On a UNIX-based operating system file permissions for a file are changed through the the following shell command.

chmod <permissions_code> <file_path>

The permissions_code part must be a three-digit number where each digit represents a different component of the permission set: file owner, members of the group who the file owner belongs to and other users who are not the file owner or group members. Each digit is a sum of three digits, which can be 0 (no permission), 1 (execute a file or search in a directory), 2 (write) or 4 (read). Below is a list of all available values and their meaning:

  • 0 : No permission
  • 1 : Execute/search
  • 2 : Write
  • 3 : Write and execute/search
  • 4 : Read
  • 5 : Read and execute/search
  • 6 : Read and write
  • 7 : Read, write and execute/search

For example, the permissions code 740 for a file would mean that the file owner can read, write and execute the file (7), the group members can only read the file (4) and other users can do nothing with the file (0); the permissions code 511 for a directory would mean that the file owner read the contents of the directory and search in the directory (5) while the group members and other users can only search in the directory (1).

See also:

Setting up file permissions for X-Cart files and directories

Scripts and directories containing scripts

Privileged Mode Non-privileged Mode
Directories: 711
  • Owner: read, write and search
  • Group: search
  • Other: search

Files: 600

  • Owner: read and write
  • Group: no permission
  • Other: no permission
Directories: 755
  • Owner: read, write and search
  • Group: read and write
  • Other: read and write

Files: 644

  • Owner: read and write
  • Group: read
  • Other: read

These permissions must be set for directories admin, customer, include, mail, modules,partner, payment, provider, shipping and upgrade and their subdirectories, and for all *.php files from these directories and the X-Cart root directory.

Templates and directories containing templates and embedded static pages

Privileged Mode Non-privileged Mode
Directories: 711
  • Owner: read, write and search
  • Group: search
  • Other: search

Files: 644

  • Owner: read and write
  • Group: read
  • Other: read
Directories: 777
  • Owner: read, write and search
  • Group: read, write and search
  • Other: read, write and search

Files: 666

  • Owner: read and write
  • Group: read and write
  • Other: read and write

These permissions must be set for the directory skin and all its subdirectories, and for all files in the directory skin and its subdirectories.

X-Cart 4.0or above
Note: In versions prior to 4.4.x, templates are stored in the directory skin1
Note: Root level static pages are stored in the X-Cart root directory, so if you want to be able to edit these pages via X-Cart admin back-end, set the same permissions (as specified above) for the X-Cart root directory and for the corresponding static page's files located in it.

Temporary and service directories: Directory .pgp

Privileged Mode Non-privileged Mode
Directories: 711
  • Owner: read, write and search
  • Group: search
  • Other: search

Files: 644

  • Owner: read and write
  • Group: read
  • Other: read
Directories: 777
  • Owner: read, write and search
  • Group: read, write and search
  • Other: read, write and search

Files: 644

  • Owner: read and write
  • Group: read
  • Other: read

These permissions must be set for the directory .pgp and its subdirectories, and for all files in the directory .pgp and its subdirectories.

Temporary and service directories: Directories catalog and images

Privileged Mode Non-privileged Mode
Directories: 711
  • Owner: read, write and search
  • Group: search
  • Other: search

Files: 644

  • Owner: read and write
  • Group: read
  • Other: read
Directories: 777
  • Owner: read, write and search
  • Group: read, write and search
  • Other: read, write and search

Files: 666

  • Owner: read and write
  • Group: read and write
  • Other: read and write

These permissions must be set for the directories catalog and images and their subdirectories, and for all files in the directories catalog and images and their subdirectories.

Temporary and service directories: Directory files

Privileged Mode Non-privileged Mode
Directories: 711
  • Owner: read, write and search
  • Group: search
  • Other: search

Files: 644

  • Owner: read and write
  • Group: read
  • Other: read
Directories: 777
  • Owner: read, write and search
  • Group: read, write and search
  • Other: read, write and search

Files: 666

  • Owner: read and write
  • Group: read and write
  • Other: read and write

These permissions must be set for the directory files and its subdirectories, and for all files in the the directory files and its subdirectories.

Temporary and service directories: Directory var

Privileged Mode Non-privileged Mode
Directories: 711
  • Owner: read, write and search
  • Group: search
  • Other: search

Files: 644

  • Owner: read and write
  • Group: read
  • Other: read
Directories: 777
  • Owner: read, write and search
  • Group: read, write and search
  • Other: read, write and search

Files: 666

  • Owner: read and write
  • Group: read and write
  • Other: read and write

These permissions must be set up for the directory var and its subdirectories, and for all files in the the directory var and its subdirectories.


Example of setting permissions to files and folders

cd <xcart_dir>
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

Post-Upgrade Checklist

After you have upgraded the development copy of the store, you must not proceed to replacing the live store until you have tested it thoroughly as advised in the checklist below and made sure that the store functions correctly. For convenience, the checklist is divided according to the available user interfaces: Customer area, Admin area, Provider area (X-Cart PRO) and Partner area (X-Affiliate).

Customer area

Make sure you can successfully carry out the following tasks:

Registration and login

  • Log in to the store as an existing customer.
  • Register in the store as a a new customer.

Product catalog

  • Browse the product catalog and see products in subcategories of all levels.
  • Find products using the built-in search and advanced search tool.
  • Add a product to the cart from the product details page and from the product list.

Ordering and checkout

  • Place a few test orders and proceed to checkout with every one of them.
  • Apply a discount coupon to an order.
  • Make sure discounts of different types are calculated correctly.
  • Make sure orders include taxes and taxes are calculated correctly.
  • Make sure orders include shipping cost and the shipping charges are calculated correctly for different destination zones.
  • Partially pay for the order with a gift certificate and pay for the rest of the order amount with a credit card.
  • Place several orders that include the same set of products but use different discounts and discount coupons.
Important: When placing test orders and testing the checkout mechanism, use sandbox merchant accounts that are normally provided by every payment gateway/system. To test credit card payments, use test credit card numbers. To find out what test credit card you should use, please refer to the documentation for your payment gateway/system.

Admin area

Make sure you can successfully carry out the following tasks:

Registration and login

  • Log in to the Admin area.

Product catalog

  • Create a new product category.
  • Edit and save category properties.
  • Remove a category from the catalog.
  • Re-assign a category to a different parent category.
  • Create a new product.
  • Edit and save product properties.
  • Remove a product from the catalog.
  • Clone a product.
  • Re-assign a product to a different category.
  • Search for a product using basic and advanced search mechanisms.
  • Edit properties of several products at once.
  • Add a product to the list of featured products.
  • Remove a product from the list of featured products.

Ordering and payment options

  • Access the store orders.
  • Search for orders and sort orders according to search criteria.
  • Change order statuses in bulk.
  • Delete selected orders.
  • Issue invoices for the selected orders.
  • Generate shipping labels for the selected orders.
  • Export selected/all orders.
  • Navigate between orders.
  • Add tracking number to the order.
  • Make sure order total is calculated correctly.
  • Make sure order statuses get changed correctly.
  • Create a new payment method.
  • Edit and save existing payment methods.
  • Enable a new real-time shipping method.

User management

  • Create an administrator account.
  • Edit and save administrator account details.
  • Create a customer account.
  • Edit and save customer account details.
  • Create a provider account (X-Cart PRO).
  • Edit and save provider account details (X-Cart PRO).
  • Assign a product to a provider (X-Cart PRO).
  • Block and unblock accounts of different types.
  • Delete test provider and customer accounts.

Company details

  • Edit company details and make sure they are displayed correctly.
  • Make sure company details are displayed correctly in orders, invoices and email notifications.
  • Make sure company details are used correctly when calculating shipping cost.

Shipping options

  • Enable shipping in the store.
  • Edit general shipping options.
  • Enable real-time shipping rate calculation.
  • Make sure shipping rates are calculated correctly depending on customers' address.
  • Create a new shipping method.
  • Edit details of an existing shipping method.
  • Edit shipping rates for an existing shipping method.
  • Make sure shipping markup is calculated correctly.

Taxes

  • Create a new tax rule.
  • Delete a tax rule.
  • Edit tax rates for a tax rule.
  • Make sure taxes are calculated correctly both in the Customer and Admin area.

Import/export

  • Make sure data can be exported correctly according to the defined options.
  • Make sure data can be imported correctly.