Custom taxonomy search, empty select options, javascript events

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Custom taxonomy search, empty select options, javascript events

This topic contains 6 replies, has 2 voices, and was last updated by tpuell42 tpuell42 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #35215
    tpuell42
    tpuell42
    Participant

    Affected URL is https://www.sublime.wine/search/ You need to be logged in to see it.

    I have several issues:

    1. I am including a custom taxonomy search (German Tags) in the search options, but it does not work. This is visible when language is set to DE (German) all the way at the bottom of the search options (Markiert mit…) It does not in fact perform the search at all–this is also true when I show all options without suppressing the English.

    2. The dropdowns in the options seem to be displaying options that do not exist in any posts, eg “Vintage” (in English) displays an option “Jahrgang”, which when selected does not yield any results. How do I get ghost values like that out of there?

    3. What after-search-event can I bind a secondary script to? I tried asp_search_end, but it triggers before the search results are rendered, which is what I have to wait for. On initial load I am using jQuery’s ajaxComplete to trigger a script that renders shopify purchase buttons (See these on mouseover over the individual products) but on subsequent searches or loading more results it does not trigger…

    • This topic was modified 7 months ago by tpuell42 tpuell42.
    • This topic was modified 7 months ago by tpuell42 tpuell42.
    • This topic was modified 7 months ago by tpuell42 tpuell42.
    • This topic was modified 7 months ago by tpuell42 tpuell42.
    • This topic was modified 7 months ago by tpuell42 tpuell42.
    • This topic was modified 7 months ago by tpuell42 tpuell42.
    • This topic was modified 7 months ago by tpuell42 tpuell42.
    #35226
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. I assume the items shown there might be ones that does not have any term from that taxonomy assigned to them. For that, I recommend turning off this option: https://i.imgur.com/nxLzuJA.png

    2. The value must exist, as it is pulled directly from the wp_postmeta database. Instead of using the {get_values}, you can still enter the desired values manually: https://i.imgur.com/m2IR1xg.png
    That should be the simplest solution.

    3. You can use the “asp_results_show” event. That fires when the results are appended to the results container and the plugin begins displaying the container.

    Best,
    Ernest Marcinko

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


    #35229
    tpuell42
    tpuell42
    Participant

    Hi,

    1. No. There exists a listing that has that term assigned to it:
    https://www.sublime.wine/products/malinga-sauvignon-blanc/ (choose DE or look at backend)
    Furthermore, I do have that setting:
    https://www.sublime.wine/wordpress/wp-admin/admin.php?page=asp_settings&asp_sid=1#304

    2. Thank you, that was helpful. By looking at the wp_postmeta table I found that these ghost values stem from posts of the type “revision”:
    https://www.sublime.wine/wordpress/wp-admin/revision.php?revision=1418
    So if an incorrect value was entered and then deleted, Ajax Search Pro still pulls it in. Can that be fixed, please?

    3. That worked, thank you. By the way, I couldn’t find this event, because I get an error when trying ASP.printEventsList() See attached screenshot.

    Best,
    Tania

    • This reply was modified 7 months ago by tpuell42 tpuell42.
    Attachments:
    You must be logged in to view attached files.
    #35237
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. I mean to turn that setting OFF. Currently items, which have no assigned terms for the filtered taxonomy are also shown. When that option is disabled, the plugin will exclude every item, which has not been assigned any term from the given taxonomy.

    2. I’m afraid not, because it would require a table join operation on the full wp_posts and wp_postmeta table (when fetching the values) – and that could take seconds, delaying the page loading greatly. We are adding an “exclude” attribute for the {get_values} pseudo variable within 2 releases, that should be a possible solution.

    3. You are right, it was actually removed in 4.21, and I forgot to update the documentation with the relevant information.

    Best,
    Ernest Marcinko

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


    #35262
    tpuell42
    tpuell42
    Participant

    1. Oh, never mind, I was looking at the wrong setting. Got it now. Thank you.

    2. So, what is one supposed to do about that?

    • This reply was modified 7 months ago by tpuell42 tpuell42.
    • This reply was modified 7 months ago by tpuell42 tpuell42.
    • This reply was modified 7 months ago by tpuell42 tpuell42.
    #35272
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    2. We updated the JS API knowledge base with all the events and functions list available. Let me know if you need any help.

    Best,
    Ernest Marcinko

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


    #36018
    tpuell42
    tpuell42
    Participant

    Ok, thank you.

    I opened a new ticket about an unrelated issue: https://wp-dreams.com/forums/topic/selecting-filters-programmatically/

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

You must be logged in to reply to this topic.