kekec Posted August 24, 2010 Share Posted August 24, 2010 hello I have question about indexing for 'ps_search_index', I need to index all categories of product not only default category which is selected.how can i solve this problem?Prestashop Version 1.2.5.0 Link to comment Share on other sites More sharing options...
kekec Posted August 25, 2010 Author Share Posted August 25, 2010 i solved my problem (realize my idea).in classes/search.php i change query in function indexation with this one: $products = $db->ExecuteS(' SELECT p.id_product, pl.id_lang, pl.name as pname, p.reference, p.ean13, pl.description_short, pl.description, cl.name as cname, m.name as mname FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'product_lang pl ON p.id_product = pl.id_product LEFT JOIN '._DB_PREFIX_.'category_product cp ON cp.id_product = p.id_product LEFT JOIN '._DB_PREFIX_.'category_lang cl ON cl.id_category = cp.id_category LEFT JOIN '._DB_PREFIX_.'manufacturer m ON m.id_manufacturer = p.id_manufacturer WHERE p.indexed = 0', false); it work's for my needs. Link to comment Share on other sites More sharing options...
kekec Posted August 25, 2010 Author Share Posted August 25, 2010 i solved my problem (realize my idea).in classes/search.php i change query in function indexation with this one:$products = $db->ExecuteS(' SELECT p.id_product, pl.id_lang, pl.name as pname, p.reference, p.ean13, pl.description_short, pl.description, cl.name as cname, m.name as mname FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'product_lang pl ON p.id_product = pl.id_product LEFT JOIN '._DB_PREFIX_.'category_product cp ON cp.id_product = p.id_product LEFT JOIN '._DB_PREFIX_.'category_lang cl ON cl.id_category = cp.id_category LEFT JOIN '._DB_PREFIX_.'manufacturer m ON m.id_manufacturer = p.id_manufacturer WHERE p.indexed = 0', false); then in prestashop administration->perferences -> search :: clik ->Add missing products to index :: clik ->Re-build entire index.and i don' use ajax search.it work's for my needs. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now