Searchanise Manual Upgrade Guide

Good day,





The latest Searchanise version is included in CS-Cart 2.2.5, so Searchanise is upgraded automatically when you upgrade your CS-Cart installation.



However, it is possible to upgrade Searchanise in CS-Cart 2.2.4 to the latest version individually, without having to upgrade the whole CS-Cart installation.



In order to manually upgrade Searchanise add-on in CS-Cart 2.2.4 to the latest version you should go through the following steps:[list=1]

[]Uninstall Searchanise via the admin panel (Administration → Add-ons)

[
]Remove the folder 'addons/searchanise' from your store installation root directory

[]Download the installation archive and extract the folder 'searchanise' into the folder 'addons' in you store installation root directory

[
]Repeat steps 2 and 3 for the folders '/var/skins_repository/base/customer/addons/searchanise' and '/var/skins_repository/base/admin/addons/searchanise'

[]Open the file 'core/fn.catalog.php' in a text editor and make the following modifications:



Replace the lines:



default_params = array (
'get_icon' => false,
'get_detailed' => false,
'get_options' => true,
'get_discounts' => true,
'get_features' => false,
'get_extra' => false,
'get_for_one_product' => (!is_array(reset($products)))? true : false,
);


with:



$default_params = array (
'get_icon' => false,
'get_detailed' => false,
'get_options' => true,
'get_discounts' => true,
'get_features' => false,
'get_extra' => false,
'get_taxed_prices' => true,
'get_for_one_product' => (!is_array(reset($products)))? true : false,
);


Replace the lines:



if (AREA != 'A' && Registry::get('settings.Appearance.show_prices_taxed_clean') == 'Y' && $auth['tax_exempt'] != 'Y') {
fn_get_taxed_and_clean_prices($product, $auth);
}


with:



if ($params['get_taxed_prices'] == true && AREA != 'A' && Registry::get('settings.Appearance.show_prices_taxed_clean') == 'Y' && $auth['tax_exempt'] != 'Y') {
fn_get_taxed_and_clean_prices($product, $auth);
}


Replace the lines:



if (!empty($params['filter_id'])) {
$condition .= db_quote(" AND ?:product_filters.filter_id = ?i", $params['filter_id']);
}


with:



if (!empty($params['filter_id'])) {
$condition .= db_quote(" AND ?:product_filters.filter_id IN (?n)", (array)$params['filter_id']);
}


[
]Open the file 'class.templater.php' and replace the following line:



if (strpos($params['smarty_include_tpl_file'], 'addons/') === 0) {



with:



if (empty($params['smarty_include_vars']['skip_addon_check']) && strpos($params['smarty_include_tpl_file'], 'addons/') === 0) {

[]Open the file '/controllers/admin/addons.php' in a text editor and make the following modifications:



Add:



$section_opts[$section_name]['hidden'] = isset($section['hidden']);



after the lines:



$section_name = isset($section['name']) ? (string)$section['name'] : 'general';
$section_opts[$section_name]['separate'] = isset($section['separate']);


Add:



$fields[$section_name][$id]['skip_addon_check'] = (boolean)$item->skip_addon_check;



after the line:



$fields[$section_name][$id]['template'] = (string)$item->template;

[
]Open the file '/skins/basic/admin/views/addons/update.tpl' in a text editor and make the following modifications:



Replace the following line:



  • {$lang.$section}


  • with:



  • {$lang.$section}


  • Replace the following line:



    {include file="addons/`$smarty.request.addon`/settings/`$data.template`"}


    with:



    {include file="addons/`$smarty.request.addon`/settings/`$data.template`" skip_addon_check=$data.skip_addon_check}


    []To go the admin panel and install Searchanise (Administration → Add-ons)

    [
    ]Enter the add-on settings by clicking on the add-on title and click Connect to Searchanise. Wait until the synchronization process is complete (this may take a while)

    [/list]

    Switch to the customer area and check if the service works correctly. Enter several symbols in the search field to check the search suggestion functionality.



    [size=4][size=5]Troubleshooting[/size][/size]



    In case the search suggestion widget does not work correctly check whether the search input field has the correct id: “snize-input”. If it does not have this id, edit the skin template and assign it manually. This may will be needed in case of a custom skin being used.

    Hy,



    i've tried this update today and at the 10'th step it does not load completly, i've waited about 1 hour for about 300 products.

    Firebug says: “private_key is not defined”



    Any ideas?

    sorry for the post above, after about 3 instals and unintals and after i'ved deleted the cache it worked… thanks

    ignore.com