Home Forums Plugin Support WP User Frontend Pro Tag suggestions

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Kristopher 5 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9308

    Kristopher
    Participant
    Post count: 5

    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: ‘, ‘ } );
    });

    #9309

    Kristopher
    Participant
    Post count: 5

    Seems to be only happening in sarfari

    #9363

    Tareq Hasan
    Keymaster
    Post count: 2831

    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.

    #9367

    Kristopher
    Participant
    Post count: 5

    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 4 posts - 1 through 4 (of 4 total)

The topic ‘Tag suggestions’ is closed to new replies.