Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need Clear Cart Button In Shopping Cart Contrib help


Recommended Posts

I just downloaded this contrib from:

 

http://www.oscommerce.com/community/contri...art+remove+item

 

and I need to convert this to a txt link instead of a button so I can use it on my client's site. You can view the site in progress at www.iszmedia.com/toomuch and I need to add the empty cart link inbetween where it says view cart and checkout, but it only says it if there's something in the cart

 

here's my code:

 

<!-- Header Cart //-->
<tr align="right"><table align="right" class="headerCart_table" width="320" border="0" cellspacing="1" cellpadding="1">
<td align="center" nowrap class="pageHeading">
<?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="pageHeading" align="center" 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>
<tr></tr>
<td align="center" class="pageHeading" nowrap>
<?php
if ($cart->count_contents() > 0) { echo "Subtotal:  ";   }
?>
</td>
<td align="center" class="pageHeading" nowrap>
<?php
	if ($cart->count_contents() > 0) { echo $currencies-> format($cart->show_total()); }
?>
</td>
<tr></tr>
<td align="left" class="pageHeading" nowrap>
<?php
	if ($cart->count_contents() > 0) {
  	  if (preg_match("/checkout/", $PHP_SELF)) {
  // do nothing
  } else {
 echo '<a href="'. tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'). '" >'. HEADER_TITLE_CART_CONTENTS .'</a>';
}
	}
?></TD>
<td align="right" class="pageHeading" 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>';
}
	}
?>
</td>
</table></tr>
<!-- Header Cart End //-->

 

any help would be greatly appreciated, my client wants to launch June 1.

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...