Home Forums WoodMart support forum woodmart_ajax_suggestions is poorly coded

woodmart_ajax_suggestions is poorly coded

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #653679

    dimmisel
    Participant

    Hi. I have specific problems in regard to the function mentioned in the ticket’s title. Please take a look at the attached images where I include comments on specific parts of your code.

    Attachments:
    You must be logged in to view attached files.
    #653685

    dimmisel
    Participant

    At least, please consider changing $post_type at line 574 to $query_args['post_type'] so that we could use the filter woodmart_ajax_search_args to change it to something else that would be respected and working…

    Attachments:
    You must be logged in to view attached files.
    #653821

    Artem Temos
    Keymaster

    Hello,

    To make this search form work with your custom post type, you need to edit this element in the header builder and select “All post types” as shown on the screenshot https://gyazo.com/67dd84ecc5335dfc67a8f7a2f3da8424
    Then you are able to filter arguments and extra calculations will not be performed.

    Kind Regards

    #654018

    dimmisel
    Participant

    Hello.

    Unfortunately your proposed solution didn’t make any change. I still get the fatal error when searching for a keyword. Please not that despite the setting, I still have the hook on woodmart_ajax_search_args but the fatal happens at line 587, on the $product->get_price_html() part of the code. I also tried with my hook turned off but it didn’t make any difference.

    Please take a look at the attached image URLs in the private content.

    #654077

    Artem Temos
    Keymaster

    Hello,

    You need to filter the post type only in the woodmart_ajax_search_args hook. Remove the second one and it will work as expected.

    Kind Regards

    #654248

    dimmisel
    Participant

    Hello. I did so, and nothing changed. I’m sending you login credentials and details in the private area.

    #654271

    Artem Temos
    Keymaster

    We need your server authentication username and password as well. We can’t view your website at the moment.

Viewing 7 posts - 1 through 7 (of 7 total)