Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add logoff link


JB04

Recommended Posts

I need to place the logoff link on every page, only when a user is logged in, when it's a guest it will not be there, I know the origanal nav bar had this but I use my own and so no longer have this one.

I understand partly but not totally, is it part or all of this code? do I need to put it where I want the link to appear?

 

<?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>

<?php echo HEADER_TITLE_LOGOFF; ?></a>

 

 

Thanks in advance for any help offered

Link to comment
Share on other sites

I need to place the logoff link on every page, only when a user is logged in, when it's a guest it will not be there, I know the origanal nav bar had this but I use my own and so no longer have this one.

I understand partly but not totally, is it part or all of this code? do I need to put it where I want the link to appear?

 

<?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>

<?php echo HEADER_TITLE_LOGOFF; ?></a>

Thanks in advance for any help offered

 

yep thats it but add <?php } ?> to the end of it, and put all that where you want the link to appear

Link to comment
Share on other sites

Hi, I have this code in the side information box, I've only put in the relevent sections to reduce the size of this post but cannot configure it to work:

 

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' =>

 

'<a href="' . tep_href_link(FILENAME_LOGOFF) . '">' . BOX_INFORMATION_LOGOFF . '</a>');

new infoBox($info_box_contents);

?>

 

How do I add the following piece you said to add, to the above?

 

<?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>

<?php echo HEADER_TITLE_LOGOFF; ?></a>

Link to comment
Share on other sites

Hi, I have this code in the side information box, I've only put in the relevent sections to reduce the size of this post but cannot configure it to work:

 

<?php

  $info_box_contents = array();

  $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 

  new infoBoxHeading($info_box_contents, false, false);

 

  $info_box_contents = array();

  $info_box_contents[] = array('text' =>

 

'<a href="' . tep_href_link(FILENAME_LOGOFF) . '">' . BOX_INFORMATION_LOGOFF . '</a>');

  new infoBox($info_box_contents);

?>

 

How do I add the following piece you said to add, to the above?

 

<?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>

<?php echo HEADER_TITLE_LOGOFF; ?></a>

 

Are you just wanting the logoff link in this box?

if so then put this in your information.php:

<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_LOGOFF) . '">' . BOX_INFORMATION_LOGOFF . '</a>');

 new infoBox($info_box_contents);
?>

Link to comment
Share on other sites

When trying to do that I get this error:

 

 

Parse error: parse error, unexpected T_STRING, expecting ')'

 

I can get it to work out of the box, but not in it, any suggestions?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...