Okay
  Public Ticket #3437467
How to inter membership option page into other page?
Closed

Comments

  •  4
    Martin started the conversation

    How to inter membership option page into other any public page?

  •  2,591
    WebWizards replied

    Hi Martin,


    You can call this PHP code to add it to a page:

    wp_enqueue_style('marketking_dashboard3', MARKETKINGCORE_URL.'public/dashboard/assets/css/dashlite.css', $deps = array());
        marketking()->set_data( 'user_id', get_current_user_id() );
        echo marketkingpro()->get_page('memberships');
    

    If you want to use a shortcode you can use:

    add_shortcode('marketking_memberships', function(){
        ob_start();
        wp_enqueue_style('marketking_dashboard3', MARKETKINGCORE_URL.'public/dashboard/assets/css/dashlite.css', $deps = array());
        marketking()->set_data( 'user_id', get_current_user_id() );
        echo marketkingpro()->get_page('memberships');
        return ob_get_clean();
    });
    

    and then

    [marketking_membershisp]

    It will load all the styles of the dashboard on that page - that is the main issue to deal with, as it will affect the design of the page.


    Kind regards,

    Stefan

  •  4
    Martin replied

    Thanks for help, and it works. But has 2 issues as:

    (1) how to get separate package link, where links on the page sample, click the link direct to payment if has the account.

    (2) currently the membership shows for account user only, may need to consider about:

    ------ from membership selection page

    a) direct to register account if new visitor;

    b) enable vendor dashboard if registered user paid membership. currently existing vendor, then pay membership

  •  2,591
    WebWizards replied

    Hi again,

    (1) To get a separate link for each package, I think the only solution is with some custom code to generate each package - our functions only show the entire page.


    (2)

    a) direct to register account if new visitor;

    b) enable vendor dashboard if registered user paid membership. currently existing vendor, then pay membership

    I see your point, and thank you for the feedback.

    We will consider an option for this in future updates, however it is quite difficult to implement a different flow here.

    At least for now, I think the best solution is:

    -> If user is logged out, the 'buy subscription' button goes to "Register an account"

    -> If user is logged in, the button works normally.