Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/08/2009, 12:06
clusterbit
 
Fecha de Ingreso: octubre-2008
Mensajes: 67
Antigüedad: 15 años, 6 meses
Puntos: 0
Sonrisa mostrar detalle con formulario de envio en carrito de compra!

hola amigos del foro

por falta de tiempo me he visto un poco complicado en el desarrollo de mi carrito de compras, bueno lo quiero hacer es que al momento de ver lo que ahy en el carrito
se pinche un link o boton y me envìe a una especie de detalle de la compra junto con un formulario donde el cliente vea lo que escogio en el carrito màs complete el formulario de contacto y se envìe a mi correo mas al correo del cliente.

akà les dejo el codigo de vercarrito

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;
?>

<body bgcolor="#006633">
<?php if($carro){
?><table width="400" height="100" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#006633">
  <tr bgcolor="#333333" class="tit"> 
    <td width="105">Producto</td>
    <td width="207">Precio</td>
    <td colspan="2" align="center">Unidades</td>
    <td width="100" align="center">Borrar</td>
    <td width="159" 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="agregacar.php?<?php echo SID ?>" id="a<?php echo $v['identificador'?>">
    <tr bgcolor="<?php echo $color[$contador%2]; ?>" class='prod'> 
      <td align="right"><?php echo $v['producto'?></td>
      <td align="right">$<?php echo $v['precio'?></td>
      <td width="43" align="center">cant:<?php echo $v['cantidad'?></td>
      <td width="136" align="center"> 
        <input name="cantidad" type="text" id="cantidad" value="<?php echo $v['cantidad'?>" size="8">
        <input name="id" type="hidden" id="id" value="<?php echo $v['id'?>"> </td>
      <td align="center"><a href="borracar.php?<?php echo SID ?>&id=<?php echo $v['id'?>"><img src="ico/trash.gif" width="12" height="14" border="0"></a></td>
      <td align="center"> 
        <input name="imageField" type="image" src="ico/actualizar.gif" width="20" height="20" border="0"></td>
  </tr>
  <?php }?>
</form></table>
<table width="400" height="116" border="0" align="center" bgcolor="#006633">
  <tr>
    <td >Total de Artículos:</td>
    <td><?php echo count($carro); ?></td>
  </tr>
  <tr>
    <td>Total: </td>
    <td>$<?php echo number_format($suma,2); ?></td>
  </tr>
  <tr>
    <td height="34">Continuar la selección de productos</td>
    <td><a href="catalogo.php?<?php echo SID;?>"><img src="ico/continuar.gif" width="13" height="13" border="0"></a></td>
  </tr>
  <tr>
    <td><a href="contacto.php">Enviar Pedido</a></td>//aki es donde quiero me direccione al formulario de contacto junto con lo selecionado en el carro
</table>
<?php }else{ ?>
<p align="center"> <span class="prod" style="color:#CCFF00">No hay productos seleccionados</span> <a href="catalogo.php?<?php echo SID;?>"><img src="ico/continuar.gif" width="13" height="13" border="0"></a> 
  <?php }?>
</p>
</body>
este archivo me muestra los productos y me calcula el precio de cada producto

y este es el formulario de contacto

Código PHP:
<!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">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title>nombre de mi sitio</title>
<
LINK REL="stylesheet" TYPE="text/css" HREF="css/style.css">

</
head>
<
body>
  <
table width="539" height="448" border="0" align="center">
  <
tr>
    <
td width="533" height="444">
    <
form id="contacto" name="Contacto" method="post" action="mailer.php">
      <
table>
      <
tr>
<
td>Nombre :</td>
    <
td><input type="text" name="nombre"></td></tr>
        <
tr>
        <
td>Apellido:</td
        <
td><input type="text" name="textfield" /></td></tr>
        <
tr>
        <
td>Telefono:</td
        <
td><input type="text" name="textfield" /></td></tr>
        <
tr>
        <
td>Email:</td
        <
td><input type="text" name="textfield" /></td></tr>
        <
tr>
        <
td>Direccion:</td
        <
td><input type="text" name="textfield" /></td></tr>
        <
tr>
        <
td>Comuna:</td
        <
td><input type="text" name="textfield" /></td></tr>
        <
tr>
        <
td>Dejenos su Comentario:</td
        <
td><textarea name="comentario" rows="7" cols="40"></textarea></td></tr>
        <
tr>
        <
td colspan="2"><div align="center">
          <
input name="Limpiar" type="reset" value="Limpiar" onclick "Validar(this.form)" />          
          <
input name="Enviar Pedido" type="submit" value="Enviar Pedido" />
          </
div></td
        </
tr>
    </
table>
    </
form>    </td>
    </
tr>
</
table>
</
body>
</
html
bueno espero se entienda lo que quiero hacer y estoy atento a su ayuda o me guien como podria hacerlo

Saludos.