Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/07/2007, 18:54
Alejandr4
 
Fecha de Ingreso: diciembre-2006
Mensajes: 111
Antigüedad: 17 años, 5 meses
Puntos: 1
el codigo que falta 1

Como es un documento muy largo he tenido que dividirlo en tres, sigue asi:

Código PHP:
function imprime_carrito(){
        $suma = 0.00;
?>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" id="productos">
              <tr>
                <td colspan="3" bgcolor="#F5F5FF" class="cabecera_productos"><table width="100%"  border="0" cellpadding="0" cellspacing="0" id="esquina">
                  <tr>
                    <td width="17"><img src="../imag/izq_azul.gif" width="17" height="20"></td>
                    <td bgcolor="#0000FF" class="cabecera_productos"><div align="center">Referencia</div></td>
                  </tr>
                </table></td>
                <td width="16" bgcolor="#0000FF" class="cabecera_productos">&nbsp;</td>
                <td bgcolor="#0000FF" class="cabecera_productos">Im&aacute;gen</td>
                <td width="16" bgcolor="#0000FF" class="cabecera_productos">&nbsp;</td>
                <td width="100%" bgcolor="#0000FF" class="cabecera_productos">Producto</td>
                <td width="16" bgcolor="#0000FF" class="cabecera_productos">&nbsp;</td>
                <td bgcolor="#0000FF" class="cabecera_productos">Cantidad</td>
                <td width="16" bgcolor="#0000FF" class="cabecera_productos">&nbsp;</td>
                <td bgcolor="#0000FF" class="cabecera_productos"><div align="center">Precio</div></td>
                <td colspan="3" align="right" bgcolor="#F5F5FF" class="cabecera_productos"><table width="100%"  border="0" align="right" cellpadding="0" cellspacing="0" id="comprar y esquina">
                  <tr>
                    <td align="right" valign="baseline" bgcolor="#0000FF" class="cabecera_productos"><div align="right"><img src="../imag/pix.gif" width="1" height="1"></div></td>
                    <td width="17"><img src="../imag/drcha_azul.gif" width="17" height="20"></td>
                  </tr>
                </table></td>
          </tr>
                        <?
        
for ($i=0;$i<$this->num_productos;$i++){
            if(
$this->array_id_prod[$i]!=0){
            
?>
<tr>
                <td width="5" rowspan="2" bgcolor="#0000FF"><img src="../imag/pix.gif" width="1" height="1"></td>
                <td width="16" height="100" align="center" valign="bottom" bgcolor="#F5F5FF">&nbsp;</td>
                <td width="100" height="100" align="center" valign="middle" bgcolor="#F5F5FF" class="precio"><? echo $this->array_id_prod[$i]; ?></td>
                <td width="16" align="center" valign="bottom" bgcolor="#F5F5FF">&nbsp;</td>
                <td width="125" height="100" align="right" valign="middle" bgcolor="#F5F5FF"><table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0" id="imagen">
                  <tr>
                    <td align="center" valign="middle"><a href="producto.php?id=<? echo $this->array_id_prod[$i]; ?>
                    onclick="window.open(this.href, this.target, 'width=530,height=530,top=115,left=200,resizable=0,scrollbars=1,menubar=0,toolbar=0,status=yes,location=0'); return false;" 
                    onMouseOut="window.status=' '" onMouseOver="window.status='<? echo $this->array_nombre_prod[$i]; ?>';return true">
                  <img src="<? echo $this->array_imagen_prod[$i]; ?>" alt="<? echo $this->array_nombre_prod[$i]; ?>" border="0"></a></td>
                    
                      
                  </tr>
                </table></td>
                <td width="16" align="center" valign="top" bgcolor="#F5F5FF">&nbsp;</td>
                <td width="100%" align="left" valign="middle" bgcolor="#F5F5FF"><a href="producto.php?id=<? echo $this->array_id_prod[$i]; ?>
                    onClick="window.open(this.href, this.target, 'width=530,height=530,top=115,left=200,resizable=0,scrollbars=1,menubar=0,toolbar=0,status=yes,location=0'); return false;" 
                    onMouseOut="window.status=' '" onMouseOver="window.status='<? echo $this->array_nombre_prod[$i]; ?>';return true" class="quinto">
                  <? echo $this->array_nombre_prod[$i]; ?></a></td>
                <td width="16" align="center" valign="top" bgcolor="#F5F5FF">&nbsp;</td>
                <td align="center" bgcolor="#F5F5FF">
                <input name="unidades" type="text" class="unidades" value="<? echo $this->array_unidades_prod[$i]; ?>" size="2" maxlength="3">
                </td>
                <td width="16" align="center" valign="top" bgcolor="#F5F5FF">&nbsp;</td>
                <td align="center" valign="middle" bgcolor="#F5F5FF" class="precio"><? echo $this->array_precio_prod[$i] * $this->array_unidades_prod[$i]; ?>&nbsp;&euro;</td>
                <td align="right" bgcolor="#F5F5FF"><a href="eliminar_producto.php?linea=<? echo $i?>" class="primero">Eliminar producto</a></td>
                <td width="16" align="right" bgcolor="#F5F5FF">&nbsp;</td>
                <td width="5" rowspan="2" bgcolor="#0000FF"><img src="../imag/pix.gif" width="1" height="1"></td>
      </tr>
              <tr>
                <td width="16" height="1" align="right" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="16" height="1"></td>
                <td width="100" height="1" align="right" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="100" height="1"></td>
                <td width="16" height="1" align="right" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="16" height="1"></td>
                <td width="125" height="1" align="center" valign="middle" bgcolor="#CC9933"><img src="../imag/pix.gif" width="1" height="1"></td>
                <td width="16" height="1" align="right" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="16" height="1"></td>
                <td width="100%" height="1" align="center" valign="middle" bgcolor="#CC9933"><img src="../imag/pix.gif" width="1" height="1"></td>
                <td width="16" height="1" align="right" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="16" height="1"></td>
                <td height="1" align="center" valign="middle" bgcolor="#CC9933"><img src="../imag/pix.gif" width="1" height="1"></td>
                <td width="16" height="1" align="right" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="16" height="1"></td>
                <td height="1" align="center" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="100" height="1"></td>
                <td width="37" height="1" align="center" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="120" height="1"></td>
                <td width="16" height="1" align="right" valign="bottom" bgcolor="#CC9933"><img src="../imag/pix.gif" width="16" height="1"></td>
              </tr>
                             <?
                $suma 
$suma $this->array_precio_prod[$i] * $this->array_unidades_prod[$i];
            }
        }
        
       
//muestro el total
        
?>
<tr>
                <td colspan="7" valign="top"><table width="100%"  border="0" cellpadding="0" cellspacing="0" id="culo_products">
                  <tr>
                    <td width="14"><img src="../imag/esq_izq_clara.gif" width="14" height="12"></td>
                    <td valign="bottom" bgcolor="#F5F5FF"><table width="100%"  border="0" cellpadding="0" cellspacing="0" id="centro_azul_culo">
                      <tr>
                        <td height="1" bgcolor="#0000FF"><img src="../imag/pix.gif" width="1" height="1"></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
                <td rowspan="4" valign="bottom" bgcolor="#F5F5FF"><table width="1" border="0" cellpadding="0" cellspacing="0" valign="bottom">
        <tr>
          <td width="1" bgcolor="#F5F5FF"><img src="../imag/pix.gif" width="1" height="11"></td>
        </tr>
        <tr>
          <td width="1" height="100%" bgcolor="#0000FF"><img src="../imag/pix.gif" width="1" height="103"></td>
        </tr>
                </table></td>
                <td colspan="5" bgcolor="#F5F5FF">&nbsp;</td>
                <td bgcolor="#0000FF"><img src="../imag/pix.gif" width="1" height="1"></td>
</tr>
<tr>
  <td colspan="7" rowspan="4"><table  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="14"><img src="../imag/pix.gif" width="14" height="1"></td>
      <td width="30" align="right"><img src="../imag/huellita.gif" width="30" height="31"></td>
      <td width="135" align="center"><a href="tienda.php" target="contenido" class="noveno" onmouseout="window.status=' '" onmouseover="window.status='Seguir comprando';return true">Seguir comprando</a></td>
      <td align="center">&nbsp;</td>
      <td width="30" align="center"><img src="../imag/huellita.gif" width="30" height="31"> </td>
      <td width="135" align="center"><a href="#" target="contenido" class="noveno" onmouseout="window.status=' '" onmouseover="window.status='Actualizar';return true">Actualizar</a></td>
      <td align="center">&nbsp;</td>
      <td width="30" align="center"><img src="../imag/huellita.gif" width="30" height="31"></td>
      <td width="135" align="center"><a href="#" target="contenido" class="noveno" onmouseout="window.status=' '" onmouseover="window.status='Procesar pedido';return true">Procesar pedido</a></td>
      <td align="center">&nbsp;</td>
      <td width="30" align="left"><img src="../imag/huellita.gif" width="30" height="31"></td>
      <td width="14"><img src="../imag/pix.gif" width="14" height="1"></td>
    </tr>
  </table></td>