Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Make logout confirmation page? How to?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 02-15-2007, 11:22 AM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default Re: Make logout confirmation page? How to?

I tried a few more times to implement this and still no luck, I cannot get the logout confirmation page to work into/look like the rest of my site. Please help...
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
  #12  
Old 02-20-2007, 10:56 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Make logout confirmation page? How to?

Just make the logout page an embedded static page.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #13  
Old 02-20-2007, 07:05 PM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default Re: Make logout confirmation page? How to?

Smart! I cannot believe I did not think about that. You are great!
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
  #14  
Old 02-23-2007, 05:55 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Make logout confirmation page? How to?

Has anyone tried to make this work for 4.1.x ?

The code in post #6 (and #9) is not appropriate for 4.1

Any ideas? Thanks.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #15  
Old 02-23-2007, 06:08 PM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: Make logout confirmation page? How to?

Quote:
Originally Posted by carpeperdiem
Has anyone tried to make this work for 4.1.x ?

The code in post #6 (and #9) is not appropriate for 4.1

Any ideas? Thanks.

Jeremy

In include/login.php replace

PHP Code:
if ($old_login_type == 'C') {
    if (!empty(
$HTTP_REFERER) && (strncasecmp($HTTP_REFERER$http_locationstrlen($http_location)) == || strncasecmp($HTTP_REFERER$https_locationstrlen($https_location)) == 0)) {
        if (
strpos($HTTP_REFERER"mode=order_message") === false &&
            
strpos($HTTP_REFERER"mode=wishlist") === false &&
            
strpos($HTTP_REFERER"bonuses.php") === false &&
            
strpos($HTTP_REFERER"returns.php") === false &&
            
strpos($HTTP_REFERER"orders.php") === false &&
            
strpos($HTTP_REFERER"giftreg_manage.php") === false &&
            
strpos($HTTP_REFERER"order.php") === false &&
            
strpos($HTTP_REFERER"register.php?mode=delete") === false &&
            
strpos($HTTP_REFERER"register.php?mode=update") === false) {
            
func_header_location($redirect_to.strrchr($HTTP_REFERER"/"), false);
        }
    }


with the

PHP Code:
if ($old_login_type == 'C') {
func_header_location($redirect_to."/mynewlogoutpage.php");
/*
    if (!empty($HTTP_REFERER) && (strncasecmp($HTTP_REFERER, $http_location, strlen($http_location)) == 0 || strncasecmp($HTTP_REFERER, $https_location, strlen($https_location)) == 0)) {
        if (strpos($HTTP_REFERER, "mode=order_message") === false &&
            strpos($HTTP_REFERER, "mode=wishlist") === false &&
            strpos($HTTP_REFERER, "bonuses.php") === false &&
            strpos($HTTP_REFERER, "returns.php") === false &&
            strpos($HTTP_REFERER, "orders.php") === false &&
            strpos($HTTP_REFERER, "giftreg_manage.php") === false &&
            strpos($HTTP_REFERER, "order.php") === false &&
            strpos($HTTP_REFERER, "register.php?mode=delete") === false &&
            strpos($HTTP_REFERER, "register.php?mode=update") === false) {
            func_header_location($redirect_to.strrchr($HTTP_REFERER, "/"), false);
        }
    }
*/

__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
  #16  
Old 02-23-2007, 06:17 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Make logout confirmation page? How to?

Hi Eugene,

Thanks for the code. I have a slight issue in that CDSEO is installed in my store, and there is CDSEO code all over this file. I have to tread lightly. But the idea of a logout confirmation page is a good one, and I'm going to try to make this happen. I'll report back if I get it working with CDSEO.

Thanks!

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #17  
Old 02-24-2007, 04:33 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Make logout confirmation page? How to?

Jon, if you're reading this, would this edit work with CDSEO?

Code:
if ($old_login_type == 'C') { func_header_location($redirect_to."/mynewlogoutpage.php"); // Check for a CDSEO url to redirect back to if (checkforcdseo_login($HTTP_REFERER) === TRUE) { func_header_location($HTTP_REFERER, false); } /* elseif (!empty($HTTP_REFERER) && (strncasecmp($HTTP_REFERER, $http_location, strlen($http_location)) == 0 || strncasecmp($HTTP_REFERER, $https_location, strlen($https_location)) == 0)) { if (strpos($HTTP_REFERER, "mode=order_message") === false && strpos($HTTP_REFERER, "mode=wishlist") === false && strpos($HTTP_REFERER, "bonuses.php") === false && strpos($HTTP_REFERER, "returns.php") === false && strpos($HTTP_REFERER, "orders.php") === false && strpos($HTTP_REFERER, "giftreg_manage.php") === false && strpos($HTTP_REFERER, "order.php") === false && strpos($HTTP_REFERER, "register.php?mode=delete") === false && strpos($HTTP_REFERER, "register.php?mode=update") === false) { func_header_location($redirect_to.strrchr(func_qs_remove($HTTP_REFERER, $XCART_SESSION_NAME), "/"), false); } } */ }

I don't really understand why the "// Check for a CDSEO url to redirect back to" code is important, so I have no idea if this is going to help or hurt.

The reason I would like a logout confirmation: since I have "Rememebr Me" I want to make it clear to customers that may be on a public terminal, that if they logout, they are definitely logged out. A confirmation page is an obvious enhancement.

I was going to make a static embedded page, and exclude it from the help menu (by POS).

Any advice? Am I on the right track?

Thanks!

Jeremy

UPDATE: I did this edit and it seems to work. I added this line to pages_menu.tpl to exclude the static page:
Code:
{if $pages_menu[pg].orderby > 900} {else}
Works as expected.

Jon: is this going to get in the way of CDSEO? Thanks!

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #18  
Old 02-24-2007, 08:36 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Make logout confirmation page? How to?

Hi Jeremy,

No problem. You may just want to add " exit;" after func_header_location($redirect_to."/mynewlogoutpage.php"); to ensure that no further processing is done.


The code I put in for "// Check for a CDSEO url to redirect back to" was because your logout was having difficulty with the http_referrer tag used by default, but the code you are now using makes all previous logout redirect processing irrelevant.
Reply With Quote
  #19  
Old 02-24-2007, 08:52 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Make logout confirmation page? How to?

Hi Jon,

Thanks for the heads up on the "exit;"

I just tried it and it works perfectly.

So the "// Check for a CDSEO url to redirect back to..." code was something you did just for me? Wow I feel special! So I can comment it out without harm?

This is my new favorite feature of the store.

Now, someday, we'll add a login to this "logout confirmation" page, so the customer could login again from here -- and of course, SOMEDAY we'll put Remember Me code everywhere there's a potential login. Geez, I need to get a life.

How much fun is this? Thanks again.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #20  
Old 02-24-2007, 11:44 AM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: Make logout confirmation page? How to?

BTW you don't need to add exit(); after func_header_location(), because this function already has it:

PHP Code:
function func_header_location($location$keep_https true) {
    global 
$XCART_SESSION_NAME$XCARTSESSID$HTTP_COOKIE_VARS;

...

    
func_flush();
    exit();

__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:46 PM.

   

 
X-Cart forums © 2001-2020