Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Info box help


KJ666

Recommended Posts

Right i have this in a info box.

What i want is for it to say login (if not logged in) and if logged in, say my account.

At the moment it says both all the time.

 

 

<!-- information //-->
	  <tr>
		<td>
<?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_CREATE_ACCOUNT, '', 'SSL') . '">' .
//		  BOX_INFO_CREATE_ACCOUNT . '</a><br>
//' .
'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFO_LOGIN . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFO_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFO_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFO_CHECKOUT . '</a>'




);



 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

Link to comment
Share on other sites

Hi. Try this:

 

<!-- information //-->
	  <tr>
		<td>
<?php

 if(tep_session_is_registered('customer_id')){
  $box_heading = "my account";
 }else{
  $box_heading = "login";
 }

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

 new infoBoxHeading($info_box_contents, false, false);

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

//   '<a href=" ' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' .
//		  BOX_INFO_CREATE_ACCOUNT . '</a><br>
//' .
'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFO_LOGIN . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFO_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFO_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFO_CHECKOUT . '</a>'




);



 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

 

You may want to change this so you put the if signed in, else ... logic in the relevant language file so you do the define BOX_HEADING_INFORMATION accordingly.

Joe

 

MacMan strikes again!

 

Always backup first before listening to me!

Link to comment
Share on other sites

What i would like is if you look at my site:

Click here

 

If you look on the left i would like it not to say my account unless you are logged in, and if your not logged in, I would like it to say login but no my account.

Link to comment
Share on other sites

Ummm i suck lol Where have i gone wrong ?

 

<?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' => 



if (tep_session_is_registered('customer_id')) {
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFO_MY_ACCOUNT . '</a><br>
' .
}
else {
'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFO_LOGIN . '</a><br>
' .
}

'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFO_CART_CONTENTS . '</a><br>
' .

'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFO_CHECKOUT . '</a>'

);



 new infoBox($info_box_contents);
?>

Link to comment
Share on other sites

I dont know why all that code is needed.

 

This does the trick

 

   <?php


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


<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL') ?>">My Account</a><br> <? }

else { ?>

<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL') ?>">Login</a><br> <? }
?>

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') ?>">Your Cart</a><br>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') ?>">Checkout</a>

Link to comment
Share on other sites

Ummm i thought that would work, but it has not, am i right in thinking there is a extra ?> ??

 

<?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' => 

<?php

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


<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL') ?>">My Account</a><br> <? }

else { ?>

<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL') ?>">Login</a><br> <? }
?>

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') ?>">Your Cart</a><br>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') ?>">Checkout</a>


);

 new infoBox($info_box_contents);
?>

Link to comment
Share on other sites

Delete all the contents you had before, and paste the new ones in.

 

This is your only content

 

<?php

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


<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL') ?>">My Account</a><br> <? }

else { ?>

<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL') ?>">Login</a><br> <? }
?>

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') ?>">Your Cart</a><br>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') ?>">Checkout</a>


);

Link to comment
Share on other sites

THank you, that works, but i have lost the formating for the text ??

 

<!-- information //-->
	  <tr>
		<td>
