Custom field _sku at the top of the results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Custom field _sku at the top of the results

This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 months, 1 week ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #37103
    jjuanola
    jjuanola
    Participant

    Hi!!

    In the ASP configuration we need to display first the products that match completely or a part of the _sku field. Currently we’re including this field in searches, but the order that products are shown is given by the terms in Advanced options -> Grouping. In this space we do not find the _sku field to put at the beginning of the hierarchy.
    Is there any way of doing this?

    Thank you very much in advance.

    Greetings!

    #37107
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Well, within the groups, still the most relevant matches will be the first – but the groups may not be ordered by relevance.

    You can try the following configuration:
    – Increase the relevance value of the custom field matches, and decrease everything else: https://i.imgur.com/sPMbgX8.png
    – And try also this option: https://i.imgur.com/7ldOQYH.png
    With that, the custom field (including _sku) relevance will be much higher in contrast to other fields – so each result within each group should be the best matching by relevance. The second option should theoretically reorder the groups to show the ones with the most relevant matches first.

    There is still no guarantee the groups will go exactly as you want them, because a relative weighted relevance is used to set the group positions.

    Best,
    Ernest Marcinko

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


    #37155
    jjuanola
    jjuanola
    Participant

    Hii!!

    It worked fine!!

    Now, another issue, I’m sure you’ll solve fast.

    In one of custom fields we have, for example:

    <div style=”margin-left:20px;”><div class= “product_references_code”>0012374</div><div class= “product_references_name”>for TET</div><div class= “product_references_code”>0014105</div><div class= “product_references_name”>for JT-T1A</div><div class= “product_references_code”>0014107</div><div class= “product_references_name”>for JT-T2A</div><div class= “product_references_code”>J125010</div><div class= “product_references_name”>for JNA</div></div>
    </div>

    Right now, the only results that ASP can find are 0012374 and TET
    The rest of strings inside following <divs>: 0014105 – JT-T1A – 0014107 – JT-T2A – 125010 – JNA are not found in this product. (Maybe found in another product and in another field but not in this)
    It seems tha it only finds the content of the first <div> i think.

    Any idea about it??

    Thanx very much!!

    #37165
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Great!

    That might be due to a known minor bug with the HTML extractor, I think it fits the case perfectly. I have made a direct change to one of the pugin files, which I copied from the development release.

    Can you please try to re-create the index table and try again?

    I have a strong feeling, that it will resolve that.

    Best,
    Ernest Marcinko

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


    #37172
    jjuanola
    jjuanola
    Participant

    Hi!!

    Perfect, it worked relly fine.

    Please, just the last question.

    How can we show the category products in n the first place when we find a category. Not always like finding for example a product, just when we find the exact categoryand it matches.

    I attach an example.

    Thanx in advance for your time!

    Greetings!

    Attachments:
    You must be logged in to view attached files.
    #37203
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    This is a tough one. You can try this reordering feature. The group with the most relevant matches should be placed at the top – however it might not be the ones from that category.

    Best,
    Ernest Marcinko

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


    #37278
    jjuanola
    jjuanola
    Participant
    You cannot access this content.
    #37297
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    It does not work, because the child theme is not active.

    I looked at the modifications, and I rather recommend using the asp_results hook to change the result URL, it is much more convenient. You can also use the advanced title and content fields to show the SKU (_sku custom field) in the results title/content.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.