BuddyBoss Home – Web Support Forums Solutions Social Learner Course Register Button

Viewing 11 posts - 1 through 11 (of 11 total)
  • Question

    #43005
    @kahunaburger

    The Register Button on the course page for non-logged in users links to http://example.com/my-courses/ instead of the BP register page.

    (I do not have WooCommerce installed)

    Answers

    #43087
    @vapvarun

    Hey @kahunaburger, they will not able to join courses if they are not logged in, You will not get a register button

    I will suggest to keep woo commerce even you are offering free courses.

    “Please sign up for the course before starting the lesson. ” such alert are from sensei plugin , they can better explain it how to alter them without touching codes inside the plugin.

    Regards
    Varun Dubey

    #43088
    @kahunaburger

    Why?

    Why would I have all that extra code if we will never use it?

    Seriously? That’s crazy. All that extra code just to make a button work? What other shortcuts have you made with this assumption?

    If you are saying we are required to use WooCommerce that is very disappointing.

    This was just a bug report. We plan to replace that button with our own login lightbox/popup.

    The Group integration is already a complete mess.

    Some links have the Course as the Home and others have the Activity as the Home. If you click on the Course tab you get a broken template. Its a complete mess. I don’t really care because we don’t plan on using any of this and are going to custom code the rest. However do you realize your Group integration doesn’t work?

    #43142
    @vapvarun

    Hey @kahunaburger , i am not saying woocommerce is required for sensei. If you do not want to include any payment type activities no need to add woocommerce.

    BP Group have two layout, one for those which are linked with courses and second for default buddypress group which are not linked to any course.

    Both layout have home tab for activities and additional course tab for those which are linked with courses.
    Regards
    Varun Dubey

    #43154
    @kahunaburger

    That’s good to know about Woo. 🙂

    But the Groups are a mess and it’s not an issue of the Group being attached to a Course. 🙁

    The Creative Editing Course, a Crash Course on Editing

    Home #1 (Courses):
    http://demo.buddyboss.com/social-learner-sensei/groups/the-creative-editing-group/

    Now Click on the Course link and you get a broken template:
    http://demo.buddyboss.com/social-learner-sensei/groups/the-creative-editing-group/experiences/

    Now click on the Home link and you get Home #2 (Activity). The Top menu also disappears:
    http://demo.buddyboss.com/social-learner-sensei/groups/the-creative-editing-group/

    #44532
    @kahunaburger

    Any fixes?

    #44543
    @vapvarun

    Hey @kahunaburger, Developers are working on Social Learner Bugs, hopefully we will have next updates next week
    Regards

    #44923
    @kahunaburger

    @vapvarun The only way I see the Course/Group issue working is if you dedicate Groups only to Courses (no non-course groups). Beyond that you would need reproduce all the Group features for Courses independent of Groups. You may be able to use redirects, but that can be very messy.

    However you decide to do it, currently the Group integration just doesn’t work.

    PS
    Should I create a new topic for the Group integration? It is unrelated to the original topic.

    #48329

    Alyssa
    Participant
    @alyssa-buddyboss

    @kahunaburger be on the look out for an update to the BP Sensei plugin. We are currently in the testing phase for ALL reported bugs. After research about the register button this is designed that way by Sensei. Please add this code to your functions.php file to correct it:

    add_action( 'sensei_course_meta', 'sl_nowc_sensei_course_meta_pre', 9 );
    add_action( 'sensei_course_meta', 'sl_nowc_sensei_course_meta_post', 11 );
    function sl_nowc_sensei_course_meta_pre(){
        /**
         * If wocommerce is not active and user is not logged in, 
         * sensei prints a button 'Register' which links to /my-course page instead of buddypress register page.
         * Lets make that point to buddypress register page.
         */
        if( !is_user_logged_in() && function_exists( 'buddypress' ) && get_option( 'users_can_register') ){
            if( class_exists( 'WooThemes_Sensei_Utils' ) && !WooThemes_Sensei_Utils::sensei_is_woocommerce_activated() ){
                add_filter( 'page_link', 'sl_nowc_guest_mycourses_permalink', 99, 2 );
            }
        }
    }
    
    function sl_nowc_sensei_course_meta_post(){
        remove_filter( 'page_link', 'sl_nowc_guest_mycourses_permalink', 99, 2 );
    }
    
    function sl_nowc_guest_mycourses_permalink( $link, $post_id ){
        global $woothemes_sensei;
        $my_courses_page_id = '';
    
        $settings = $woothemes_sensei->settings->get_settings();
        if( isset( $settings[ 'my_course_page' ] ) && 0 < intval( $settings[ 'my_course_page' ] ) ){
            $my_courses_page_id = $settings[ 'my_course_page' ];
        }
    
        if( !empty( $my_courses_page_id ) && $my_courses_page_id==$post_id ){
            //this is our page, lets change its url
            remove_filter( 'page_link', 'sl_nowc_guest_mycourses_permalink', 99, 2 );
            $link = bp_get_signup_page();
        }
        return $link;
    }
    #52302
    @anas-aljefry

    Hello @tjchester,

    I used the code the you provided but the register button points to my-course page.

    I’m using the latest version boss theme and social learner 1.0.6.

    BR

    #52352
    @vapvarun

    I will close this thread , Please create a new topic for any further queries.
    Regards

Viewing 11 posts - 1 through 11 (of 11 total)
  • The question ‘Course Register Button’ is closed to new replies.