elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  PHP (Moderador: #!drvy)
| | | |-+  Enviar lista de productos del carrito a mi mail
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Enviar lista de productos del carrito a mi mail  (Leído 1,438 veces)
nahub96

Desconectado Desconectado

Mensajes: 4


Ver Perfil
Enviar lista de productos del carrito a mi mail
« en: 20 Marzo 2015, 05:09 am »

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
  1. <?php require_once('Connections/ConexTiendaWeb.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.  if (PHP_VERSION < 6) {
  7.    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.  }
  9.  
  10.  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.  switch ($theType) {
  13.    case "text":
  14.      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.      break;    
  16.    case "long":
  17.    case "int":
  18.      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.      break;
  20.    case "double":
  21.      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.      break;
  23.    case "date":
  24.      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.      break;
  26.    case "defined":
  27.      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.      break;
  29.  }
  30.  return $theValue;
  31. }
  32. }
  33.  
  34. mysql_select_db($database_ConexTiendaWeb, $ConexTiendaWeb);
  35. $query_DatosCot = "SELECT * FROM tblcotizacion";
  36. $DatosCot = mysql_query($query_DatosCot, $ConexTiendaWeb) or die(mysql_error());
  37. $row_DatosCot = mysql_fetch_assoc($DatosCot);
  38. $totalRows_DatosCot = mysql_num_rows($DatosCot);
  39. ?>
  40.  
  41. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  42. <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BaseIndex.dwt.php" codeOutsideHTMLIsLocked="false" -->
  43. <head>
  44. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  45. <!-- InstanceBeginEditable name="doctitle" -->
  46. <title>Documento sin título</title>
  47. <!-- InstanceEndEditable -->
  48. <!-- InstanceBeginEditable name="head" -->
  49. <!-- InstanceEndEditable -->
  50. <link href="css/Principal.css" rel="stylesheet" type="text/css" />
  51. <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
  52. <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
  53. </head>
  54. <body>
  55. <div class="container">
  56. <div class="header">
  57. <div class="headerinterior">
  58.  <ul id="MenuBar2" class="MenuBarHorizontal">
  59.    <li><a href="cot_list.php">Productos a Cotizar</a></li>
  60.  </ul>
  61. </div>
  62.  <div class="menudesplegable">
  63.    <ul id="MenuBar1" class="MenuBarHorizontal">
  64.      <li><a href="index.php">Inicio</a>      </li>
  65.      <li><a href="Categories.php" class="MenuBarItemSubmenu">Productos</a>
  66.        <ul>
  67.          <li><a href="#">Elemento sin título</a></li>
  68.          <li><a href="#">Elemento sin título</a></li>
  69.          <li><a href="#">Elemento sin título</a></li>
  70.        </ul>
  71.      </li>
  72. <li><a href="#">Contacto</a></li>
  73.    </ul>
  74.  </div>
  75.  </div>
  76.  
  77.  
  78.  <div class="content"><!-- InstanceBeginEditable name="Contenido" -->
  79.  <p><strong>Lista de Productos a Cotizar.</strong></p><table width="100%" border="0">
  80.  
  81.  <tr>
  82.    <td>Producto</td>
  83.    <td>Unidades</td>
  84.    <td>Acciones</td>
  85.  </tr>
  86. <?php do { ?>
  87.  <tr>
  88.    <td><?php echo ObtenerNombreProducto($row_DatosCot['idProducto']); ?></td>
  89.    <td><?php echo $row_DatosCot['intCantidad']; ?></td>
  90.    <td>Eliminar</td>
  91.  </tr>
  92.  <?php } while ($row_DatosCot = mysql_fetch_assoc($DatosCot)); ?>
  93.  </table>
  94. &nbsp;</p>
  95. <p>
  96. <form id="formulario" method="post" action="untitled.php" enctype="multipart/form-data">
  97.  <input id="submit" type="submit" name="enviar" value="Solicitar Cotización">
  98.  </form>
  99. </p>
  100. <p>&nbsp; </p>
  101.  <!-- InstanceEndEditable -->
  102.    <!-- end .content --></div>
  103.  <div class="footer"><div class="footerinterior">Pie de página<!-- end .footer --></div></div>
  104. <!-- end .container --></div>
  105. <script type="text/javascript">
  106. var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
  107. var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
  108. </script>
  109. </body>
  110. <!-- InstanceEnd --></html>
  111. <?php
  112. mysql_free_result($DatosCot);
  113. ?>

Saludos y gracias desde ya!


« Última modificación: 20 Marzo 2015, 20:26 pm por #!drvy » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Enviar mail vba
Programación Visual Basic
Ch3ck 4 4,632 Último mensaje 3 Junio 2005, 00:56 am
por Ch3ck
Enviar mail por BAT!!!!
Scripting
elecktra 2 2,985 Último mensaje 8 Agosto 2008, 07:11 am
por leogtz
mail(), error raro al intentar enviar mail !
PHP
Diabliyo 4 4,630 Último mensaje 25 Enero 2010, 06:04 am
por Diabliyo
Gestion productos en carrito PHP
Desarrollo Web
nobo 2 2,130 Último mensaje 7 Febrero 2012, 22:55 pm
por nobo
Enviar mail sin formato mime (plain text)
.NET (C#, VB.NET, ASP)
dep_serg 1 2,333 Último mensaje 6 Febrero 2015, 07:10 am
por __Alvaro 2015__
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines