Enviar lista de productos del carrito a mi mail

Iniciado por nahub96, 20 Marzo 2015, 05:09 AM

0 Miembros y 1 Visitante están viendo este tema.

nahub96

Hola, les cuento que estoy haciendo una página para vender productos de mi negocio, pero a diferencia de un eShop o eCommerce normal con carrito de compras, lo suplante por "Productos a Cotizar", ese sería mi carrito. Osea, el cliente agrega diferentes productos a la Lista de Productos a Cotizar, y luego en vez de el típico botón "Pagar" o "Proceder al Pago" le puse el botón "Solicitar Cotización".

AHORA, lo que quiero hacer es que se envíe a mi mail esa lista de productos que esta en el "Carrito" para poder yo contactarlo a él y enviarle la cotización correspondiente.
Estuve probando la clase phpmailer con gmail y me funcionó, pero no se aplicarla a este código para poder enviar la lista de productos a mi mail..

Código (php) [Seleccionar]
<?php require_once('Connections/ConexTiendaWeb.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  if (
PHP_VERSION 6) {
    
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

mysql_select_db($database_ConexTiendaWeb$ConexTiendaWeb);
$query_DatosCot "SELECT * FROM tblcotizacion";
$DatosCot mysql_query($query_DatosCot$ConexTiendaWeb) or die(mysql_error());
$row_DatosCot mysql_fetch_assoc($DatosCot);
$totalRows_DatosCot mysql_num_rows($DatosCot);
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BaseIndex.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin título</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="css/Principal.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
<div class="header">
<div class="headerinterior">
 <ul id="MenuBar2" class="MenuBarHorizontal">
   <li><a href="cot_list.php">Productos a Cotizar</a></li>
 </ul>
</div>
 <div class="menudesplegable">
   <ul id="MenuBar1" class="MenuBarHorizontal">
     <li><a href="index.php">Inicio</a>      </li>
     <li><a href="Categories.php" class="MenuBarItemSubmenu">Productos</a>
       <ul>
         <li><a href="#">Elemento sin título</a></li>
         <li><a href="#">Elemento sin título</a></li>
         <li><a href="#">Elemento sin título</a></li>
       </ul>
     </li>
<li><a href="#">Contacto</a></li>
   </ul>
 </div>
 </div>

 
 <div class="content"><!-- InstanceBeginEditable name="Contenido" -->
 <p><strong>Lista de Productos a Cotizar.</strong></p><table width="100%" border="0">

 <tr>
   <td>Producto</td>
   <td>Unidades</td>
   <td>Acciones</td>
 </tr>
<?php do { ?>
 <tr>
   <td><?php echo ObtenerNombreProducto($row_DatosCot['idProducto']); ?></td>
   <td><?php echo $row_DatosCot['intCantidad']; ?></td>
   <td>Eliminar</td>
 </tr>
 <?php } while ($row_DatosCot mysql_fetch_assoc($DatosCot)); ?>
 </table>
&nbsp;</p>
<p>
<form id="formulario" method="post" action="untitled.php" enctype="multipart/form-data">
 <input id="submit" type="submit" name="enviar" value="Solicitar Cotización">
 </form>
</p>
<p>&nbsp; </p>
 <!-- InstanceEndEditable -->
   <!-- end .content --></div>
 <div class="footer"><div class="footerinterior">Pie de página<!-- end .footer --></div></div>
<!-- end .container --></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result
($DatosCot);
?>


Saludos y gracias desde ya!