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

Settings

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #21791
    kondorkondor
    Participant

    hi

    i purchased your plugin, and it is truly a good one!

    a few questions please to help me set up the correct configuration:

    i am using woocommerce, and added custom fields to products that will work as tags (search phrases).

    same principle – i did with product categories.

    i set the engine to search as follows:

    source 1 >> in products only + defined the custom fields.

    source 2 >> in product_cat only (no where to define custom field…)

    the result i want:
    return only exact search phrase that matches the custom field tags i added

    the result i get:
    if product category has same name as search phrase – it returns it too…

    i do not want source 2 (product cat) to search anywhere else – only in the custom field i added…

    how can it be done?

    thanks

    #21794
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Well, unfortunately there is no option to disable the search in category/term titles, it is hard coded. However, if you are okay with a direct code modification, it might still be possible.

    To do that, follow this guide:

    1. Before starting, make sure to have a full site back-up just in case
    2. Open up the wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-search-terms.php file on your server via FTP
    3. Replace it’s contents with this
    4. Save the changes

    This should do the trick, as the modified file does not contain the title query.

    I think I can add an option in the upcoming release to disable search in the term titles, so this change wouldn’t be neccessary after that.

    #21801
    kondorkondor
    Participant

    Hi Ernest

    Thanks for your prompt reply 🙂

    ok, so now caetgories work correctly.

    but now i have the following scenraio:
    i added custom fields (to support search queries only) to products ( source 1 >> in products only + defined the custom fields ).

    to product A – i added custom field value “132”.
    to product B – i added custom field value “G132”.
    to product C – i added custom field value “G1321”.

    i defined “exact match only” >> but when i type “132” in ASP search field, it returns all of the above 3…

    how can i define only super exact query to return as result – for example:
    if i type “132” >> only product A should return
    if i type “G132” >> only product B should return
    if i type “G1321” >> only product C should return

    THANKS AGAIN!

    #21820
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    You are welcome!

    Instead of exact matching, try this search logic configuration: https://i.imgur.com/6w0zGgN.png
    I believe that is the closest possible solution without making changes to the files.

    #21831
    kondorkondor
    Participant

    Hi Ernest

    thanks for your reply.

    the settings you suggested returned no results at all, no matter what I type… 🙁

    #21838
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    That is interesting. Are there multiple keywords in the fields, or only one? If there are multiple, then are the keywords separated by comma (,) or a simple space character within the field?

    #21839
    kondorkondor
    Participant

    some are singular key words (“desk”), and some are multiple keywords with space (“black desk”)

    #21840
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Those should work, according to the code, so I am not sure what is wrong.

    Can you please add temporary FTP and back-end access? I woul like to make a few debug queries to see what exactly is going on. Thank you!

    #21859
    kondorkondor
    Participant

    You cannot access this content.

    #21881
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thank you for the details.

    Okay, so I have tried the search for “132” and it returned 3 results. I clicked on this one, and opened the product editor screen. However I cannot see the custom field editor there, that contains the keyword “132”. Unfortunately the page is in hebrew, so it is a bit difficult to me to find it 🙂
    Where is this value defined on the product editor screen? Do I need to turn on something to be able to see the keywords input?
    Let me know.

    #21883
    kondorkondor
    Participant

    You cannot access this content.

    #21891
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thank you very much, I think I understand what is the problem now. The field there is not actually a single text field, as it consists for a checkbox + input, and I think ACF stores them as a serialized object, so it contains additional string information.

    Would it be an okay solution for you to use the additional seach tags field?
    I have enabled that meta box for the products editor screen, and added the G1320 keyword to this product on the editor: https://i.imgur.com/1Fs6qFk.png

    That field is designed specifically for these search tags. I have tested on the search instance to search for ‘G1320’ and it returns the correct product now, only on full exact match on that field. Please let me know if this is acceptable solution for you.
    If yes, then all you need to do is just add the keywords you need into that field.

    #21907
    kondorkondor
    Participant

    Hi Ernest,

    thanks again – your support is truly amazing, so a good word must be said 🙂

    I see what you mean, question is if it can also be enabled for product categories (the additional search tags) ?
    (if yes – than i guess it is same principle i did with custom field – only better, since it is based / part of your plugin, so it will work perfectly)

    i will also need to know which search settings need to be applied so it will search ONLY in your additional search tags and return only 100% exact matches.

    if possible, can you pls guide how to control search order (results from categories first if any, and products after)

    again – thanks!

    #21913
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Unfortunately that is not available for product categories/taxonomies, at least not yet. For taxonomy terms I would recommend using a different custom field, a simple text input, or text area, not coupled with other fields.

    The configuration can remain as it is, only make sure that the primary and secondary keyword logic is set as following: https://i.imgur.com/0jEnvGe.png

    The mixed results ordering can be set under the ordering panel, in your case you want it like this: https://i.imgur.com/Q7YX6Tq.png

    #21927
    kondorkondor
    Participant

    Hi Ernest

    ok, i got the idea of what you suggested and applied it.

    1) for products i am using your additional tags

    2) for product categories i changed custom field to repeater text filed.

    exact words are searched now which is great!

    only problems i have now are:

    1) got products >> after adding tags and saving, the commas between each tag disappear and you cant know if it is a single word tag or 2 or 3 word tag (for example – if you insert the following tags: hello, john >> after saving you wont be able to know if the the tag is “hello john”, or if it is “hello”and “john”).

    2) product categories:
    a) still returning results that shouldnt return (seems like it is still searching in title too even after i removed the code you suggested)
    b) i need product categories results (if any) before product results + if it is main category (parent) – it should be above child)
    for example >> cat “fruits” is parent of cat” banana”

    both have tag “fruit”

    i need “fruits” (parent) to show before “banana”) – currently i believe banana will show before fruits due to ABC ordering?

    thanks!

Viewing 15 posts - 1 through 15 (of 32 total)
  • The topic ‘Settings’ is closed to new replies.