Jump to content

Index Rebuild from database flag


Recommended Posts

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

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 by Guest (see edit history)
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...