Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › New products from api are not seacrhable
- This topic has 4 replies, 2 voices, and was last updated 2 years, 4 months ago by
Henrik Leth.
-
AuthorPosts
-
January 25, 2024 at 9:59 am #46722
Henrik Leth
ParticipantHi Ernest.
I have a small problem with finding data from updated products in the Ajax Search filter.
The Webshop is integrated to the ERP system, and all changes to products come through API calls.When a new product is created from the ERP system in the Webshop, the search filter doesn’t add this product to the index. And you can’t search for this product.
If I open the product in the Webshop Admin and press update, the search engine recognizes the product and makes it searchable.So, it seems that the search engine or index doesn’t get a trigger, when a new product is created via the API.
Examples of new products, that are not searchable:
SKU 450037, SKU 449920, SKU 430589January 25, 2024 at 2:29 pm #46724Ernest Marcinko
KeymasterHi,
Thank you for the details, I know exactly what is wrong here.
So, in some cases data importing solutions do not trigger the save_post or wp_insert_post hook after a post had been added to the database.
Those hooks are crucial as plugins attach actions to them, in this case Ajax Search Pro triggers the index table update process. If you have access to the import method, then I strongly recommend triggering the save_post hook once all the data, metadata, sku and everything was created. That is a good measure to refresh the data.If you can’t do that, then there are two alternative methods to try:
1. Enable this option. If by any chance the SKU meta is added after the post object is created, then this could resolve it. However watch the server performance, if you notice anything strange, turn this off.
2. Instead of triggered index, use Cron only. This will trigger the index at intervals to update, and should ensure that only the fully generated products are indexed.January 25, 2024 at 4:01 pm #46727Henrik Leth
ParticipantHi Ernest.
Thank You very much 🙂
I have used the “Refresh the index” option for now, and see if everything goes okay. And will monitor the server.
If that doesn’t help, i have contact to the api connection developer, and can make them add save_post command.Thanks again for quick and professional help.
Best regards
HenrikJanuary 25, 2024 at 4:21 pm #46728Ernest Marcinko
KeymasterYou cannot access this content.
January 25, 2024 at 4:28 pm #46729Henrik Leth
ParticipantYes please close this ticket. It’s fine.
And I have allready rated you and the Plugin all the relevant places 🙂
-
AuthorPosts
- The topic ‘New products from api are not seacrhable’ is closed to new replies.