Jump to content

[SOLVED] indexing all categories of product


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...