Jump to content

Registration/Login Pop up (fancybox)


sandokan71

Recommended Posts

Hello everyone,

 

I would like to simplify how existing or new customers login to their account or create a new account opening just a pop window in a fancy box.

 

To see a working example please have a look at http://www.menlook.co.uk/ (created with prestashop !) and click on "my account" (on the topleft of the page).

 

It's exactly what I'm looking for and I wonder if anyone tried this before or knows how to proceed to have it working the same way.

 

Thanks....

Link to comment
Share on other sites

Hello everyone,

 

I would like to simplify how existing or new customers login to their account or create a new account opening just a pop window in a fancy box.

 

To see a working example please have a look at http://www.menlook.co.uk/ (created with prestashop !) and click on "my account" (on the topleft of the page).

 

It's exactly what I'm looking for and I wonder if anyone tried this before or knows how to proceed to have it working the same way.

 

Thanks....

 

I use this on my blockmyaccountfooter.tpl(modules/blockmyaccountfooter)

i add this code here:

 

<div class="block myaccount">

<h4><a class="various" data-fancybox-type="iframe" href="http://yoursite/authentication.php?content_only=1">My Account</a></h4>

<script type="text/javascript">

$(document).ready(function() {

$(".various").fancybox({

maxWidth : 800,

maxHeight : 600,

fitToView : false,

width : '70%',

height : '70%',

autoSize : false,

closeClick : false,

openEffect : 'none',

closeEffect : 'none'

});

});

</script>

 

then in classess/FrontController.php you should edit

replace global$cookie with this code:

global $cookie;

 

Tools::addCSS(_THEME_CSS_DIR_.'global.css', 'all');

/*am adaugat*/

Tools::addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css');

/**/

Tools::addJS(array(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js',

_PS_JS_DIR_.'jquery/jquery.easing.1.3.js',

_PS_JS_DIR_.'tools.js',

/*am adaugat*/

_PS_JS_DIR_.'jquery/jquery.fancybox-1.3.4.js'

/**/

));

if (Tools::isSubmit('live_edit') AND Tools::getValue('ad') AND (Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_)))

{

Tools::addJS(array(

_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js',

_PS_JS_DIR_.'jquery/jquery.fancybox-1.3.4.js',

_PS_JS_DIR_.'hookLiveEdit.js')

);

Tools::addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css');

}

 

Now it should work!

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...
  • 2 months later...
  • 11 months later...

Hi Vekia,

do you have any solution for ps 1.5.5?

 

hello

 

sorry for bothering, but can you please write here in english? not everyone know French here :(

 

sorry :)

 

any solution for prestashop 1.5 .5 ?

 

thanks

Link to comment
Share on other sites

yes, all my friend say that...i know my server  host is only for Indonesian country, so very slowly to open in other country.

 

here i show you how to make popup login, i use theme from leotheme and i don't know for the default theme or other theme work or not.

 

1. open yourdomain.com/themes/modules/blockuserinfo/blockuserinfo.tpl

 

change:

<a href="yourdomain.com/my-account" class="login">Log in</a>

 

to

<a href="#" id="popme" class="login">Log in</a>

 

2.open domain/themes/footer.tpl

add this before </head>

{if $page_name != 'authentication'}
<script type="text/javascript">{literal}
$(document).ready(function(){
$('#popme').click(function(e){
e.preventDefault();
$.fancybox({
'scrolling' : 'no',
'type' : 'inline',
'autoSize' : false,
'width' : 611,
'height' : 516,
'href' : '#popupLogin'
});
return false;
});
 
});
{/literal}
</script>
<div style="display:none" >
<div id="popupLogin" >
<div id="popuplogincontainer" >
<div id="popuploginbox" >
<form action="{$link->getPageLink('authentication', true)|escape:'html'}" method="post" id="login_form" class="popuploginform">
<fieldset>
<h3>Login</h3>
<div class="form_content clearfix">
<p class="text">
<label for="email">{l s='Email address'}</label>
<span><input type="text" id="email" name="email" value="" class="account_input" /></span>
</p>
<p class="text">
<label for="passwd">{l s='Password'}</label>
<span><input type="password" id="passwd" name="passwd" value="" class="account_input" /></span>
</p>
<p class="lost_password"><a href="{$link->getPageLink('password')|escape:'html'}" title="{l s='Recover your forgotten password'}" rel="nofollow">{l s='Forgot your password?'}</a></p>
<p class="submit">
<input type="hidden" class="hidden" name="back" value="history" /> <input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="{l s='Authentication'}" />
</p>
</div>
</fieldset>
<hr/>
<h3>{l s='No account yet ?'}</h3>
<div class="form_content clearfix">
<p class="text">
{l s='Create account for FREE'}
</p>
<p style="text-align:right">
<a class="button">{l s='Create my account now'}</a>
</p>
</div>
<hr/>
</form>
</div>
</div>
</div>
</div>
{/if}
 
3.open global.css in your theme and add this in the last page
#popupLogin { padding:0;margin: 0; width: 611px; height:516px; background:url(../../../img/bg.jpg) no-repeat;}
#popuplogincontainer { width:100%; overflow: hidden;}
#popuploginbox { width:300px; float:left; background-color: #f9f9f9;}
#popuploginbox hr { margin-bottom: 10px; border: 0; border-top: 1px solid #eeeeee;border-bottom: 1px solid #ccc;}
.popuploginform { padding: 10px 0 0 10px;width:243px;height: 365px;}
 
4.upload background whatever you like ,,,,,in yourdomain/img/bg.jpg
 
and done!
  • Like 1
Link to comment
Share on other sites

  • 3 years later...

How to continue working in a popup for differents steps, like password retrieve and register new customer?

 

Looking @ElangLiar code im able to open password retrieve link in a popup, but submit button doesn´t work like espected.

 

Thanks, regards.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...