This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

New products from api are not seacrhable

Home Forums Product Support Forums Ajax Search Pro for WordPress Support New products from api are not seacrhable

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #46722
    Henrik LethHenrik Leth
    Participant

    Hi 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 430589

    #46724
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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.

    #46727
    Henrik LethHenrik Leth
    Participant

    Hi 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
    Henrik

    #46728
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #46729
    Henrik LethHenrik Leth
    Participant

    Yes please close this ticket. It’s fine.

    And I have allready rated you and the Plugin all the relevant places 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘New products from api are not seacrhable’ is closed to new replies.