<?php 
 if (tep_session_is_registered('customer_id')) 
{  ?> <a href=" <?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL') ?> ">Logout</a><br>


<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL') ?>">My Account</a><br> <? }

else { ?>

<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL') ?>">Login</a><br> <? }
?>

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') ?>">Your Cart</a><br>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') ?>">Checkout</a>
<br><br>
		</td>
	  </tr>
<!-- information_eof //-->

Link to comment
Share on other sites

Cant i just add the formating all the other boxes go under ?? Somthing to do with this i took out, no way i can re place it ?

Cant remember what the formating and stuff is for the other boxes.

 

  $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' =>

Link to comment
Share on other sites

	 <?php


 if (tep_session_is_registered('customer_id')) 
{  ?> <a  href=" <?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL') ?> "><div style="font: Calibri; color: 000; font-size:12px;">Logout</div></a><br>


<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">My Account</div></a><br> <? }

else { ?>

<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">Login</div></a><br> <? }
?>

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">Your Cart</div></a><br>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">Checkout</div></a>

Link to comment
Share on other sites

Wrap it in a table, increase/decrease padding-left to suit.

  <table width="100%" ><tr><td style="padding-left:20px;">	<?php


 if (tep_session_is_registered('customer_id')) 
{  ?> <a  href=" <?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL') ?> "><div style="font: Calibri; color: 000; font-size:12px;">Logout</div></a><br>


<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">My Account</div></a><br> <? }

else { ?>

<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">Login</div></a><br> <? }
?>

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">Your Cart</div></a><br>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') ?>"><div style="font: Calibri; color: 000; font-size:12px;">Checkout</div></a>



</td></tr></table>

Link to comment
Share on other sites

  • 3 weeks later...

adding the same function to my forum, have a small issue with something, i obviously didnt do it correctly.. any help appreciated..

 

<?php
/*
 $Id: information.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php

 if(tep_session_is_registered('customer_id')){
  $box_heading = "Account";
 }else{
  $box_heading = "Account";
 }

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

 new infoBoxHeading($info_box_contents, false, false);

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

?>

<?php

 if (tep_session_is_registered('customer_id')) {

?>

'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

<?php

  }

  else {

?>

'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>'




);

<?php

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

Link to comment
Share on other sites

This section is wrong

 

 

 

if(tep_session_is_registered('customer_id')){
  $box_heading = "Account";
 }else{
  $box_heading = "Account";
 }

 

will always give "Account";

 

 

better writtten as:

 

$box_heading = (tep_session_is_registered('customer_id') ? 'Account' : 'Log In');

 

then

 

<?php

 if (tep_session_is_registered('customer_id')) {

?>

'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

<?php

  }

  else {

?>

'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>'




);

<?php

 new infoBox($info_box_contents);
?>

 

 

is all messed up, try

 

 

 

<?php

 if (tep_session_is_registered('customer_id')) {


'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

  } else {


'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .   }

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>');

 new infoBox($info_box_contents);
?>

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

This section is wrong

 

 

 

if(tep_session_is_registered('customer_id')){
  $box_heading = "Account";
 }else{
  $box_heading = "Account";
 }

 

will always give "Account";

 

 

better writtten as:

 

$box_heading = (tep_session_is_registered('customer_id') ? 'Account' : 'Log In');

 

then

 

<?php

 if (tep_session_is_registered('customer_id')) {

?>

'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

<?php

  }

  else {

?>

'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>'




);

<?php

 new infoBox($info_box_contents);
?>

 

 

is all messed up, try

 

 

 

<?php

 if (tep_session_is_registered('customer_id')) {


'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

  } else {


'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .   }

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>');

 new infoBox($info_box_contents);
?>

 

 

much thanks for the reply. yeah im sure i butchered that code.. my poor attempt to make it work.. i took the code you suggested and an error is still showing.. http://www.syzmicrecords.com/distro the code is coming from includes/boxes/my_account.php . a file i created for this specific function of a login box.. much thanks

 

<?php
/*
 $Id: information.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php

 if(tep_session_is_registered('customer_id')){
  $box_heading = (tep_session_is_registered('customer_id') ? 'Account' : 'Log In');
 }

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

 new infoBoxHeading($info_box_contents, false, false);

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

?>

<?php

 if (tep_session_is_registered('customer_id')) {


'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

  } else {


'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .   }

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>');

 new infoBox($info_box_contents);
?>

		</td>
	  </tr>
<!-- information_eof //-->

Link to comment
Share on other sites

If someone give u replacement code, use it exaclty as given don`t change it!!!

 

I said:

 

if(tep_session_is_registered('customer_id')){
  $box_heading = "Account";
 }else{
  $box_heading = "Account";
 }

 

better writtten as:

 

$box_heading = (tep_session_is_registered('customer_id') ? 'Account' : 'Log In');

 

so u re-wrote that as:

 

 if(tep_session_is_registered('customer_id')){
  $box_heading = (tep_session_is_registered('customer_id') ? 'Account' : 'Log In');
 }

 

WHY? Then complain it don`t work!!!!!

 

 

ps error further down

 

change:

 

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

?>

<?php

 if (tep_session_is_registered('customer_id')) {


'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

  } else {


'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .   }

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>');

 new infoBox($info_box_contents);
?>

 

to:

 

if (tep_session_is_registered('customer_id')) {

$logmess =   '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .  BOX_INFORMATION_LOGOFF . '</a><br>';

  } else {

 $logmess =   '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .  BOX_INFORMATION_LOGIN . '</a><br>';	}


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

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>');

 new infoBox($info_box_contents);
?>

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

If someone give u replacement code, use it exaclty as given don`t change it!!!

 

I said:

 

if(tep_session_is_registered('customer_id')){
  $box_heading = "Account";
 }else{
  $box_heading = "Account";
 }

 

better writtten as:

 

$box_heading = (tep_session_is_registered('customer_id') ? 'Account' : 'Log In');

 

so u re-wrote that as:

 

 if(tep_session_is_registered('customer_id')){
  $box_heading = (tep_session_is_registered('customer_id') ? 'Account' : 'Log In');
 }

 

WHY? Then complain it don`t work!!!!!

 

 

ps error further down

 

change:

 

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

?>

<?php

 if (tep_session_is_registered('customer_id')) {


'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGOFF . '</a><br>
' .

  } else {


'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
	   BOX_INFORMATION_LOGIN . '</a><br>
' .   }

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>');

 new infoBox($info_box_contents);
?>

 

to:

 

if (tep_session_is_registered('customer_id')) {

$logmess =   '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .  BOX_INFORMATION_LOGOFF . '</a><br>';

  } else {

 $logmess =   '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .  BOX_INFORMATION_LOGIN . '</a><br>';	}


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

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
	   BOX_INFORMATION_MY_ACCOUNT . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
	   BOX_INFORMATION_CART_CONTENTS . '</a><br>
' .
'<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
		BOX_INFORMATION_CHECK_OUT . '</a>');

 new infoBox($info_box_contents);
?>

 

spooks, you are correct it was a mistake on my side. i mis-interperted the paste position of the code. it's working now beautifly.. much thanks..

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...