Tag suggestions

This topic contains 3 reply and 2 voices, and was last updated by Kristopher 11 years, 1 month ago
Viewing 3 Posts - 1 through 3 (of 3 total)
Author Posts
October 23, 2013 at 4:10 pm 9308
Kristopher The following JS is triggered when user is putting in product tags. The outcome is to look at other tags and suggest to the user what to re use. I get it & it is awesome. However, if there is no match it shows "-1". How would i get it to show "Exist Tag not found". jQuery(function($) { $('#product_tag').suggest( wpuf_frontend.ajaxurl + '?action=ajax-tag-search&tax=product_tag', { delay: 500, minchars: 2, multiple: true, multipleSep: ', ' } ); });
October 23, 2013 at 4:12 pm 9309
Kristopher Kristopher

Seems to be only happening in sarfari

October 24, 2013 at 12:41 pm 9363
Tareq Hasan Tareq Hasan

I believe your query is to change -1 to Exist Tag not found?

First of all, It shows -1 if not found? Well, it shouldn’t. It should give a response 0. For logged in users, the ajax response is handled by WordPress core and you can’t change it. But for logged out users (guests), WPUF handles that and you can change the response from wpuf-functions.php and it’s wpufe_ajax_tag_search() function.

Hope that helps.

October 24, 2013 at 12:48 pm 9367
Kristopher Kristopher

Your correct.

That is what I am looking for. What I am hear is I can not change it for logged on users (as the form you need to be a registered user to input it in).

That is fine.

Viewing 3 Posts - 1 through 3 (of 3 total)