Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Code help!


seiern

Recommended Posts

Im new to PHP, and i need help to get this code working inside a box:

 

<?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> ?|? <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> ?|? <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> ?|? <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>

 

-------------------------------------------------------------------------------------------------------

My box(navigator_customer.php) need the code to work inside the box (**** CODE INSIDE HERE ****)

 

<?php

?>

<!-- information //-->

<tr>

<td>

<?php

$info_box_contents = array();

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

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' =>**** CODE INSIDE HERE ****);

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- information_end //-->

 

---------------------------------------------------------------------------------------------

Best regards

Jan

Link to comment
Share on other sites

Try

 

<!-- information //-->
<tr>
<td>
<?php
$text = '';
if (tep_session_is_registered('customer_id')) {
$text .= '<a href="'.tep_href_link(FILENAME_LOGOFF, '', 'SSL').'" class="headerNavigation">'.HEADER_TITLE_LOGOFF.'</a>  | ';
}
$text .= '<a href="'.tep_href_link(FILENAME_ACCOUNT, '', 'SSL').'" class="headerNavigation">'.HEADER_TITLE_MY_ACCOUNT.'</a>  |  <a href="'.tep_href_link(FILENAME_SHOPPING_CART).'" class="headerNavigation">'.HEADER_TITLE_CART_CONTENTS.'</a>  |  <a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL').'" class="headerNavigation">'.HEADER_TITLE_CHECKOUT.'</a>';

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

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => $text);
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- information_end //-->

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

@kgt

THX alot, that works :thumbsup:

 

I need to combine the code underneth with the code that you made for me, i want the images to align to the left of each txt link

 

tep_image(DIR_WS_IMAGES . 'header_account.gif'

tep_image(DIR_WS_IMAGES . 'header_cart.gif'

tep_image(DIR_WS_IMAGES . 'header_checkout.gif'

 

Once again many thx

 

Best regards

Jan

Link to comment
Share on other sites

No help needed! Got it working :)

 

<!-- information //-->

<tr>

<td>

<?php

$text = '';

if (tep_session_is_registered('customer_id')) {

$text .= '<a href="'.tep_href_link(FILENAME_LOGOFF, '', 'SSL').'" class="customerNavigation">'. tep_image(DIR_WS_IMAGES . 'header_logout.gif') . HEADER_TITLE_LOGOFF.'</a><br>';

}

$text .= '<a href="'.tep_href_link(FILENAME_ACCOUNT, '', 'SSL').'" class="customerNavigation">'. tep_image(DIR_WS_IMAGES . 'header_account.gif'). HEADER_TITLE_MY_ACCOUNT.'</a><br><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'" class="customerNavigation">'. tep_image(DIR_WS_IMAGES . 'header_cart.gif') . HEADER_TITLE_CART_CONTENTS.'</a><br><a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL').'" class="customerNavigation">'. tep_image(DIR_WS_IMAGES . 'header_checkout.gif'). HEADER_TITLE_CHECKOUT.'</a>';

 

$info_box_contents = array();

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

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => $text);

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- information_end //-->

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...