You can run a cron job to do a full re-index. To do so, follow these steps:
- Create the
app/addons/searchanise_enhancements/addon.xml
file and fill it with the following code:<?xml version="1.0"?> <addon scheme="3.0"> <id>searchanise_enhancements</id> <version>1.0.1</version> <priority>5000</priority> <position>10</position> <status>active</status> <has_icon>Y</has_icon> <supplier>Searchanise</supplier> <default_language>en</default_language> </addon>
- Copy the
design/backend/media/images/addons/searchanise/icon.png
file and paste it into thedesign/backend/media/images/addons/searchanise_enhancements/
folder; - Create the
var/langs/en/addons/searchanise_enhancements.po
file and fill it with the following code:msgid "" msgstr "Project-Id-Version: tygh\\n" "Content-Type: text/plain; charset=UTF-8\\n" "Language-Team: English\\n" "Language: en_US" msgctxt "Addons::name::searchanise_enhancements" msgid "Searchanise enhancements" msgstr "Searchanise enhancements" msgctxt "Addons::description::searchanise_enhancements" msgid "Provides enhancements from Searchanise team" msgstr "Provides enhancements from Searchanise team"
- Go to the Add-ons > Manage add-ons menu in the CS-Cart admin panel and install the Searchanise Enhancements add-on;
- After the Searchanise Enhancements add-on is installed, create the
app/addons/searchanise_enhancements/controllers/frontend/searchanise.post.php
file and fill it with the following code:<?php /*************************************************************************** * * * (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev * * * * This is commercial software, only users who have purchased a valid * * license and accept to the terms of the License Agreement can install * * and use this program. * * * **************************************************************************** * PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE * * "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. * ****************************************************************************/ defined('BOOTSTRAP') or die('Access denied'); if ($mode == 'async' && !empty($_REQUEST['parent_private_key']) && $_REQUEST['parent_private_key'] === fn_se_get_parent_private_key($_REQUEST['company_id'], DEFAULT_LANGUAGE) && !empty($_REQUEST['full_reimport']) && $_REQUEST['full_reimport'] === 'Y' ) { fn_se_queue_import(NULL, NULL, true); }
- After all previous steps are finished, you can set up cron that will initiate the Searchanise indexation using the following command:
/usr/bin/php %PATH_TO_CS_CART_ROOT_DIR%/index.php --dispatch=searchanise.async --full_reimport=Y --ignore_processing=Y
Please make sure to replace %PATH_TO_CS_CART_ROOT_DIR% with the actual path to the CS-Cart root directory.