KJ666 Posted March 8, 2009 Share Posted March 8, 2009 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 More sharing options...
morehawes Posted March 8, 2009 Share Posted March 8, 2009 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 More sharing options...
KJ666 Posted March 8, 2009 Author Share Posted March 8, 2009 That dont work :( It is all in the same info box. Link to comment Share on other sites More sharing options...
Giovanna Posted March 8, 2009 Share Posted March 8, 2009 check your catalog\includes\languages\english.php In there you can set what you want to call certain things. Look for the BOX_INFO_XXX Link to comment Share on other sites More sharing options...
KJ666 Posted March 8, 2009 Author Share Posted March 8, 2009 Huh, whats that got to do with it ? (dont mean that in a rude way). Link to comment Share on other sites More sharing options...
burt Posted March 8, 2009 Share Posted March 8, 2009 Be more specific with what you require, none of us have Crystal Balls. Well, maybe some do. I don't. http://www.clubosc.com/if-something-do-thi...se-do-that.html Link to comment Share on other sites More sharing options...
KJ666 Posted March 8, 2009 Author Share Posted March 8, 2009 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 More sharing options...
burt Posted March 8, 2009 Share Posted March 8, 2009 See the link in my previous post ;) Link to comment Share on other sites More sharing options...
KJ666 Posted March 8, 2009 Author Share Posted March 8, 2009 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 More sharing options...
Jonojamesmac Posted March 8, 2009 Share Posted March 8, 2009 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 More sharing options...
KJ666 Posted March 8, 2009 Author Share Posted March 8, 2009 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 More sharing options...
Jonojamesmac Posted March 9, 2009 Share Posted March 9, 2009 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 More sharing options...
KJ666 Posted March 9, 2009 Author Share Posted March 9, 2009 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 More sharing options...
Jonojamesmac Posted March 9, 2009 Share Posted March 9, 2009 create a css class with styling attributes in your stylesheet.css file then change the beginning of the links from <a href to <a class="classname" href Link to comment Share on other sites More sharing options...
KJ666 Posted March 9, 2009 Author Share Posted March 9, 2009 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 More sharing options...
Jonojamesmac Posted March 9, 2009 Share Posted March 9, 2009 try <a class="infoBoxContents" Link to comment Share on other sites More sharing options...
Jonojamesmac Posted March 9, 2009 Share Posted March 9, 2009 <?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 More sharing options...
KJ666 Posted March 9, 2009 Author Share Posted March 9, 2009 That worked though one more problem (sorry about this) Click here to see If you look at the new info box, it is more to the left then the others, any idea how to get it bak in line ?? Link to comment Share on other sites More sharing options...
Jonojamesmac Posted March 9, 2009 Share Posted March 9, 2009 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 More sharing options...
KJ666 Posted March 9, 2009 Author Share Posted March 9, 2009 Thanks your a star :) Link to comment Share on other sites More sharing options...
SyzmicRecords Posted March 26, 2009 Share Posted March 26, 2009 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 More sharing options...
spooks Posted March 26, 2009 Share Posted March 26, 2009 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 More sharing options...
SyzmicRecords Posted March 26, 2009 Share Posted March 26, 2009 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 More sharing options...
spooks Posted March 26, 2009 Share Posted March 26, 2009 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 More sharing options...
SyzmicRecords Posted March 26, 2009 Share Posted March 26, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.