-
Author
Tagged: checkbox multiple calculation
-
July 2, 2014 at 09:10 #21486omtrParticipant
Hi SQ,
i have a problem with multiple value (checkboxes) matching. In your FAQ it is stated that multiple value checkboxes are calculated in addition, e.g. for interests every matching checkbox is counting with the value defined in the $kleo_config[‘matching_fields’][‘multiple_values’] located in the child theme’s function.php. so far, so good.
but actually it seems that a multiple checkbox is only counted if _all_ values match.
let’s say that “Interests” is counted with a value of 10, then it does not matter if one, two or all checkboxes do not match. if only one single checkbox is different, the score is reduced by 20 (not 10), two or three mismatching checkboxes have the same effect. can you tell me where the coded for multiple value calculation is located so i can understand it and maybe change it for my purposes?p.s. there seems to be a bug in your multiple select dropdown fields. obviously only one value can be selected.
July 2, 2014 at 15:01 #21512CatalinModeratorHello,
First, please update the theme to the latest version.
Then take a look at
../wp-content\themes\sweetdate\custom_buddypress\bp-functions.php
and there you will find:
COPY CODEfunction compatibility_score() {}
You can copy this function to your functions.php file from your child theme and modify it as you need.
Let me know if this works for you,
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 2, 2014 at 22:22 #21581omtrParticipantHi Catalin,
thanks for your quick response. i already updated to the new version. as far as i understand the compatibility_score() function, it is already coded the way i want to have it: every match on multiple checkboxes is added to the score. at least that is what the coded is supposed to do. Unfortunately the multiple checkboxes do not have any effect on my score. to finde the reason, i tried several different member searches and tried changes the target member profile interests. but the result is always the same: the score does not change. btw: single value fields work perfectly!
COPY CODEadd_action('after_setup_theme','kleo_my_match'); //If we want to match by members sex. values: 0|1 $kleo_config['matching_fields']['sex_match'] = 0; function kleo_my_match() { global $kleo_config; $kleo_config['matching_fields']['starting_score'] = 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' => 10, 'Country' => 10, 'City' => 5, 'Profession' => 10, 'Annual Income' => 10, 'Education' => 10, 'Political Views' =>5, 'Religion' => 20, 'Weight Type' => 5, 'Ethnicity' => 15 ); //multiple values fields like multiple select or checkbox $kleo_config['matching_fields']['multiple_values'] = array ( 'Interests' => 5 ); }
sex, marital status, country and city are set for scoring and i get a perfect 75 when i do a search. but Interests do not have any impact.
obviously there are a lot of people in this forum who have the same problem – i hope that there is a simple answer for me.
thanks in advance, i appreciate your help! your are doing a great job.
November 24, 2014 at 09:53 #36442topdogParticipantI am having the same problem. I see that the support team hasn’t responded to your last post in July. Did you find a fix for this?
It’s driving me crazy why this isn’t working since all the support threads I’ve read claim that it’s supposed to.
November 26, 2014 at 20:36 #36776AbeKeymasterHi topdog,
you need the latest version installed and your field name should be added inside this array like the example
$kleo_config[‘matching_fields’][‘multiple_values’] = array (
‘My field name with multiple choice type’ => 10,
);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.November 28, 2014 at 22:18 #36985AbeKeymasterDo you have two profiles with one value that is chosen on both?
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.November 29, 2014 at 08:51 #37022topdogParticipantYes. One of the fields is called My Interests and has checkboxes for various interests. On the admin account I have checked all of them. On the dummy accounts, I have check just a few of them.
When I test the matching score, it only gives me credit for the single variable matches and not the multiple variable matches as it’s supposed to do.
I opened another support thread for this but haven’t heard back in over 4 days. I posted by code on that thread which is hear:
December 3, 2014 at 01:54 #37418AbeKeymasterClosing this topic. continuing here https://archived.seventhqueen.com/forums/topic/matching-fields-multiple-values-not-working#post-37416
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. -
AuthorPosts
The topic ‘Multiple Checkbox: not partial match?’ is closed to new replies.