• Resolved sirjonan

    (@sirjonan)


    hello, how could I to show in a page the login form directly without to create the login button??

    For example, I someone buys a product, after that I want to show the login form, not a button to show the popup. The popup for me is just useful to see on the top menu.

    Thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor xootixsupport

    (@xootixsupport)

    Hi @sirjonan

    Sorry, I don’t understand what you are trying to do.
    You want to trigger the popup on some event?

    Thread Starter sirjonan

    (@sirjonan)

    hello, I want to show the form, not popup effect. Imagine situation, I buy a product but I am not logged, then should show the page with the form login directly, not a link login to trigger the popup. to trigger popup is useful for the top menu.

    Thread Starter sirjonan

    (@sirjonan)

    It’s a very typical on the purchase woocommerce. Someone select a product but still is not logged, then it shows the myaccount page but with the form login/ form register usually. But here, at least, I don’t know if there is a shortcode which shows directly the form login instead of the link loggin which trigger popup.

    I just use trigger popup on my top menu.

    In summary, I have two scenarios:
    -user can login/register by top menu through popup.
    -user after select a product, in case still not loggin, it shows the myaccount page with login/register form, but I don’t know how to do it, usually it would be very easy through a shortcode…

    Plugin Contributor xootixsupport

    (@xootixsupport)

    [xoo_el_form_in_page] shortcode for adding form in a page.
    In functions.php

    function xoo_el_form_in_page(){
    
    	//Return if user is logged in
    	if( is_user_logged_in() ) return;
    
    	//Wrap it outside container to differentiate it from the popup markup
    	$html  = '<div class="xoo-el-inpage-form">';
    	ob_start();
    	wc_get_template('xoo-el-popup.php',array(),'',XOO_EL_PATH.'/templates/');
    	$html .= ob_get_clean();
    	$html .= '</div>';
    	return $html;
    
    }
    add_shortcode('xoo_el_form_in_page','xoo_el_form_in_page');
    

    CSS

    
    .xoo-el-inpage-form .xoo-el-container {
        visibility: visible;
        display: block;
    }
    
    .xoo-el-inpage-form .xoo-el-opac {
        opacity: 0;
        display: none;
    }
    .xoo-el-inpage-form .xoo-el-close{
        display: none;
    }
    
    .xoo-el-inpage-form .xoo-el-modal {
        position: relative;
        opacity: 1;
        transform: scale(1);
    }
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘show login form in page’ is closed to new replies.