Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Editing header and encountered problem


deathgod

Recommended Posts

I am editing my header so that the images are in-line with the text links. Go towww.gameportal.co.za have a look at what i mean if you don't understand.

 

And I get it perfect at first but when a user logs in, the log out text link messes the entire design. I tried to solve it myself but my skill with php is limited. Here is what i managed to do:

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td width="60%" align="left" class="headerNavigation">  <?php if (tep_session_is_registered('customer_id')) { ?><?php echo $breadcrumb->trail(' » '); ?></td>
<td width="70%" align="left" class="headerNavigation">  <?php } ?><?php echo $breadcrumb->trail(' » '); ?></td>
<td width="10%" align="center" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a></td>
<td width="10%" align="center" class="headerNavigation"><?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></td>
<td width="10%" align="center" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></td>
<td width="10%" align="center" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a></td>
 </tr>
</table>

 

Any suggestions? View this in notepad to make the code clearer. I am trying to make it so breadcrumb cell shrinks to 60% width when a customer is logged in.

 

I appreciate any help

Nick

Menou and unome

Link to comment
Share on other sites

I haven't been able to figure out a solution to the php code but i have been able to figure out a workaround, tried and tested. you will just have to do a bit of work. pm me if you have troubles following what i have said.

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td width="60%" align="left" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'osStore.gif', 'osStore powered by gameportal.co.za') . '</a>'; ?></td>

<td width="10%" align="center" valign="bottom"><?php if (tep_session_is_registered('customer_id')) { echo '<a href="' . tep_href_link(FILENAME_LOGOFF) . '">' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif', HEADER_TITLE_LOGOFF) . '</a>'; ?></td>

<td width="10%" align="center" valign="bottom"><?php } ?><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>'; ?></td>

<td width="10%" align="center" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>'; ?></td>

<td width="10%" align="center" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?></td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="headerNavigation">

<td width="60%" align="left" class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

<td width="10%" align="center" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a></td>

<td width="10%" align="center" class="headerNavigation"><?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></td>

<td width="10%" align="center" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></td>

<td width="10%" align="center" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a></td>

</tr>

</table>

 

FILENAME_LOGOFF is already set to logoff.php in catalog/includes/filenames.php so no extra work

HEADER_TITLE_LOGOFF is already set as alt text Logoff in catalog/includes/languages/english.php as well. i don't know about the other languages but i think they should be as well. I don't know if this would qualify as a contribution.

Nick

Menou and unome

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...