Your address will show here +12 34 56 78

This topic contains 3 replies, has 2 voices, and was last updated by  Anna 3 years, 8 months ago.

  • Author
    Posts
  • #20177

    richard

    hiya, im having problems with the ajax on the ?property_action_category=sales page.

    I changed it from POST to GET, and it works now, but why would this be a problem? is there a setting somewhere?

  • #20181

    richard

    ahh its not working

    I tried to do this:
    $_POST = array_merge($_GET, $_POST);
    print_r($_POST);

    But the filters with arrays fail..

    Simple ones will work eg:
    /admin-ajax.php?action=ajax_filter_listings&order=1

    this one wont:
    action=ajax_filter_listings&order=1&action_array%5B%5D=For+Rent&action_array%5B%5D=For+Sale

    ^ when the JS puts it into the url for GET it makes a mess of the arrays, so ill have to convert to JSON etc right?

    or how do i get the POST working?

  • #20263

    richard

    ok i worked it out.

    the control.js was punching through the title not the slug

    was this:
    action_array.push( $(this).val() );

    this is the fix:
    action_array.push( $(this).attr(‘id’).replace(‘_listing’,”) );

  • #20336

    Anna
    Keymaster

    Hi Richard,

    I’m happy you managed to do this. Your skills are really good.

    Talk soon
    Anna

You must be logged in to reply to this topic.