Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/08/2011, 08:19
marx-pola
 
Fecha de Ingreso: mayo-2002
Ubicación: Capital Federal
Mensajes: 630
Antigüedad: 22 años
Puntos: 1
Carrito de Compras - Cómo se envía por email el listado que se cargó?

Hola a todos! Quisiera hacerles una consulta... tengo un Carrito de Compras que me muestra todos los productos en este listado que les paso abajo y lo que necesito es enviar este listado por email para que lleguen todos los productos que se cargaron.

Código PHP:
<?php session_start(); 
error_reporting(E_ALL); 
@
ini_set('display_errors''1'); 
if(isset(
$_SESSION['carro'])) 
$carro=$_SESSION['carro'];else $carro=false

if(
$carro){ 
?> 

<table width="880" border="0" cellspacing="0" cellpadding="0" align="center"> 
  <tr bgcolor="#333333" class="tit">  
    <td width="64" height="20">Producto</td> 
    <td width="82" height="20">Precio</td> 
    <td height="20" colspan="2" align="center">Cantidad de Unidades</td> 
    <td width="70" height="20" align="center">Borrar</td> 
    <td width="100" height="20" align="center">Actualizar</td> 
  </tr> 
  <?php 
  $color
=array("#ffffff","#F0F0F0"); 
  
$contador=0
  
$suma=0
   foreach(
$carro as $k => $v){ 
   
$subto=$v['cantidad']*$v['precio']; 
   
$suma=$suma+$subto
   
$contador++; 
    
?> 
  <form name="a<?php echo $v['identificador'?>" method="post" action="carro_actualiza.php?<?php echo SID ?>" id="a<?php echo $v['identificador'?>"> 
    <tr bgcolor="<?php echo $color[$contador%2]; ?>" class='prod'>  
      <td height="20"><?php echo $v['id_articulo'?></td> 
      <td height="20"><?php echo $v['precio'?></td> 
      <td width="45" height="20" align="center"><?php echo $v['cantidad'?></td> 
      <td width="79" height="20" align="center">  
        <input name="cantidad" type="text" class="prod" id="cantidad" value="<?php echo $v['cantidad'?>" size="6"> 
        <input name="id_articulo" type="hidden" id="id_articulo" value="<?php echo $v['id_articulo'?>"> </td> 
      <td height="20" align="center"><a href="carro_borrar.php?<?php echo SID ?>&id_articulo=<?php echo $v['id_articulo'?>"><img src="trash.gif" width="12" height="14" border="0"></a></td> 
      <td height="20" align="center">  
        <input name="imageField" type="image" src="actualizar.gif" width="20" height="20" border="0"></td> 
  </tr></form> 
  <?php }?> 
</table> 
</td> 
  </tr> 
  <tr> 
    <td height="30" align="center" valign="bottom">&nbsp;</td> 
  </tr> 
  <tr> 
    <td height="53" align="center" valign="bottom"><div align="center"><span class="prod">Total de Artículos: <?php echo count($carro); ?></span>  
</div><br> 
<div align="center"><span class="prod">Total: $<?php echo number_format($suma,2); ?></span>  
</div><br> 
<div align="center"><span class="prod">Continuar la selección de productos</span>  
  <a href="../index.php?<?php echo SID;?>"><img src="continuar.gif" width="13" height="13" border="0"></a></div></td> 
  </tr> 
  <tr> 
    <td align="center"><?php }else{ ?> 
      <p align="center"> <span class="prod">No hay productos seleccionados</span> <a href="../index.php?<?php echo SID;?>"><img src="continuar.gif" width="13" height="13" border="0"></a> 
        <?php }?> 
    </p></td> 
  </tr> 
  <tr> 
    <td align="center"> 
     </td> 
  </tr> 
</table>
Es lo último que me faltaría para completarlo, ¿me podrían explicar como hacer para mandar todo lo que se cargó por email?
Muchisimasgracias de antemano y saludos.
Marx.
__________________
"Todo lo que somos es el resultado de lo que hemos pensado". Budda.