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 Enzo Maio Enzo Nardo Di Maio 6 years, 8 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #6574
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

    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
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

    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
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

    yes, how i can send you in private?

    #6587
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

    ok i wait your response.

    #6607
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

    Thanx =)

    #6800
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

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

    #6801
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

    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
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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
    Enzo Maio
    Enzo Nardo Di Maio
    Participant

    oops 🙂
    Thanx

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

You must be logged in to reply to this topic.