<?php
/*
  $Id: shopping_cart.php,v 1.16 2002/06/11 19:49:52 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2001 osCommerce

  Released under the GNU General Public License
*/
?>
<!-- shopping_cart //-->
<TR>
<td>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
                    <TBODY>
                    <TR>
                      <TD colSpan=3 width="135" align="right"><a href="shopping_cart.php"><IMG alt=shopping cart
                       src="images/shopbox.gif" border=0></a></TD></TR>

                      <TD vAlign="top" width="212" align="center">
                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0
                              cellPadding=0 width="100%" border=0>
                                <TBODY>

                                <TR>

                      <TD>
<?php
  $cart_contents_string = '';
  if ($cart->count_contents() > 0) {
    $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
    $products = $cart->get_products(); // $products[$i]['id'] .. $products[$i]['name'] .. $products[$i]['quantity']
    for ($i=0; $i<sizeof($products); $i++) {
      $cart_contents_string .= '<tr class="contents"><td align="right" valign="top">';

      if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
        $cart_contents_string .= '<span>'; // highlight product quantity
      } else {
        $cart_contents_string .= '<span>';
      }

      $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;</span></td><td valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id'], 'NONSSL') . '"class="pagenavi">';

      if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
        $cart_contents_string .= '<span class="newItemInCart">'; // highlight product name
      } else {
        $cart_contents_string .= '<span>';
      }

      $cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>';

      if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
        tep_session_unregister('new_products_id_in_cart');
      }
    }
    $cart_contents_string .= '</table>';
  } else {
    $cart_empty = 1;
    $cart_contents_string .= BOX_SHOPPING_CART_EMPTY;
  }

  $info_box_contents = array();
  $info_box_contents[] = array('align' => 'left',
                               'text'  => $cart_contents_string
                              );

  if (!$cart_empty) {
    $info_box_contents[] = array('align' => 'left',
                                 'text' => tep_draw_separator()
                           );
    $info_box_contents[] = array('align' => 'right',
                                 'text'  => $currencies->format($cart->show_total())
                                );
  }

  new rightBox($info_box_contents);
?></TD>
                    </TR>
                                </TBODY></TABLE></TD></TR></TBODY></TABLE></TD>

      <TD
                      width="7" height="1"><IMG
                        height=1
                        src="images/pixel_trans.gif"
                        width=6></TD>
    </TR>
                    <TR>
                      <TD colSpan=3 valign="top"></TD></TR></TBODY></TABLE>
       </tr>

<!-- shopping_cart_eof //-->