Some products dont show in search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Some products dont show in search

This topic contains 13 replies, has 2 voices, and was last updated by

 
Participant
6 years, 1 month ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #6574

    Dear,
    i have installed your plugin but some products dont show in search. Example:

    Cesarini Sartori Rossobastardo but if search Cesarini Sartori the ajax search show me only 2 products
    Ruffino Chianti Superiore
    Antinori only some products
    this also for other some products.
    How i can fix it?
    i used table index.
    Best Regards

    #6575

    Hi!

    Looks like the translation ID for italian is missing from Cesarini Sartori Rossobastardo product. If I switch to english, I can see the result.

    You can try 3 different solutions:

    1. Solution

    • Deactivate and Activate WPML again. This should generate the missing tranlsations.
    • …then Re-create the Index Engine (Delete Index -> New index: https://i.imgur.com/PoFPNGg.png )

    2. If 1. solution not working, then:

    Open wp-content/plugins/ajax-search-pro/includes/etc/indextable.class.php file and go to line 908 – 926, where you should see this:

    private function langcode_post_id($post){
        global $wpdb;
    
        $post_type = "post_" . $post->post_type;
    
        $query = $wpdb->prepare("
    SELECT language_code
    FROM " . $wpdb->prefix . "icl_translations
    WHERE
    element_type = '%s' AND
    element_id = %d"
            , $post_type, $post->ID);
        $query_exec = $wpdb->get_row($query);
    
        if ( null !== $query_exec )
            return $query_exec->language_code;
    
        return "";
    }

    Change it to:

    private function langcode_post_id($post){
        global $wpdb;
        global $sitepress;
    
        $post_type = "post_" . $post->post_type;
    
        $query = $wpdb->prepare("
    SELECT language_code
    FROM " . $wpdb->prefix . "icl_translations
    WHERE
    element_type = '%s' AND
    element_id = %d"
            , $post_type, $post->ID);
        $query_exec = $wpdb->get_row($query);
    
        if ( null !== $query_exec )
            return $query_exec->language_code;
                                 
        if ( is_object($sitepress) && method_exists($sitepress, 'get_default_language') )
            return $sitepress->get_default_language();
    
        return "";
    }

    Then Re-create the Index Engine (Delete Index -> New index: https://i.imgur.com/PoFPNGg.png )

    Let me know if any of this helps!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6576

    Dear,
    Dont work. Work only in EN website. I have insert new products Zenato and in EN website work, in IT site no.
    it does not work with Regular Engine.
    Best Regards.

    #6579

    Can you please provide temporary FTP and Administrator access?

    I would like to check the search configuration and debug the code for the problem.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6585

    yes, how i can send you in private?

    #6587

    You can upload a .txt file or edit your first post in this thread for the details.

    Both methods are safe and only visible to me and you.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6605

    ok i wait your response.

    #6607

    Hi!

    Thank you for the details. I have found the problem and fixed it in the search code. I’m including this fix in the upcoming update, so you don’t have to worry about it 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6608

    Thanx =)

    #6800

    Hi, with new version i have the same problem. How i can fix it?
    Thanx.

    #6801

    Hi!

    I’ve just tested and it seems all right to me. This version has the changes I’ve made on your site.

    I have tried:
    “Cesarini Sartori Rossobastardo” – got 1 result on both sites
    “Ruffino Chianti Superiore” – no results on IT, because the DOCG category is excluded, and the product belongs there
    “Antinori” – lots of products on both languages

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6802

    Yes, i have rewrite the article, try to items on VINI – VINI BIANCHI – ABRUZZO, example Fantini Farnese Casale Vecchio Cococciola. I noticed that the old products do not indexes,

    #6803

    The “Fantini Farnese Casale Vecchio Cococciola” would return this I guess: http://www.enotecatuscia.it/prodotto/fantini-farnese-casale-vecchio-cococciola-terre-di-chieti-igt/

    But if you check the product, it’s in the IGT category (https://i.imgur.com/09nNWyu.png), which is excluded on the Advanced Options panel: https://i.imgur.com/qwZLfAK.png
    so the product is filtered out.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6804

    oops 🙂
    Thanx

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

You must be logged in to reply to this topic.