Difference between revisions of "X-Cart:FAQs"
m (→How do I test whether emails are actually sent from my website?) |
(→Upgrading) |
||
Line 479: | Line 479: | ||
Secondly, when you use FTP for uploading text files on the server it may alter your files (if it's in <b>'ASCII'/'Text'</b> mode). It replaces the line-break symbols that are different for Unix and Windows systems whereas all the other text is left the same. These changes are not visible, but X-Cart checks files checksum and the values appear different from the expected ones. In order to solve the problem you should set your FTP client in the <b>'Binary'</b> mode and re-upload the upgrade package files on the server. | Secondly, when you use FTP for uploading text files on the server it may alter your files (if it's in <b>'ASCII'/'Text'</b> mode). It replaces the line-break symbols that are different for Unix and Windows systems whereas all the other text is left the same. These changes are not visible, but X-Cart checks files checksum and the values appear different from the expected ones. In order to solve the problem you should set your FTP client in the <b>'Binary'</b> mode and re-upload the upgrade package files on the server. | ||
+ | |||
+ | === Is it possible to upgrade from LC 2.2 to X-Cart 4.4? How do I do that?=== | ||
+ | |||
+ | You can upgrade LC 2.2 to X-Cart 4.4.2. Most data will transfer, specifically: | ||
+ | |||
+ | * Categories | ||
+ | * Extra Fields | ||
+ | * Memberships | ||
+ | * Products | ||
+ | * Featured products | ||
+ | * Customer Profiles | ||
+ | * Customer Orders | ||
+ | |||
+ | However, some data cannot be transferred during the import. In this case you can export the LC db data using phpMyAdmin, and then import that db data into X-Cart using the [[X-Cart:Import-Export_Guide#Importing_Data | Import Tool]]. | ||
+ | |||
+ | All files you need are in your [https://secure.qtmsoft.com/customer.php?area=filearea&target=files_explorer File area]. | ||
+ | |||
+ | Here are the steps: | ||
+ | |||
+ | # Install 4.3.2 shop using [[Using_your_Qualiteam_Account#File_area | x-cart-4.3.2gold.tgz]]; | ||
+ | # Use [[Using_your_Qualiteam_Account#File_area | LC 2.2 -> X-cart 4.3.2 Data Transfer Utility]] to copy LC db data to 4.3.2 db's; | ||
+ | # Upgrade 4.3.2 db to 4.4.0 using [[Using_your_Qualiteam_Account#File_area | xcart_4_3_2-xcart_4_4_0_sql.tgz]]; | ||
+ | # Install 4.4.0 shop using [[Using_your_Qualiteam_Account#File_area | x-cart-4.4.0-gold.tgz]]; configure using the mysql db in #3 above; | ||
+ | # Upload and unpack [[X-Cart:Upgrade_procedure#Obtaining_in-branch_upgrade_packs | Upgrade_from_4.4.0_to_4.4.2.tgz]]; then run Patch/Upgrade in admin. | ||
==Basic usage== | ==Basic usage== |
Revision as of 10:11, 26 April 2011
Contents
- 1 Installation and configuration
- 1.1 Where do I download X-Cart?
- 1.2 How can I unpack X-Cart distribution archive in Windows?
- 1.3 How to choose a hosting for my store?
- 1.4 How do I know which version of X-Cart I use?
- 1.5 What is Installation error report?
- 1.6 How to change x-cart web-directory after installation is done?
- 1.7 How do I move my images to the file system?
- 1.8 What is Auth code and where can I find it?
- 1.9 How to change storefront skin after the installation is done ?
- 1.10 How to replace logo shown on storefront?
- 1.11 How to replace logo shown on invoices?
- 1.12 How to set company name?
- 1.13 How to change my site title appearing in the admin back-end?
- 1.14 How to change my site title appearing in the customer front-end?
- 1.15 How can I customize the look of X-Cart storefront?
- 1.16 My store says "This is a demo store powered by the X-Cart". Does this mean I am using demo version?
- 1.17 How to alter default name titles "Mr.","Mrs.","Ms."?
- 1.18 How to remove "Powered by X-Cart: shopping cart software" text?
- 1.19 How can I obtain a USPS account?
- 1.20 How to choose a payment processing service?
- 1.21 How to setup UK shipping and taxes
- 1.22 Does X-Cart support recurring billing?
- 1.23 How to setup X-Cart in PCI-DSS compliant manner?
- 1.24 What is "background" payment gateway?
- 1.25 What is "web-based" payment gateway?
- 1.26 Are there translations available for X-Cart?
- 1.27 Where do I edit my "About our site", "Terms & Conditions", "Privacy statement" pages?
- 1.28 How do I force my X-Cart to move zero total orders to "processed" instead of "queued"?
- 1.29 How do I set up my X-Cart to support UTF-8?
- 2 Licensing
- 3 Upgrading
- 4 What is diff (patch) file?
- 5 Example of diff file
- 6 General instructions
- 7 Understanding the process
- 8 Basic usage
- 9 Where now?
- 10 Troubleshooting
- 10.1 My admin account is locked/suspended. How do I unlock it?
- 10.2 How do I change or reset my admin password? (I have lost it)
- 10.3 Should I re-generate the blowfish encryption key?
- 10.4 I am not receiving emails from my X-Cart store. How do I fix that?
- 10.5 How do I test whether emails are actually sent from my website?
- 10.6 I use HTTPS in the admin area and keep getting the non-secure objects on the screen warning. Why is that?
- 10.7 I am getting "Fatal error: Out of memory..." error on my X-Cart pages. How do I resolve this issue?
Installation and configuration
Where do I download X-Cart?
Click here to download the latest release of X-Cart Gold/X-Cart Pro. More files are available in File area section of your Qualiteam account. Files are supplied in .tgz or .zip archives.
How can I unpack X-Cart distribution archive in Windows?
If you run Microsoft Windows, you can use WinZip (or WinRAR) tool to extract the files.
- If you don't have WinZIP archiver, download it from http://www.winzip.com
- Launch WinZIP and open X-Cart distributive package
- Click on the Extract button and specify your web server root directory.
See X-Cart:Installation page for help on installation.
How to choose a hosting for my store?
Please study the Choosing hosting provider article. Anyway the hosting must comply with X-Cart:Server Requirements (latest X-Cart version).
How do I know which version of X-Cart I use?
You can find out the version of your x-cart installation using one of the following links:
http://[your_site_URL]/[xcart_dir]/VERSION http://[your_site_URL]/[xcart_dir]/include/version.php
or on the 'Summary' page in the X-Cart backend.
What is Installation error report?
The report indicates that X-Cart installation may not be completed because the web-server is not configured to run X-Cart software. In most cases, you should contact the hosting support to request to change the server settings.
The report has two sections: REPORT - contains information on the errors that may or may not hinder in the installation procedure, PHP INFO - information on the PHP configuration.
You should pay attention to the first paragraph. Note what errors are reported there, critical (CRITICAL ERRORS) or noncritical (NONCRITICAL ERRORS:).
An example of the installation error report:
REPORT: ---------------------------------------------------------- X-Cart version: Version 4.1.10 -------------------------------------------------------------------------------- Report time: Sun, 29 Jun 2008 13:56:23 -0400 -------------------------------------------------------------------------------- HTTP_REFERER: https://[store_URL]/[xcart_web_dir]/install.php -------------------------------------------------------------------------------- CRITICAL ERRORS: -------------------------------------------------------------------------------- - MySQL database support is disabled. MySQL PHP extension must be enabled for correct operation of X-Cart application. [CHECK RESULT: Disabled] There are CRITICAL ERRORS: MySQL application is not installed on the web-server For now it is not possible to complete the installation until the problem is rectified. You should contact the hosting support to request help with MySQL setup. NONCRITICAL ERRORS do not stop the installation and you can complete it. However, it is recommended to fix the errors too in order to avoid any possible problems in your future store. Feel free to contact our support team for an advise.
How to change x-cart web-directory after installation is done?
1. Rename the current x-cart directory. Or if you want your cart to be shown in the root, i.e. www.example.com/home.php, you should move the x-cart files to the root folder on the server.
2. Update /config.php file (it is located in the root x-cart folder). You should alter this variable
$xcart_web_dir ="/[dir]";
where [dir] is the current x-cart folder. If you just changed the name of the folder, you should insert the new name in [dir].
If you moved the files to the root, change the string thus
$xcart_web_dir ="";
How do I move my images to the file system?
First, you should export images to /files directory of X-Cart. X-Cart requires three images' folders: for icons, for thumbnails and for detailed images. You should create individual directories inside /files for each type of images and indicate corresponding paths on the 'Images location' page in the admin zone. During import of images to file system, X-Cart will overwrite images files names to appropriate ones. For ex., "home/public_html/xcart/files/thumbnails" will be a path to thumbnails images.
Thus, to import images to the file system you should follow the following steps:
1. Create three folders inside /files dir: for ex., "icons", "thumbnails" and "detailed_images"
2. Set 777 permissions on these folders (chmod 777 [folder_name])
3. Go to 'Images location' page in the admin back end and type in the paths to the images such as
/home/public_html/xcart/files/icons /home/public_html/xcart/files/thumbnails /home/public_html/xcart/files/detailed_images
4. Choose to store images in 'file system' and click 'submit'.
What is Auth code and where can I find it?
For security reasons, we have added Auth code, an additional authentication variable, which the installation script now has to handle. When the script detects that an X-cart is already installed on the host, it does not allow to proceed with the installation until you enter a valid Auth code.
You can find your Auth code in the [xcart_dir]/config.php file:
/** * Put installation access code here * A person who does not know the auth code can not access the install.php installations script */ $installation_auth_code = '';
The Auth code is also displayed on the 'Summary' page of the Admin area.
You can modify your auth_code at your discretion by editing the [xcart_dir]/config.php file:
How to change storefront skin after the installation is done ?
- Run the installation script, i.e. open http://[your_store]/[xcart_dir]/install.php in your browser;
- Enter the Auth code, you will find it in the include/install.php file and also in the X-Cart admin zone -> on the "Summary" page;
- Choose 're-install skin' and click 'next'. You will be offered to select a desired color scheme, layout and dingbats set. Choose a skin you like.
- Complete the re-installation and check how your store looks now.
How to replace logo shown on storefront?
Logo can be changed by altering the following IMG tag located in the '/skin/common_files/customer/head.tpl' template (if using default skin):
<IMG src="{$ImagesDir}/xlogo.gif" width="244" height="67" border="0">
Remember to change width and height values with the appropriate ones. For more details please refer to Replacing X-Cart's Logo
Logo shown on invoices can be changed by altering the following IMG tag located in the '/skin/common_files/mail/html/order_invoice.tpl' template:
IMG src="{$ImagesDir}/companyname_small.gif" border="0"
You should upload the appropriate image to /skin/common_files/images' directory.
How to replace logo shown on invoices?
You should replace the logo image in the file '/skin/common_files/images/companyname_small.gif'.
Alternatively, you can edit the path to the X-Cart Invoice logo file in the template '/skin/common_files/mail/html/order_invoice.tpl'.
To do this, find this code:
<img src="{$ImagesDir}/companyname_small.gif" border="0" >
and replace it with this:
<img src="{$ImagesDir}/new_companyname_small.gif" border="0">
where new_companyname_small.gif is the name of the new logo file.
You should have the new logo file uploaded to the '/skin/common_files/images' directory prior to editing the code. Once you have done that, you can edit the image tag the way you need (change file name, adjust image width, image height, etc).
How to set company name?
Refer to X-Cart:Company Options#Company details
Your company name can be set in 'lbl_site_title' language variable.
- Log in to the admin area
- Go to the "Languages" section
- Select a language in the "Edit language" selectbox.
- Select a topic: Labels. ("text" for :txt_, "Errors" for err_)
- Find the 'lbl_site_title' variable and edit its value in the memo. Alternatively you can just leave the field blank. In this case the company name will be the same as it is in the copyright notice.
- Click the "Apply changes" button.
Concerning the company name in the e-mail invoices, it is set via your Admin zone->Administration tab->General settings->Company options->Company name field.
How to change my site title appearing in the admin back-end?
- Go to the "Languages" section.
- Select a language in the "Edit language" select box.
- Find the 'txt_site_title' language variable and edit its value in the memo.
- Click the Update all button.
How to change my site title appearing in the customer front-end?
1. Generally the way to build any page title of any store page is specified in the "General settings -> SEO -> Page title format".
2. If the "Default site 'Title' tag" option is specified in the "General settings -> SEO" section, this value is used as a page title for all the store pages. The "Page title format" option is ignored in this case.
3. If a separate "Title tag" is specified for any of the Product, Category, Manufacturer and Static (embedded) pages, it is used as a page title for this specific page only. The "Default site 'Title' tag" option is overridden in this case.
How can I customize the look of X-Cart storefront?
Refer to X-Cart:Customizing storefront page.
My store says "This is a demo store powered by the X-Cart". Does this mean I am using demo version?
This is a standard welcome message which can be easily modified. If you open the '<xcart_dir>/skin/common_files/customer/main/welcome.tpl' template, you will see following statement there:
{$lng.txt_welcome}
When a customer visits your site, the {$lng.txt_welcome} statement is substituted with content of the 'txt_welcome' language variable, i.e. "This is a demo store...".
How to modify the 'txt_welcome' language variable:
- Log in to the admin area
- Go to the "Languages" section
- Select a language in the "Edit language" selectbox.
- Select a topic: Text. (‘text’ for :txt_, ‘Errors’ for err_)
- Enter 'txt_welcome' in the 'Apply Filter' field to find the variable and edit its value in the memo field.
- Click the Update all button.
Also, if you start the "Webmaster mode", you will be able to edit language variables in an easier way: all you will need is to click the text and edit it. Refer to the manual to learn more about the ‘Webmaster mode’ feature.
How to alter default name titles "Mr.","Mrs.","Ms."?
In X-Cart v4.1.x and later this can be done using 'Administration'-> 'Titles' section in admin back-end.
In previous X-Cart versions, you have to edit '/config.php' file altering the following string:
$name_titles = array("Mr.","Mrs.","Ms.");
How to remove "Powered by X-Cart: shopping cart software" text?
Edit skin/common_files/main/prnotice.tpl template.
How can I obtain a USPS account?
Visit the site http://www.uspswebtools.com and register for USPS Web Tools (click on the ‘Sign up for USPS Web Toos’ link and fill in the registration form). You will receive an e-mail with Username and Password. Follow the instructions provided there. Get in touch with Internet Customer Care Center and ask to switch on your profile to allow you to access the Production Server and to provide you with the production URL (Only the URL without ShippingAPI.dll file, i.e. "production.shippingapis.com").
Enter this URL, username and password into the appropriate fields in the USPS account details subsection of the ‘Shipping options’ page (accessible via ‘General settings’ in the admin area).
How to choose a payment processing service?
The guidelines are available in the Choosing payment gateway article.
How to setup UK shipping and taxes
When you are installing X-Cart by running the installation wizard script, you should select option "United Kingdom" in dropdown "Configuration settings". After the installation is completed, UK-specific configuration will be imported into your store database.
To setup UK shipping and tax on a working X-Cart, you can apply an SQL patch from xcart_web_dir/sql folder - xcart_conf_UK.sql file. Download this file to your machine and install it via the X-Cart admin zone, "Patch/Upgrade" section, "Apply SQL patch" form.
The SQL configuration patches were added in v4.0.x. If you are using one of the earlier versions of this branch and do not find the patch, you can extract it from the fresh distributive of v4.0.x.
If you need add specific UK shipping methods you can create them manually. Go to the admin backend, "Management" menu, 'Shipping methods' page and add new methods in the "Defined shipping methods" section.
Does X-Cart support recurring billing?
Beginning from version 4.4.0 X-Cart comes without X-Cart:Subscriptions module (due to limitations caused by PCI-DSS standard). To allow recurring transactions you should use an appropriate service offered by the payment gateway or by 3rd-party providers.
How to setup X-Cart in PCI-DSS compliant manner?
Please find guidelines at X-Cart:PCI-DSS.
What is "background" payment gateway?
"Background" payment gateways provide so-called "Direct (or inline) Integration" solution - this is the integration method of choice for Merchants who wish to keep their customers on their branded site and not interject a third party to handle the secure processing portion of a transaction. This method requires the Merchant to have their own SSL certificate.
Here are some "web-based" payment gateways supported in X-Cart: PayPal Website Payments Pro (Direct Payment), Authorize.net AIM, CyberSource (SOAP toolkit API), Sage Pay Direct and many more.
What is "web-based" payment gateway?
"Web-based" payment gateways provide so-called "Hosted Payment Form" solution - this is the integration method in which the payment gateway hosts a co-branded secure payment form on behalf of the Merchant. This method is generally only used by Merchants who are using a shopping cart that does not support the direct integration method. This method does not require the Merchant to have their own SSL certificate.
Here are some "web-based" payment gateways supported in X-Cart: Paypal Express Checkout, Google Checkout, WorldPay, 2Checkout, Authorize.net SIM, CyberSource (Hosted Order Page), Sage Pay Form and many more.
Are there translations available for X-Cart?
Yes, you could find some at:
- http://marketplace.x-cart.com/addons-modules/language-packs
- http://forum.x-cart.com/forumdisplay.php?f=33
Where do I edit my "About our site", "Terms & Conditions", "Privacy statement" pages?
The pages in question are embedded static pages.
The content of these pages can be edited on the 'Static pages' page in your X-Cart admin area, for example:
http://www.example.com/xcart/admin/pages.php
For more detailed information about "Static pages" feature please refer to the Static Pages section.
How do I force my X-Cart to move zero total orders to "processed" instead of "queued"?
If the order total is zero, the order is processed off-line, and its status is set to "Queued". The store administrator is supposed to review and process such orders manually. This is how default X-Cart works.
However, if you want such orders to be processed automatically, you should modify the script "<xcart_dir>/payment/payment_offline.php", add the following code:
if ($cart["total_cost"] == 0) func_change_order_status($orderids, "P");
before this one:
$_orderids = func_get_urlencoded_orderids ($orderids);
As result of the modification, all zero total orders will be automatically processed by the system.
How do I set up my X-Cart to support UTF-8?
X-Cart out of the box does not support UTF-8 character encoding. However, you can alter your X-Cart database to support UTF-8.
1) Convert all X-Cart tables to UTF-8. To do this you need to implement the following MySQL query:
ALTER TABLE %xcart-table% CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
where %xcart-table% should be replaced with the name of the table from the X-Cart database. You need to implement this query for all of the X-Cart tables. The list of the tables can be found by execution of the following query:
SHOW TABLES;
2) Set your X-Cart database's collation to UTF-8. To do this you need to implement the following MySQL query:
ALTER DATABASE %xcart_database% COLLATE utf8_general_ci;
where %xcart_database% should be replaced with the name of your store database.
3) Modify include/func/func.db.php file - find the following lines:
} return $sql_connection; }
and replace with these ones:
} else { mysql_query("SET CHARACTER SET utf8"); } return $sql_connection; }
ADDON: Script to set all X-Cart tables to work with UTF-8 (it must be located in <xcart_dir>/admin folder):
<?php /* vim: set ts=4 sw=4 sts=4 et: */ require './auth.php'; require $xcart_dir.'/include/security.php'; foreach ($sql_tbl as $k => $v) { print_r("Converting `$v` table..."); $query = "ALTER TABLE `$v` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"; if (db_query($query)) print_r("OK!<br />"); else print_r("Failed!<br />"); } ?>
Licensing
What is the one-license-one-store rule ?
This means that you are permitted to use one instance (a single installation) of the X-Cart software on one web server and one website only; in the event You intend to use the Software or any part thereof on more than one website, the license for each such multiple use must be obtained.
Examples explaining the one-license-one-store rule:
- If your store is accessible from multiple domains but the content is the same for each link, this is OK and does not require multiple licenses.
- If your store is accessible from multiple domains but each domain shows a different storefront skin style, this is OK and does not require multiple licenses.
- If your multiple stores are located at sub-domains or in sub-directories of the same domain, the license for each store is required.
- If your store is accessible from multiple domains and your store is customized to show/hide/alter certain part of content based on the domain, the license for each domain is required. In this situation the stores appear to have separate content thereby making them separate stores in the eyes of the license agreement. The content needs to be the same for each domain in order to qualify as a single store.
How to transfer the license to another party?
X-Cart License agreement allows you to transfer your license to another party. Read how to submit a request to transfer your license.
How to obtain an additional license?
You can purchase an additional license in Buy products/services section of your X-Cart Account:
- click on a necessary product link (X-Cart Gold/X-Cart Pro/LiteCommerce 2.1) - choose add-ons/services, that may be ordered in addition; - click "Continue" button and follow the ordering dialogue.
My store was moved to another domain. Is there anything that I must do pertaining to licensing?
You should change the license URL in your X-Cart Account.
- go to 'My licenses' section;
- click 'Change URL' link located next to the license;
- you will be redirected to the "Change license URL" tab: enter the new license URL in the corresponding field there and tick "I understand that I have to remove the software from old_url within 48 hours after the license is reissued" checkbox;
- hit 'Change URL' button.
When the records are updated you will be notified by a message (in one business day maximum).
Upgrading
How to upgrade my store?
Common instructions on the upgrading process can be found at X-Cart:Upgrading page.
How to install patches?
Diff file (or a patch) is a file 'describing' changes which needs to be applied to the file. In UNIX world diff files are a standard way to apply changes/fixes to a program source code. There is a special program called 'patch' which reads diff files and applies the changes to the source code. In everyday use diff files are frequently called 'patches' which may sometimes cause confusion.
We suggest three methods for patch installation.
1) Automatic installation via X-Cart admin.
- Save the text of the patch as a file.
- Log in to the admin area and go to the 'Patch/Upgrade' section.
- In section 'Apply patch', select your file by clicking on 'Browse' button. Click 'Apply'.
For more details please refer to Applying Patches via X-Cart Admin area.
2) Running 'patch' command.
- Save the text of your patch to a file (e.g. patch.diff).
- Copy this file (patch.diff) to the directory where X-Cart is installed.
- Issue the command 'patch -c < patch.diff' to check the patch applicability.
- If there are no errors during the check-up, apply the patch by issuing the command 'patch < patch.diff'.
You can read more about 'patch' command in the manual (man patch, info patch).
If a patch application failed in the first two ways (this may be caused by redundant spaces or conversion problems) you can try to apply the patch manually, as described below.
3) Incorporate the changes manually right in the source code.
What is diff (patch) file?
Diff (or patch) is a file that displays the changes made per line for text files, and in particular, for X-Cart source files.
Diff can include changes for several files. The name of each modified file is specified under a header line that may look something like this:
Index: include/func/func.category.php
The above header line indicates that the diff displays the changes for <xcart_dir>/include/func/func.category.php file.
Each header line is then followed with one or several "hunks". Each "hunk" starts with a line that may look something like this:
@@ -942,8 +940,7 @@
where:
- 942 - indicates the number of the first line in the original code (before patch application)
- 8 - indicates the number of lines in the original code (before patch application)
- 940 - indicates the number of the first line in the changed code (after patch application)
- 7 - indicates the number of lines in the changed code (after patch application)
Then follows the file code that includes lines marked with the "+" and "-" signs.
Lines marked with "+" are the lines that you need to add in the file to be patched.
Lines marked with "-" are the lines that you need to remove from the file to be patched.
Example of diff file
Index: include/func/func.category.php @@ -585,9 +585,7 @@ $cat = abs(intval($cat)); - $to_search = - $search_condition = - $join_tbl = array(); + $to_search = $search_condition = $join_tbl = array(); $from = "$sql_tbl[categories] AS node "; @@ -942,8 +940,7 @@ 'c.rpos' ); - $search_condition = - $join_tbl = array(); + $search_condition = $join_tbl = array(); if ($current_area == 'A' || $current_area == 'P') {
General instructions
1. Open the diff file in a text editor.
2. Edit the file (in our example, include/func/func.category.php):
- Find the lines marked with "-" in the text of the patch and remove them.
- Insert the lines marked with "+" in the text of the patch.
In our example, the original code (before applying the patch) would look like:
line 585: line 586: $cat = abs(intval($cat)); line 587: line 588: $to_search = line 589: $search_condition = line 590: $join_tbl = array(); line 591: line 593: $from = "$sql_tbl[categories] AS node "; line 594: ... line 942: 'c.rpos' line 943: ); line 944: line 945: $search_condition = line 946: $join_tbl = array(); line 947: line 948: if ($current_area == 'A' || $current_area == 'P') { line 949:
Total lines: 9 and 8 in each hunk correspondingly.
The changed code (after applying the patch) would look like:
line 585: line 586: $cat = abs(intval($cat)); line 587: line 588: $to_search = $search_condition = $join_tbl = array(); line 589: line 590: $from = "$sql_tbl[categories] AS node "; line 591: ... line 940: 'c.rpos' line 941: ); line 942: line 943: $search_condition = $join_tbl = array(); line 944: line 945: if ($current_area == 'A' || $current_area == 'P') { line 946:
Total lines: 7 and 7 in each hunk correspondingly.
Understanding the process
In simple words, the patch application procedure for each hunk is as follows:
- Search for the code to be replaced around (above and below) the expected line.
- If found, change it to the new code.
Let us take another look at the second hunk of the example patch provided above to understand the process:
@@ -942,8 +940,7 @@ 'c.rpos' ); - $search_condition = - $join_tbl = array(); + $search_condition = $join_tbl = array(); if ($current_area == 'A' || $current_area == 'P') {
- Original code to search for (8 lines of code around the line 942):
'c.rpos' ); $search_condition = $join_tbl = array(); if ($current_area == 'A' || $current_area == 'P') {
- New code to change to (7 lines of code):
'c.rpos' ); $search_condition = $join_tbl = array(); if ($current_area == 'A' || $current_area == 'P') {
The built-in patch/upgrade utility basically works in the same way.
If you cannot apply the patch in these ways it means the file that needs to be patched has been modified or this file is from another version of X-Cart and cannot be patched by this patch. Ask technical support to help you.
There are upgrade patches in my file area, what are they for and how can I use them?
Starting with v3.2.0 a special upgrade engine, allowing upgrading to a newer version, was implemented in X-Cart. Detailed instructions on how to perform upgrades come in the upgrade packages in UPGRADE.readme files.
Upgrade patches are a set of files which describe differences in code between old and new versions. All the changes are represented in standard diff format (UNIX unified diff format). Diff files contains structured data indicating what pieces of code are to be added/replaced/deleted: a sample of old code and a new code to insert instead. You will find more information about diff file at http://www.gnu.org/manual/diffutils-2.8/html_chapter/diff_toc.html
The main advantage of this approach is that diff patch technique allows upgrading even customized versions of X-Cart: X-Cart upgrade engine follows the list of files from the file file.lst and tries to patch them. Then database upgrade is fulfilled. If the code is not changed the upgrade will be successfully completed. However, since X-cart is highly customizable product most of X-cart users are certain to modify its code and templates to meet their needs. Here might come difficulties. If a piece of the code to be patched was customized (altered), the patch engine won't patch it and the upgrade script may fail. You will be notified about it by the system. So if you have ever changed X-Cart code you should be prepared to resolve the conflicts manually.
X-cart patch engine creates a log file that reflects a progress of the patching process - templates_c/upgrade/patch.log. The failed hunks are stored in reject files filename.ext.rej. Using this information you can figure out what parts of code haven't been patched in order to patch them manually afterwards.
For more information on the upgrade procedure and the instructions, refer to the manual included into the upgrade archive.
Why I'm getting checksum errors during upgrade?
Firstly, if you use WinZip to extract files from the upgrade/distribution kit, you need to change the default configuration in the following way: Click Options, Configuration, select the Miscellaneous tab and remove the tick from 'TAR file smart CR/LF conversion'. After that unpack the files from the archive once again and re-upload the files to your server.
Secondly, when you use FTP for uploading text files on the server it may alter your files (if it's in 'ASCII'/'Text' mode). It replaces the line-break symbols that are different for Unix and Windows systems whereas all the other text is left the same. These changes are not visible, but X-Cart checks files checksum and the values appear different from the expected ones. In order to solve the problem you should set your FTP client in the 'Binary' mode and re-upload the upgrade package files on the server.
Is it possible to upgrade from LC 2.2 to X-Cart 4.4? How do I do that?
You can upgrade LC 2.2 to X-Cart 4.4.2. Most data will transfer, specifically:
- Categories
- Extra Fields
- Memberships
- Products
- Featured products
- Customer Profiles
- Customer Orders
However, some data cannot be transferred during the import. In this case you can export the LC db data using phpMyAdmin, and then import that db data into X-Cart using the Import Tool.
All files you need are in your File area.
Here are the steps:
- Install 4.3.2 shop using x-cart-4.3.2gold.tgz;
- Use LC 2.2 -> X-cart 4.3.2 Data Transfer Utility to copy LC db data to 4.3.2 db's;
- Upgrade 4.3.2 db to 4.4.0 using xcart_4_3_2-xcart_4_4_0_sql.tgz;
- Install 4.4.0 shop using x-cart-4.4.0-gold.tgz; configure using the mysql db in #3 above;
- Upload and unpack Upgrade_from_4.4.0_to_4.4.2.tgz; then run Patch/Upgrade in admin.
Basic usage
How to edit multiple products at once?
You may want to use 'Search-and-modify' feature: - open 'modify product' page; - check 'Select-and-modify' check-box and make a search for products; - in the 'product details' section, tick boxes near necessary settings, change the values and save.
As a result the change will be applied to all the found products at once.
How to turn off display of featured products list?
You should modify the '/customer/main/welcome.tpl' file. Comment out this part of the code:
{include file="customer/main/featured.tpl" f_products=$f_products}
i.e. change it to
{* include file="customer/main/featured.tpl" f_products=$f_products *}
This will hide the 'Featured products' section.
How to work with 'webmaster mode'?
Webmaster mode allows you to edit templates within the admin interface. You may edit language variables (denoted as "$lng.XXX" in templates) by changing those values in WYSIWYG mode.
1) Before entering the webmaster mode, close any template windows & label windows. Enter your admin zone, go to the 'Administration' menu, 'Webmaster mode' page. Click on 'Start webmaster mode' button.
2) The additional "templates" window will appear. It displays the list of templates composing a current page. You can call the template editor from this window by clicking a template.
3) Go to the page you want to change. To define the right template, look at the browser status line (at the page bottom). When the mouse is pointing at some text, this status line indicates the corresponding template and label.
4) To change a label, click on it. If the label is under a hyperlink, move the mouse over it and press "e" (Edit) on the keyboard. The label dialog will appear.
5) After you set a new label content you can
- (a) preview the site with the changed label,
- (b) save the text in the database, and
- (c) copy the label name into the clipboard (IE only).
6) The webmaster mode is based on sessions: it applies only to the computer it has been set up on. I.e., when the 'Webmaster mode' is launched, it isn't displayed at the customer's end and doesn't affect the store performance. The changes will show up only after the admin clicks on 'save' button.
7) To quit the webmaster mode, go to admin zone, to the 'Administration' menu, 'Webmaster mode' page. Click on "Quit webmaster mode" button.
For additional information about Webmaster mode please refer to this article.
How to mark up all our product prices at once?
You can use the below SQL query to mark up all the product prices, let's say 20%:
UPDATE xcart_pricing SET price=price*1.2;
The query can be applied on "Patch/Upgrade" page in X-Cart admin back-end:
http://help.qtmsoft.com/index.php?title=X-Cart:Applying_Patches#Applying_SQL_Patches
After the patch is applied, please force (re)generation of cache files and quick tables via the 'Summary/Tools' section of your store's Admin area.
Where now?
We welcome any kind of feedback (positive or negative) about our product as valuable information that can help us to improve it.
We welcome you to share your X-Cart experience with other people on the following web-sites:
Please answer the following questions in your review of X-Cart:
- What was your 1st impression of X-Cart?
- What was your impression of X-Cart after you passed the learning curve?
- Is it making your life/profession easier or harder somehow?
- What do you value most about X-Cart?
- What do you dislike most about X-Cart?
- If your web-site is live now can you say that X-Cart helps you to increase your sales?
I'm experiencing problems. Where can I find a solution?
- try to search this website for the solution.
- try to search QT bugtracker for the solution.
- see the section below for information on how to contact Qualiteam engineers and other knowledgeable users.
I've found a bug or have a feature request. Where do I post it?
- Bugs should be posted on http://bugtracker.qtmsoft.com (the instructions on usage can be found at Using bugtracker.qtmsoft.com page)
- Feature requests should be posted on http://ideas.x-cart.com
If possible please search the database prior to posting, to avoid creating duplicate entries.
See also:
I have a question not answered here. Where do I ask for help?
- Post a message at http://forum.x-cart.com (you must have a Qualiteam account to do that)
- Submit a ticket to the Helpdesk under your X-Cart Account
Troubleshooting
My admin account is locked/suspended. How do I unlock it?
When your account is locked/suspended, you will get the following error message when trying to log in:
Your account is temporarily disabled. Please contact the store administrator for details.
To unlock your admin account - open your phpMyAdmin (provided by your hosting company), then click the "SQL" tab and run this query:
UPDATE xcart_customers SET status='Y', invalid_login_attempts=0 WHERE login='master';
where 'master' is your admin account login or email.
See also: X-Cart Security Options.
If you find it difficult to do it yourself - feel free to contact our support team for assistance via your personal Helpdesk.
How do I change or reset my admin password? (I have lost it)
1. If you can log in to your X-Cart admin area using another account, please do so and reset/modify the other admin password as needed.
2. If you cannot remember your admin password, there's still hope.
The first thing you can try is to click on the "Forgot password?" link on the admin area home page; for example:
http://www.example.com/xcart/admin/home.php
or just go straight to the Password Recovery page; for example:
http://www.example.com/xcart/admin/help.php?section=Password_Recovery
Enter the admin username and email address and then submit the form. Your account information will be emailed to you shortly.
3. If for some reason that doesn't work either, you can create a temporary admin account for the purpose of logging in.
Open your phpMyAdmin (provided by your hosting company), then click the "SQL" tab and run this query:
X-Cart Gold edition
DELETE FROM xcart_customers WHERE login = 'mytempadmin';
INSERT INTO xcart_customers (login, password, usertype)
VALUES ('mytempadmin', 'mytempadmin', 'P');
X-Cart Pro edition
DELETE FROM xcart_customers WHERE login = 'mytempadmin';
INSERT INTO xcart_customers (login, password, usertype)
VALUES ('mytempadmin', 'mytempadmin', 'A');
You should now be able to log in using these credentials:
- Username: mytempadmin
- Password: mytempadmin
Once you have logged in, make sure to delete this temporary admin account and reset/modify the other admin password as needed.
If you find it difficult to do it yourself - feel free to contact our support team for assistance via your personal Helpdesk.
Should I re-generate the blowfish encryption key?
The respective message in your X-Cart Admin area only advises you to re-generate the key. This is not a mandatory, yet a highly recommended operation, just as changing the login and password that you use for accessing your X-Cart Admin area, FTP, SSH, etc., which you are recommended to change every once in a while. Here is how to re-generate your blowfish encryption key.
I am not receiving emails from my X-Cart store. How do I fix that?
Some spam prevention filters may block an email message if the domain part of the email address in the From header does not match the domain the message was sent from.
Generally, when a customer uses the "Contact us", "Send to a friend" and "Ask a question about this product" forms, the customer's email address (for example customer@gmail.com) is placed in the 'From' header of the message being sent. The same happens when a customer submits an order at your X-Cart based store and cart sends the order notification emails to the Orders department email address.
In the above cases, the domain part of the email address in the 'From' header does not match your website's domain name (for example, yourwebsitedomain.com), so the email message may be blocked by the spam filters.
To solve the problem, try enabling the 'Company "From" email' option.
Additionally, you can try setting up SMTP options, so that all the emails that originate at your store would be sent through the SMTP server.
See also:
How do I test whether emails are actually sent from my website?
1. Download the file File:Test mail.php.txt, save the downloaded file as 'test_mail.php'.
2. Upload test_mail.php to your web server's document root.
3. Send a test email message by following this URL:
where:
- sender@mail.com - the email address your test email should be sent from
- recepient@mail.com - the email address your test email should be sent to
4. You can also use an additional 'mode' parameter in the test script URL; for example:
- http://yourwebsite.com/test_mail.php?from=sender@mail.com&to=recepient@mail.com&mode=simple
- http://yourwebsite.com/test_mail.php?from=sender@mail.com&to=recepient@mail.com&mode=fkey
where:
- mode=simple - when specified, the test message will be sent without any additional headers (like From, Reply-To and X-Mailer)
- mode=fkey - when specified, the test message will be sent with the '-fsender@mail.com' additional parameter
- if the 'mode' parameter is not specified, the test message will be sent with additional headers (From, Reply-To and X-Mailer).
See also: mail() function.
I use HTTPS in the admin area and keep getting the non-secure objects on the screen warning. Why is that?
X-Cart uses a free Google Maps API which can be accessed only over a non-secure (HTTP) connection. Thus, if you are viewing the order page in the admin back over a secure (HTTPS) connection, the browser may pop up a warning about non-secure objects on the screen.
Google Maps API HTTP services is available over a secure (HTTPS) connection to Google Maps API Premier customers.
For more info please refer to Google's FAQ:
Possible solution: disable the warning message in the browser:
I am getting "Fatal error: Out of memory..." error on my X-Cart pages. How do I resolve this issue?
Firstly, make sure the 'memory_limit' setting in your php.ini configuration file meets the X-Cart Server Requirements. The required value for X-Cart 4.4 is 32M or higher. Try to increase the memory limit until the error disappears.
Secondly, check if there is a memory limit defined in your Apache configuration. Try to increase the memory limit until the error disappears.
Feel free to contact your hosting provider to make the necessary changes, or contact our support team for assistance.