X-Cart:Blog system in X-Cart 4

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

Overview

Blog system in X-Cart 4 (formerly known as "WordPress in X-Cart") is a product that extends your X-Cart store with a fully functional blog using the most popular blogging software in the world. The add-on module allows you to add WordPress features to your existing X-Cart store.

System requirements

To be able to successfully install and use the module "Blog system in X-Cart 4", you need a working copy of X-Cart version 4.5.0 or later installed on your server. Make sure that the version of the module is the same as the version of the installed copy of X-Cart.

Note: If you do not remember the version of the installed copy of X-Cart, you can find it in the Environment info section of the Summary page in X-Cart Admin area.

Installation

To install the module:

  1. Download the module distribution package from the File Area section of your X-Cart Account. The distribution package is archived in the file wordpress-in-xcart-x.y.z.tgz, where x, y and z are the module version numbers. Make sure the version of the module matches the version of your installed copy of X-Cart.

  2. Copy the distribution package to the X-Cart root directory on your server or hosting account.
    • If you are using a Windows-based server, or a UNIX-based server without terminal access:
    a) Extract the contents of the archive with the module files to a directory on your system using your favorite compression program (WinZIP or any other archiver that supports TAR files).
    b) Use an FTP client to upload all the files extracted from the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
    • If you are using a UNIX-based server with terminal access:
    a) Use an FTP client to upload the archive with the add-on module distribution package to the X-Cart root directory on your server or your hosting account.
    b) Decompress the package using the following command:
    tar -xzvf wordpress-in-xcart-x.y.z.tgz
    (Replace x, y and z with the actual version numbers).
  3. In a web browser, run the installation script http://www.example.com/install-wordpress-in-xcart.php replacing the "www.example.com" with the actual domain name of your X-Cart store. This will start the installation wizard.
  4. Carefully read the License agreement, enter the Auth code for your X-Cart installation into the Auth code field and select the "I accept the License Agreement" check box.
  5. Click Next to continue. The installation process will start. The installer will make the necessary changes to your X-Cart installation, and the module will be activated.
  6. Once the process is completed, click Next. This will open the next screen where you will be asked whether you wish a new system fingerprint to be generated.
  7. Make your selection (Yes/No) and click Next. If you have chosen to generate a new system fingerprint, it will be generated. The process of generating a system fingerprint may take up as long as a few minutes. Once the generation process is completed, click Next. If you have chosen to skip the generation of a system fingerprint, you will be taken to the next step.
  8. If you yet have to install WordPress, skip to next step. If you have WordPress already installed, enter the name of the directory where it is installed.
    Wp xc select dir.png
    Click Next. The installation script checks if WordPress exists in the directory you have specified and, if it is there, displays a confirmation message like the following:
    Wp xc conf msg.png
    Click Next to use the existing WordPress and complete the installation. Skip to the configuring the WordPress step.
  9. Select the directory where you want to install WordPress. Enter the directory name or leave the default value "blog".
    Wp xc select dir.png
    Click the Next button.

    The installation script creates the directory and downloads WordPress package.
    Wp xc 03.png
    Note: This process may take 1-2 minutes.
  10. After the package has been downloaded, a confirmation message like the following is displayed:
    Wp xc 04.png
    Click Next to continue.

    The installation script unpacks the WordPress files. After the process is completed, the link to the WordPress installation script will be displayed:
    Wp xc 05.png
    Click on the link that looks like this: httр://<domain>/<directory>/wp-admin/setup-config.php.

  11. The WordPress page will be opened in a new tab:
    Wp xc 06.png
    On this page you should specify the MySQL details of your WordPress database.
    Note: For increased security, it is recommended to create a separate MySQL user and MySQL database for your WordPress.

    Click Submit to continue.

  12. WordPress creates the wp-config.php file and writes the MySQL details into it. The confirmation message will be displayed as shown below:
    Wp xc 07.png
    Click Run the install to continue.

    If the wp-config.php file cannot be created automatically, you should create it manually in the directory of your WordPress and paste the content from the textarea into it:
    Wp xc 08.png

  13. On the next page you should enter the title of your blog, the e-mail and password of your WordPress admin user:
    Wp xc 09.png
    Click the Install WordPress button.

  14. On the Success page click the Log In button to login to the WordPress admin area with the username and password entered on the previous page:
    Wp xc 10.png

  15. In the WordPress admin area, open the Appearance > Themes section, find the Twenty Eleven for X-Cart theme and click on the Activate link under it:
    Wp xc 11.png

  16. Open the Plugins section, find the Integration with X-Cart plugin and click on the Activate link under it:
    Wp xc 12.png

  17. In the X-Cart admin area, open the Tools > Maintenance page, find the Clear templates/X-Cart cache section and click the Clear button.

  18. If the .htaccess file cannot be updated automatically, the following warning message will be displayed by the installation script:
    Wp xc error 02.png
    You should copy the lines from this message, edit the .htaccess file in your X-Cart directory and insert the lines before the Clean URLs section:
# WordPress in X-Cart [[[
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^blog/index.php blog.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*) blog.php [L]
</IfModule>
# /WordPress in X-Cart ]]]


Visit your blog page to make sure it is displayed correctly. For example, if the "Ideal Comfort" skin is used in your X-Cart, the blog should look like this:

Wp xc 13.png

Uninstallation

Uninstallation permanently removes all the data related to the add-on module "Blog system in X-Cart 4" from your store.

To uninstall the module:

  1. In a web browser, run the installation script http://www.example.com/install-wordpress-in-xcart.php replacing the "www.example.com" with the actual domain name of your X-Cart store. This will start the installation wizard.
  2. At the first step of the uninstall process, select "Uninstall the module", enter the Auth code for your X-Cart installation into the Auth code field and select the "I accept the License Agreement" check box.
  3. Click Next to continue. The uninstallation process will start.
  4. Once the installation script has removed the files of the module "Blog system in X-Cart 4" and deactivated the module, click Next to complete the uninstallation.
  5. Edit the .htaccess file in the X-Cart directory and remove the following lines from it:
# WordPress in X-Cart [[[
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^blog/index.php blog.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*) blog.php [L]
</IfModule>
# /WordPress in X-Cart ]]]

In the WordPress admin area, do the following:

  1. Open the Appearance > Themes page. Choose one of the available themes and click on the Activate link next to it. Find the Twenty Eleven for X-Cart theme, click on the Theme Details link and then click on the Delete link.
  2. Open the Plugins page. In the list of plugins find the Integration with X-Cart item, click on the Deactivate link next to it and then click on the Delete link next to it.

Troubleshooting

Problem: You attempt to open a blog page, but instead of the blog page your browser displays an error message like "This web page has a redirect loop" or "The page isn't redirecting properly".

Solution: Check how your store URL and blog URL are configured.

In the WordPress admin area, go to Settings -> General. Find the two settings, "WordPress Address (URL)" and "Site Address (URL)", configure the addresses as described above and click "Save Changes".