Jump to content

Recommended Posts

This module opens a modal instead of login.php whenever use clicks the link

Upload and install the footer_suffix module

Thanks a million to  JcMagpie for all. The help or it would not be possible

https://apps.oscommerce.com/rDkyf&modal-login

tested one4&5 

Edited by hungryfrank

Share this post


Link to post
Share on other sites
1 hour ago, hungryfrank said:

This module opens a modal instead of login.php whenever use clicks the link

Upload and install the footer_suffix module

Thanks a million to  JcMagpie for all. The help or it would not be possible

https://apps.oscommerce.com/rDkyf&modal-login

tested one4&5 

Just to let potential users know that although my name is linked to these addons, they are nothing to do with me.
OP refuses to engage in meaningful and polite conversation regarding removal of my name from these addons.


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites
2 hours ago, hungryfrank said:

Thanks a million to  JcMagpie for all. The help or it would not be possible

@hungryfrank 

No thanks needed, all I did was give a few pointers, you managed to figure it out and get it working on your own. Not bad not bad at all.....


 

Share this post


Link to post
Share on other sites
1 minute ago, JcMagpie said:

@hungryfrank 

No thanks needed, all I did was give a few pointers, you managed to figure it out and get it working on your own. Not bad not bad at all.....

thank u for all the help.

Share this post


Link to post
Share on other sites

Great add-on!

I notice that when first logging in, the normal login.php page appears first as usual. The modal will only pop up later when a login link or button is clicked. Would not it be nicer if it will just pop up whenever it is demanded? For example when a new user tries to check out?

Share this post


Link to post
Share on other sites
17 minutes ago, kgtee said:

Great add-on!

I notice that when first logging in, the normal login.php page appears first as usual. The modal will only pop up later when a login link or button is clicked. Would not it be nicer if it will just pop up whenever it is demanded? For example when a new user tries to check out?

the new customer is not logging he is registering. . I am working on a combo register login page as part of a two page checkout that is almost ready

Share this post


Link to post
Share on other sites
6 hours ago, kgtee said:

I notice that when first logging in, the normal login.php page appears first as usual.

Yes this is an issue that needs to be looked into, how ever I did my testing on 1.0.5.1 and that has a problem with login as it is so was not able to dig any deeper. I can only speek for my fresh in stall of a few days ago but on fist load of site the login brakes the site you just get a white page. It must have somthing to do with bad redirects as all you see is this

image.png.a8df46b3d57f0e1525552f01894e408e.png

When you refresh the page it works as normal. However if you clear your cache and goto site again it will again crash if login is the first thing you do. It's fine if you click somthing else first and then go into login.

This happens both with and without this add-on. So need to get ot the bottom of this bad redirect first.

May be linked to Use Search-Engine Safe URLs not sure , only geting this error when this happens.

 thrown in /home/redacted/public_html/includes/application_top.php on line 107
[28-Feb-2020 07:43:05 Europe/London] PHP Fatal error:  Uncaught Error: Call to undefined function do_magic_quotes_gpc() in /home/redacted/public_html/includes/application_top.php:107
Stack trace:
#0 /home/redacted/public_html/login.php(13): require()
#1 {main}
  thrown in /home/redacted/public_html/includes/application_top.php on line 107

 

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites
7 hours ago, kgtee said:

I notice that when first logging in, the normal login.php page appears first as usual.

Set you force cookies to true and it will activate popup on first try.


 

Share this post


Link to post
Share on other sites
11 hours ago, kgtee said:

Great add-on!

I notice that when first logging in, the normal login.php page appears first as usual. The modal will only pop up later when a login link or button is clicked. Would not it be nicer if it will just pop up whenever it is demanded? For example when a new user tries to check out?

thank you for noticing this.i think that I have found a solution.

please backup all of your files just incase. this is very important. 

in hooks/sitewide/loginpopout.php

change 

 $this->siteend .= "       <script>
          $(document).ready(function() {
$('a[href$=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
});
</script>";

to 

  
    $this->siteend .= "       <script>
$('a[href*=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});

</script>";

this should make it work with or without cid 

I am testing it so if you want to try it out to let me know it would be great

Share this post


Link to post
Share on other sites

@hungryfrankI haven't read through this thread but I am wondering if you are aware of this addon? Here is the support thread. I've been using it for years and it works great. I think I had to adjust the code due to how Phoenix loads jquery but that's all. Just thought I would mention it to save the reinvention. Your code may be better so it would be interesting if you had time to compare them.

Share this post


Link to post
Share on other sites
On 2/28/2020 at 5:20 PM, Jack_mcs said:

@hungryfrankI haven't read through this thread but I am wondering if you are aware of this addon? Here is the support thread. I've been using it for years and it works great. I think I had to adjust the code due to how Phoenix loads jquery but that's all. Just thought I would mention it to save the reinvention. Your code may be better so it would be interesting if you had time to compare them.

just playing around 

Share this post


Link to post
Share on other sites

hi Hungryfrank,

Thank you for this addon ;)

i try to use this modal in other page like "shopping_cart.php" with the "confirm order" 's button.

Work fine with this modification in "loginpopout.php" :

	  function listen_injectSiteEnd() {
	  if (!tep_session_is_registered('customer_id')) {
	     $this->siteend .= "       <script>
$('a[href*=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	
$('a[href*=\"checkout_shipping.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	</script>";
  }else{
     $this->siteend .= "       <script>
$('a[href*=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	</script>";
  }
	

 

Now i'll try to use addon with contact_us.php

In contact_us.php

After  "require('includes/application_top.php');"

add

	  if (!tep_session_is_registered('customer_id')) {
    $navigation->set_snapshot();
    tep_redirect(tep_href_link('login.php', '', 'SSL'));
  }
	

and in loginpopout.php

after

if (!tep_session_is_registered('customer_id')) {

     $this->siteend .= "       <script>
$('a[href*=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});

add

	$('a[href*=\"contact_us.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	

But something wrong because after login back to index page and not to contact_us page.

What do you thing about that.

Have fun

 

Share this post


Link to post
Share on other sites
2 hours ago, hugo_064 said:

hi Hungryfrank,

Thank you for this addon ;)

i try to use this modal in other page like "shopping_cart.php" with the "confirm order" 's button.

Work fine with this modification in "loginpopout.php" :

 


	  function listen_injectSiteEnd() {
	  if (!tep_session_is_registered('customer_id')) {
	     $this->siteend .= "       <script>
$('a[href*=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	
$('a[href*=\"checkout_shipping.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	</script>";
  }else{
     $this->siteend .= "       <script>
$('a[href*=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	</script>";
  }
	

 

Now i'll try to use addon with contact_us.php

In contact_us.php

After  "require('includes/application_top.php');"

add

 


	  if (!tep_session_is_registered('customer_id')) {
    $navigation->set_snapshot();
    tep_redirect(tep_href_link('login.php', '', 'SSL'));
  }
	

 

and in loginpopout.php

after

if (!tep_session_is_registered('customer_id')) {

     $this->siteend .= "       <script>
$('a[href*=\"login.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});

add

 


	$('a[href*=\"contact_us.php\"]').on( \"click\", function(e) {
e.preventDefault();
   $('#LoginModal').modal('show');
});
	

 

But something wrong because after login back to index page and not to contact_us page.

What do you thing about that.

Have fun

 

the form returns to the login.php, and you are not in contact_us.php.

maybe  you can have the model to open onload. but then u can't check if the customer is logged in. 

Share this post


Link to post
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

×