This topic has 12 replies, 5 voices, and was last updated 10 years by Abe.

  • Author
  • #8563
     matbcn
    Participant

    Hi, it seems no matter what fields I chose in Buddypress–>Search form customization the Compatability match on the members profile always show 50%

    I also tried adding the function (from another tread here in the forum) below to my sweetdate-child’s function.php and even changing the percentages there did not have any effect.

    function kleo_my_match() {
    global $kleo_config;
    $kleo_config[‘matching_fields’][‘starting_score’] = 1;
    //If we want to match by members sex. values: 0|1
    $kleo_config[‘matching_fields’][‘sex_match’] = 1;
    //required for initial match. If the sex preference matches it will continue to the specified fields below
    $kleo_config[‘matching_fields’][‘sex’] = ‘I am a’;
    $kleo_config[‘matching_fields’][‘looking_for’] = ‘Looking for a’;
    //sex percentage
    $kleo_config[‘matching_fields’][‘sex_percentage’] = 49;
    //single value fields like select, textbox,radio
    $kleo_config[‘matching_fields’][‘single_value’] = array (
    ‘Marital status’ => 20,
    ‘Country’ => 5,
    ‘City’ => 5
    );
    //multiple values fields like multiple select or checkbox
    $kleo_config[‘matching_fields’][‘multiple_values’] = array (
    ‘Interests’ => 10,
    ‘Looking for’ => 10,
    );
    }

    Any idea, what I might be missing?

    Thanks in advance!

    mat

    #8624
     Abe
    Keymaster

    if it is set to 50 from the code means that it matches only sex preference and not the other fields like
    ‘Marital status’ => 20,
    ‘Country’ => 5,
    ‘City’ => 5
    ‘Interests’ => 10,
    ‘Looking for’ => 10,

    probably they don’t have the same preference

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #8669
     matbcn
    Participant

    Thanks for the reply!
    In the meantime I found out I was missing the line on top

    add_action(‘after_setup_theme’,’kleo_my_match’);

    in my code.

    However, I have another question regarding compatibility matching:

    I found out that the percentages of the multiple values fields (like multiple select or checkbox) only are added, if ALL SELECTIONS are identical.

    I would like to change it in that way that only ONE SELECTION needs to be identical in order for the percentage to be added to the overall match percentage.

    Basically change the formula from AND to AND/OR, I guess.

    Is that possible?

    Thanks!

    #8717
     Abe
    Keymaster

    By default it will increase for each matched value from the multiple values

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #11251
     oneder22
    Participant

    I’m also seeing the same results as matbcn. The match score only increases if there is an identical match for checkboxes, multi-select and text boxes.

    Is there a fix so the match score will increase even if it’s not an identical match for all multiple selections? Like matbcn said, changing the formula from AND to AND/OR would be perfect.

    #11270
     Abe
    Keymaster

    Hi, That is the way is should work for multiple fields, to increase with each matching field
    For single fields it increases if it finds the same field

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #11271
     Abe
    Keymaster

    This topic shows how to change what fields affects matching: https://archived.seventhqueen.com/forums/topic/match-numbers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #11272
     oneder22
    Participant

    Hey Abe, thanks for the response. I’ve generated my code from the link you sent, but it’s still not functioning properly with multiple fields. Here’s my code in functions.php:

    add_action(‘after_setup_theme’,’kleo_my_match’);
    function kleo_my_match() {
    global $kleo_config;
    $kleo_config[‘matching_fields’][‘starting_score’] = 25;
    $kleo_config[‘matching_fields’][‘sex_match’] = 0;
    //single value fields like select, textbox,radio
    $kleo_config[‘matching_fields’][‘single_value’] = array (
    ‘Country’ => 10,
    ‘State’ => 20,
    ‘City’ => 30,
    ‘Province’ => 20,
    ‘Other Interests’ => 5,
    ‘Relationship Status’ => 5,
    ‘Ethnicity’ => 5,
    ‘Religious Views’ => 5
    );
    //multiple values fields like multiple select or checkbox
    $kleo_config[‘matching_fields’][‘multiple_values’] = array (
    ‘Interested In’ => 15,
    ‘Interests’ => 10,
    ‘Hobby/Hobbies’ => 30
    );
    }

    Do you see anything wrong with the code?

    #11375
     Abe
    Keymaster

    Hi, I guess you are right. It increases just one time even though multiple are found. Please update this file content wp-content\themes\sweetdate\custom_buddypress\bp-functions.php from this one: https://archived.seventhqueen.com/files/bp-functions.txt

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #13126
     metalmick
    Participant

    Hi,
    Can you confirm that file content above was included in this weeks theme update? Or should I do the same as suggested above?

    #13269
     Abe
    Keymaster

    Yes it was included in 2.5 update

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #13488
     Bottosso
    Participant

    Hi All

    How it’s works if the $kleo_config[‘matching_fields’][‘looking_for’] is a array?

    For example: I have a field called Gender (Checkbox) there, the user can choose if they are looking for (Man, Female, Couples, bla bla bla), if the user choose (Female and Couples) will it work? If not how I can solve it?

    Many Thanks

    #13730
     Abe
    Keymaster

    yes it will work for multiple value fields. You add it in this example array:
    $kleo_config[‘matching_fields’][‘multiple_values’] = array (
    ‘Interested In’ => 15,
    ‘Interests’ => 10,
    ‘Hobby/Hobbies’ => 30
    );

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

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

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?