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 1 year, 3 months ago.
- AuthorPosts
- October 19, 2021 at 2:41 pm #35215
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 1 year, 5 months ago by
tpuell42.
-
This topic was modified 1 year, 5 months ago by
tpuell42.
-
This topic was modified 1 year, 5 months ago by
tpuell42.
-
This topic was modified 1 year, 5 months ago by
tpuell42.
-
This topic was modified 1 year, 5 months ago by
tpuell42.
-
This topic was modified 1 year, 5 months ago by
tpuell42.
-
This topic was modified 1 year, 5 months ago by
tpuell42.
October 20, 2021 at 3:16 pm #35226Hi,
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 :)
October 20, 2021 at 5:15 pm #35229Hi,
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#3042. 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 1 year, 5 months ago by
tpuell42.
Attachments:
You must be logged in to view attached files.October 21, 2021 at 8:06 am #35237Hi,
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 :)
October 21, 2021 at 8:55 pm #35262October 22, 2021 at 9:58 am #352722. 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 :)
December 21, 2021 at 3:08 am #36018Ok, thank you.
I opened a new ticket about an unrelated issue: https://wp-dreams.com/forums/topic/selecting-filters-programmatically/
-
This topic was modified 1 year, 5 months ago by
- AuthorPosts
You must be logged in to reply to this topic.