bsdll Posted February 16, 2021 Share Posted February 16, 2021 Is it possible to cause a product to be added to the index from the database level only? I am writing some product information directly into the database from an external source, but that information is not appearing in the search index until I run that process manually. This means after updates I then have to log in to the backoffice and rebuild indexes, but I would rather it was automatic. Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2021 Share Posted February 16, 2021 (edited) You can edit or insert the data of the ps_search _ ****** tables in the database. Edited February 16, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
bsdll Posted February 16, 2021 Author Share Posted February 16, 2021 Thanks, I was hoping not to have to duplicate the search building code in my third party app, but that might be the way to go. Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2021 Share Posted February 16, 2021 (edited) When you write directly to the product database, it is not a problem to write changes to other tables. You can create a new function (php file) in Prestashop and pass it parameters for reindexing. For inspiration, you can use the Search.php file in the ./classes folder public static function indexation($full = false, $id_product = false) Edited February 16, 2021 by Guest (see edit history) 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