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

Siiiiiiii!!!!! Lo logreeeee!!! Pude hacer que me lleguen los emails con el listado de mi carrito de compras.

Esto es lo que hice siguiendo tus consejos:
Código PHP:
if ($_POST['enviar'] != "") {

require_once(
'phpmailer/class.phpmailer.php');
require_once(
"phpmailer/class.smtp.php");

$mail = new PHPMailer(); // defaults to using php "mail()"
.....
.....
$mail->Subject "Carrito de Compras Online";

$mail->IsHTML(true);
if(
$carro){

$body  'CARRITO DE COMPRAS'
    
$body .= '<table width="399" border="1">
    <tr>
    <td width="64" height="20">Producto</td>
    <td width="236">Categoria</td>
    <td width="204">Linea</td>
    <td width="82" height="20">Precio</td>
    <td height="20" colspan="2" align="center">Cantidad de Unidades</td>
    </tr>'
;
  
$color=array("#ffffff","#F0F0F0");
  
$contador=0;
  
$suma=0;
   foreach(
$carro as $k => $v){
   
$subto=$v['cantidad']*$v['precio'];
   
$suma=$suma+$subto;
   
$contador++;
    
$body .= '<tr>
    <td height="20">'
.$v['id_articulo'].'</td>
      <td height="20">'
.$v['categoria'].'</td>
      <td height="20">'
.$v['linea'].'</td>
      <td height="20">'
.$v['precio'].'</td>
      <td width="45" height="20" align="center">'
.$v['cantidad'].'</td>
    </tr>'
;
}
$mail->Body $body

$mail->Send(); 

// Notificamos al usuario del estado del mensaje 
if(!$mail->Send()){ 

   echo 
"<br/>".$mail->ErrorInfo//Esto te muestra el error que ha producido al intentar enviar el correo  
}else{ 
   echo 
"Mensaje enviado"

}

Lo único es que me llegan DUPLICADOS!!! Pero bueno, es un avance importantisimo.

Millones de gracias vgonga1986 por orientarme y dar con esto que lo necesitaba urgente.
Saludos. MArx.
__________________
"Todo lo que somos es el resultado de lo que hemos pensado". Budda.