- 1 Overview
- 2 Generate Clean URL Values
- 3 Remove Credit Card Information
- 4 Change user authentication mode
- 5 Optimize Tables
- 6 Check Database Integrity
- 7 Force Cache Generation
- 8 Rebuild category indexes
- 9 Clear Statistics
- 10 Clear Templates/X-Cart Cache
- 11 Remove Temporary Files
- 12 Re-generate the Image Cache
- 13 Re-generate the Blowfish Encryption Key
- 14 Remove Data
X-Cart provides tools that allow you to perform a variety of advanced tasks:
- Generate clean URL values for the object that do not have clean URL values defined.
- Remove credit card information from processed and completed orders.
- Optimize database tables to increase your store's overall performance.
- Check database integrity.
- Force (re)generation of cache files and quick tables.
- Clear statistics.
- Clear templates/X-Cart cache.
- Remove temporary files.
- Re-generate cache for resized images.
- Re-generate Blowfish encryption key.
- Remove unnecessary store data.
These tools are available in the 'Maintenance' section of your store's Admin area, which can be accessed via the 'Tools' menu.
Generate Clean URL Values
This tool automatically generates clean URL values for the products, categories, manufacturers and static pages that do not have clean URL values defined. This tool is available only when the option 'Enable Clean URLs' in the 'General settings/SEO options' section is enabled.
To generate clean URL values using this tool, do the following:
1. Specify the types of objects for which you wish clean URL values to be generated by selecting the respective check boxes:
2. Click the Submit button.
When you click Submit, X-Cart generates URL values for all the objects of the selected type(s) that do not have clean URL values defined. A message is displayed confirming that the clean URL values have been generated successfully.
Remove Credit Card Information
This tool is intended for the removal of credit card information from the store's database. Note that since version 4.5.0 X-Cart does not store credit card information to enable PCI DSS compliance. In X-Cart versions 4.5.0 and later the 'Remove credit card information' tool is preserved to enable those X-Cart store owners who upgraded from earlier X-Cart versions that used to keep CC data in order details (xcart_orders table => details field) to strip out all credit card info from their database in order to meet PCI DSS requirements.
To use the 'Remove credit card information' tool, select the necessary options and click the Apply button:
Note that the option "Remove from customers' profiles" has been removed since X-Cart version 4.5.0; the option "Save the last 4 digits of credit card numbers in order details" is to be removed in X-Cart 4.5.x.
Be careful when removing credit card information as this operation is irreversible.
Change user authentication mode
This tool allows you to switch your store's authentication mode. Two authentication modes are available:
- 'Email as login': In this mode, registered users log in using the email address specified at the time of registration of their user profile.
- 'Username as login': In this mode, registered users log in using a unique user name that differs from their email address. The user name is defined during user profile registration and, depending on the 'Allow users to change their usernames' setting in 'General settings/General', may or may not be changed by the user at a later time.
This tool allows you to optimize the structure of data stored in your MySQL database by reindexing the database tables. It is the right tool to use after any UPDATE, INSERT or DELETE activity performed bypassing X-Cart interface which you think might cause your indexes to become less well organized. Data and indexes becoming fragmented not only result in inefficient use of space, but cause SELECT queries used for data retrieval take longer to complete, which considerably slows down your shopping cart application. Table optimization should help you improve the overall performance of your store.
Check Database Integrity
This tool allows you to improve the consistency and quality of data structures in your store's MySQL database. The database used by your store is designed in such a way that your data is stored there in multiple tables. The way X-Cart shopping cart application works requires that in some cases the data from two or more tables should be combined. In such cases MySQL binds the data together across tables. For example, product titles are stored in one table, product prices - in another one; as each product in the store is supposed to have a price, MySQL associates each of the product title fields in the former table with a price field in the latter. If, while making alterations to your database tables, you fail to consistently change all the related data (for example, if you add a new product, but fail to add a price for that product), MySQL will not be able to join the respective tables and perform the selection of data from them properly. Performing a database integrity check with X-Cart's 'Check database integrity' tool allows you to ensure that all the tables required for the store's operation are present in the MySQL database used by the store and helps you to detect any flaws and inconsistencies that may appear as a result of alterations to the database design caused by maintenance or new inclusions to the database structures performed bypassing X-Cart interface.
Force Cache Generation
This tool allows you to force (re)generation of cache files and quick tables. In situations where X-Cart needs the same data set to be retrieved relatively often, you can have this data set cached (saved in a cache file or a quick table) so that X-Cart can receive it from there rather than by having MySQL select the necessary data by running the same queries on the same data set each time. Sparing MySQL the necessity of running through the data over and over, cache files and quick tables considerably reduce the load on your MySQL server.
This functionality is most useful after an import procedure, or after the store administrator has modified the database or some files manually, or you suspect that some data may have been calculated incorrectly due to an interrupted procedure.
Rebuild category indexes
This tool allows you to re-build category indexes, e.g. when you manually make any adjustments to categories on a MySQL level, using the utility outside the X-Cart back-end (e.g mysql terminal, or 3rd party data feed etc).
This tool allows you to clear some or all of the types of statistical data gathered by your store since the store installation or the last statistics clearing, whichever is the later. Clearing your store statistics permanently removes the respective data from the database, so please be careful while selecting the type(s) of data to be removed.
Please be careful when clearing statistics, this operation is irreversible.
Clear Templates/X-Cart Cache
This tool allows you to remove precompiled Smarty templates ('var/templates_c' directory) and X-Cart cache ('var/cache' directory) and free some disk space.
To use this tool, click the Clear button.
Alternatively, templates/X-Cart cache can be cleared by running the "cleanup.php" script in your browser. For example, if your store's address is http://www.yoursite.com/xcart/, the command you should type in your web browser's address bar is as follows:
Starting with X-Cart version 4.5.5, to run the "cleanup.php" script you need to know your store's Auth code. For a store with the Auth code XXXXXXXX located at http://www.yoursite.com/xcart/, the command that should be used for running the "cleanup.php" script would be
Starting with X-Cart version 4.7.0 the 'Clear templates/X-Cart Cache' operation is no longer needed. The tool was removed from the Admin area. However, we kept the supports for http://www.yoursite.com/xcart/cleanup.php just in case.
Remove Temporary Files
This tool allows you to remove temporary files from the <x-cart>/var/tmp directory and free some disk space.
To use this tool, click the Clear button.
Before cleaning the directory, be sure to temporarily close the store for maintenance. Otherwise, you may hamper the processes initiated by other users, such as uploading files, using HTTPS modules to connect to payment gateways or real-time shipping rate calculators, etc.
Re-generate the Image Cache
This tool allows you to re-generate the cache of resized images (for example, for detailed product images).
To re-generated the image cache, click the Regenerate button.
Re-generate the Blowfish Encryption Key
This tool allows you to generate a new Blowfish key and replace your current Blowfish key with it.
Your current Blowfish key is stored in the file config.php. To enable X-Cart to replace the current Blowfish key with a new one, you must set write permissions on the file config.php. On Unix this can be accomplished by using the following command:
chmod 666 config.php
Before you use this tool, you must back up the config.php file and the database of your store. This is essential, because if the re-generation procedure fails, you will not be able to log in to the store, and a lot of important information will be lost, including customer data and order details.
To use the tool, click the Regenerate button. After you click Regenerate, X-Cart generates a new Blowfish key and starts re-encrypting the data encrypted with the old key using the new key (If your store also uses the Merchant key based encryption method, the data already encrypted using your store's Merchant key is not affected - it remains safely encrypted using your Merchant key). While X-Cart is performing the re-encryption of data with the new Blowfish key, you can see the progress on the screen. Please be patient and allow sufficient time for the procedure to complete.
It is also highly recommended to have the mcrypt PHP-extention installed on your server. This extension helps to speed up the Blowfish data encryption process, thus ensuring the re-encryption routine runs uninterrupted and completes successfully.
This tool allows you to empty your store of any content data with which it might have been populated for testing purposes. Clicking the button removes the settings related to products, categories, manufacturers, shipping rates etc. The tool can help you bring your X-Cart installation to a state where the store will get rid of all unnecessary data, retaining the configuration settings defining how it should function.