Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cart in header V2


tim_ver

Recommended Posts

I added the cart in header ver2 and I want the line to be in the top right corner. I got this done but all of the line are messed up.

 

It looks like this now:

 

1 item. Total price excl shipping: $222.99 Checkout

 

 

I want it to look like this:

 

1 item.

Total price excl shipping: $222.99

Checkout

 

How do I achive this?

 

 

 

 

This is the code I have now for the function in header.php:

 

 

<?php

if ($cart->count_contents() == 0) { echo "Your cart is empty"; }

else { echo "Your cart contains:   ";

//'<a href="' . tep_href_link(FILENAME_SHOPPING_CART).'">'. HEADER_TITLE_CART_CONTENTS . ': </a>';

}

?>

</td>

 

 

<td class="headerNavigation" align="left" nowrap>

<?php

if ($cart->count_contents() == 1) {echo $cart->count_contents(); echo " item.";}

if ($cart->count_contents() > 1) {echo $cart->count_contents(); echo " items.";}

?>

</td>

 

 

<td align="left" class="headerNavigation" nowrap>

<?php

if ($cart->count_contents() > 0) { echo "Total price excl shipping:  "; }

 

?>

</td>

 

 

<td align="left" class="headerNavigation" nowrap>

<?php

if ($cart->count_contents() > 0) { echo $currencies-> format($cart->show_total()); }

?>

</td>

 

 

<td align="right" class="headerNavigation" nowrap>

<?php

if ($cart->count_contents() > 0) {

if (preg_match("/checkout/", $PHP_SELF)) {

// do nothing

} else {

echo '<a href="'. tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'). '" >'. HEADER_TITLE_CHECKOUT .'</a>';

}

}

?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...