This topic has 25 replies, 3 voices, and was last updated 9 years by Abe.

  • Author
  • #36486
     topdog
    Participant

    I am customizing the member’s profile by adding additional fields but the matching score is not working for multiple value fields (multi-select boxes & checkboxes).

    I’ve turned off the sex matching because I’m not building a dating site. The single value fields are working fine but if the multiple value fields don’t match exactly no score is added. Instead of how it’s supposed to work by adding a score for every individual multiple value selection that is matched.

    I’ve read every post on this forum and tried every listed solution but it’s still not working. Below is the code I’ve inserted into the child theme’s function.php file.

    COPY CODE
    add_action('after_setup_theme','kleo_my_match');
    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'] = 0;
      //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'] = 5;
      //single value fields like select, textbox,radio
      $kleo_config['matching_fields']['single_value'] = array ( 
        'Hometown' => 5, 
        'City' => 5,
        'Status' => 10
      ); 
      //multiple values fields like multiple select or checkbox 
      $kleo_config['matching_fields']['multiple_values'] = array ( 
    	'Interests In' => 5, 
    	'Looking For' => 10
      );
    }
    	

    In addition, below are all of the methods I’ve tried from your forum posts to fix the issue.

    1) Ensure I’m running the latest theme: Running v2.7
    2) Tested code with sex matching turned on and turned off
    3) Tried adding the code to bp-functions.php file your support team posted for a forum user that had the same issue. It didn’t work and per the post from Abe, the fix was supposed to be added to v2.5 update anyway.
    3) Tried added custom code from . That code makes every user match 100% even if they didn’t complete the profile fields.
    4) Tried adding code from . At the time, I was thinking I wanted to use sex matching and was having issues with the score always being 50%. I fixed that issue but the multiple values fields still didn’t work at that time.
    5) Edit the compatibility_score() function in the bp-functions.php file. I found the file and moved it to the child theme functions.php. It didn’t work but it should have worked from the bp-functions.php file anyway because I didn’t need to edit the code for my site. I then tried editing the code to remove the sex matching, etc. but it still doesn’t add to the score for multiple value fields that are selected. I removed the edited code from the functions.php and added it back to the bp-functions.php file and it still didn’t work. I’ve reset the code back to it’s original state for now.

    I’m hoping you can help fix this issue as it is very frustrating and is delaying the launch of my site.

    In addition, I noticed anothery slight issue. I originally named one of my single value profile fields “Relationship Status” however that was causing the matching system to not count that field. But when I renamed it to Status, it worked. I tried several name combinations like “My Relationship Status”, “My Status”, etc. and everytime it didn’t count the score.

    Is this a glitch in the matching system? I’d prefer to name the field Relationship Status but it not a deal breaker if I have to use Status instead. I just wondered why I had the issue in the first place.

    #36509
     Laura
    Moderator

    Hello, here is a sample of a custom matching, just change the names for your own Field name and delete others you dont need:

    COPY CODE
    
     //change matching system
    add_action('after_setup_theme','kleo_my_match');
    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'] = 'Soy';
    $kleo_config['matching_fields']['looking_for'] = 'Busco';
    //sex percentage
    $kleo_config['matching_fields']['sex_percentage'] = 20;
    //single value fields like select, textbox,radio
    $kleo_config['matching_fields']['single_value'] = array (
        'Estado Civil' => 1,
        'Ciudad' => 1,
        'País' => 1,
    	'Fumo'	=> 1,
    	'Bebo'	=> 1,
    	'Mejor Característica'	=> 1,
    	'Hijos'	=> 1,
    );
    //multiple values fields like multiple select or checkbox
    $kleo_config['matching_fields']['multiple_values'] = array (
        'Musica' => 1,
        'Literatura' => 1,
    	'Cine'	=> 1,
    	'Actividades'	=> 1,
    	'Deportes'	=> 1,
    	'Idiomas'	=> 1,
    	'Personalidad'	=> 1,
    	'Características'	=> 1,
    ); 
    }
    /* rtMedia tab - only if plugin installed */
    if (class_exists('RTMedia')) 
    {
        $bp_tabs['rtmedia'] = array(
            'type' => 'rt_media',
            'name' => __('My photos', 'kleo_framework'),
            'class' => 'mySlider'
        );
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #36512
     topdog
    Participant

    Laura, thanks for responding but the code you posted is no different than the code I posted on the thread (except for the specific field names and I turned off sex matching).

    Therefore, your post doesn’t help me. From your work with the theme and customers in the past, have you seen anything else that could be blocking the multiple values matching fields from not working?

    If not can I share my FTP info with you so you guys can take a look at my code.

    #37023
     topdog
    Participant

    It’s been four days and I haven’t hear back from anyone about this support ticket. Hopefully someone can help me with this issue.

    #37085
     Abe
    Keymaster

    Hi, share your ftp so I can take a look please and login credentials for a user that has that field set in its profile and the link to the other profile you are visiting for the matching score

    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.

    #37198
     topdog
    Participant
    This reply has been set as private.
    #37416
     Abe
    Keymaster

    I have fixed your problem and came from the fact that even you have updated the theme, you have overridden custom_buddypress/bp-functions.php and the matching function was there and was an old version

    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.

    #37440
     topdog
    Participant

    I just checked and the multiple value fields still are working. Is there something else in the custom_buddypress/bp-functions.php file that’s overriding the matching function?

    #37690
     Abe
    Keymaster

    I tested the matching at the time connected at your site and worked. I don’t know why you overridden the bp-functions.php but better if you try not to

    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.

    #37696
     topdog
    Participant

    I didn’t override anything or change the bp-functions.php file in any way. After I read your message, I logged into the site, tested the matching and it didn’t work. It never registers anything over 15 because I weighted most of the points to the multiple values fields.

    I just want the matching to work, and soon, because we are launching the site on Monday and it’s a crucial part of the site functions.

    Do I just need to re-install the bp-functions.php file from the original updated theme or did you do something else to the file when you got it working?

    #37729
     Abe
    Keymaster

    I updated the function taking care of matching in your child theme. just delete the file from your child theme if you haven’t added changes in it. Also try clearing caches and the usual stuff

    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.

    #37764
     topdog
    Participant

    Just to be clear, which file should I delete?

    If I understand what you did, you updated the custom_buddypress/bp-functions.php file to the latest version because I was using an old version but that file is being overridden by another file which is likely my function.php file.

    However, the function.php file contains all the special profile fields I added so I assume I shouldn’t remove that code.

    #37845
     Abe
    Keymaster

    I mean to remove from child theme custom_buddypress/bp-functions.php since I don’t know what customization you have done since you should do them in functions.php

    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.

    #38275
     topdog
    Participant

    I removed the file but the matching system still isn’t working. Are you sure the multiple value field were working before?

    #38736
     topdog
    Participant

    I’ve tried everything I know but still can’t get the multiple values fields to work. Can you check my child theme functions.php file to see if that’s why it isn’t working. I can’t find anything but of course you know more than me about this.

    #38937
     Abe
    Keymaster

    I already checked last time and fixed your problem. I don’t know what you did again … why didn’t you let the files like that?

    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.

    #38946
     topdog
    Participant

    Abe,

    As I said before, I didn’t change the files after you said the matching was working. On December 3rd, I received notice of your message via email, then I signed into my site and the multiple value matching was not working properly. Single value has always worked.

    On the same day, I posted on this thread that the match isn’t working for me. I asked about the custom_buddypress/bp-functions.php which you had mentioned in your post and AFTER that I did make changes to different files based on your suggestions and other possible solutions.

    Really, I just want it to work. It’s been 18 days since I started this thread on November 24th and I’ve had to postpone the launching of this site because I can’t get the matching to work. Now we are coming up on Christmas and if I can’t get this fixed within the next few days, it will likely have to wait til January 2015 – A full month plus delay.

    It’s extremely frustrating and in the end, I just want the site to work so I can move forward on this project. Can you please help me with this?

    #38948
     Abe
    Keymaster

    Right you have a site problem since the page never seems to finish loading and the matching won’t even appear. Fix that and I will look again

    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.

    #38951
     topdog
    Participant

    I’m not experiencing that issue. I’m going to open another browser and check.

    #38955
     topdog
    Participant

    The website, profile and single matching is still working for me on multiple browsers. I’ve attached a screenshot here.

    Please let me know if you’re still having issues.

    #38956
     topdog
    Participant

    Screenshot link didn’t stay in my last post. Here it is http://goo.gl/UhFQvb

    #39201
     Abe
    Keymaster

    Hi, did some debugging and fixed it. it was related to the matching function too. I will add this extra fix in the next theme update.

    Cheers and thanks

    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.

    #39220
     topdog
    Participant

    Abe, thanks very much for your hard work on this one. Just checked and confirmed it’s working for me.

    Just wanted to make sure, was the issue was related to a theme core and not something I did?

    #39237
     Abe
    Keymaster

    Glad all good now. First is was the old file you copied in child theme and then an extra check I had to add to ensure it works in all conditions

    Cheers

    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.

    #39683
     topdog
    Participant

    Abe, I hate to contact you again about this but I’m having issues with the system.

    The matching score is still working fine since you fixed it, however, I just noticed that the fix has caused a few fields to not sync properly.

    The Birthday (Date field) and Interests aren’t syncing when the info is entered during registration. In addition, the interest fields aren’t working properly when I enter the information from the Manager Signups screen in the admin area. Sometimes choices display and some don’t.

    I didn’t changed any of the files since you fixed it. I was focusing on the matching score function and just didn’t beta test the registration fields until now.

    #40048
     Abe
    Keymaster

    Hi, my change only affects the matching and all those new “problems” are just basic Buddypress. You should check any plugins you might have since the theme does not interfere in that process. Try to look over the internet for a same problem

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

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

Log in with your credentials

Forgot your details?