Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/10/2008, 16:17
Avatar de engell_kk
engell_kk
 
Fecha de Ingreso: septiembre-2008
Mensajes: 7
Antigüedad: 15 años, 7 meses
Puntos: 0
ayuda con carrito php mysql(novato)

Mi consulta es la siguiente como puedo hacer para enviar estos datos al carrito ya que he incorporado el carrito que esta con los archivos mete_producto.php, eliminar_carrito.php etc no se si estan familiarizados con el script pero si si necesito terminar este programa de su ayuda gracias


Explico a continuacion:




bien tengo script donde estan los parametros a enviar por el agrgar carrito pero no envia nada de lo que le dejo

este es el codigo de listar_producto donde esta el agregar carrito:
Código PHP:
<?
if($cat){$where "AND cat='$cat'";$status=1;}else{$status='no';}
$qr1 mysql_query("SELECT * FROM product WHERE status='$status' $where ORDER BY id DESC");

if(!
$cat)
{
?>
<? 
include("lib_carrito.php");
session_start();
?>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="texto_inicio_catalogo" valign="top">
.
<br></td>
</tr>
</table>
</div>
<?
}

while( 
$row mysql_fetch_object($qr1) )
{
?>

<div>
<table class="tabla_productos" cellpadding="0" cellspacing="0" width="<?=$AnchoFicha?>" height="<?=$AltoFicha?>">
<tr><td>

<div>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">

<tr>

<td class="celda_foto" width="<?=$AnchoFoto?>" height="<?=$AltoFicha?>">

<?
$handle
=opendir('../imagenes/'); 
while (
false!==($file readdir($handle)))
    {
    if (
$file != "." && $file != "..")
        {
        if( 
strstr($file,"x_".$row->id.".") )
            {
?>
<img src="../imagenes/<?=$file?>" border="<?=$BordeImg?>" width="<?=$AnchoImg?>" height="<?=$AltoImg?>">
<?
            
}
        }
    }
?>

</td>
                
<td class="celda_texto" width="<?=$AnchoTexto?>">

<b><?=stripslashes($row->name)?></b>
<br>
&nbsp;&nbsp;
<?=stripslashes($row->make)?>
<br>
&nbsp;&nbsp;
<?=stripslashes($row->year)?>
<br>
&nbsp;&nbsp;
<?=stripslashes($row->model)?>
<br>
&nbsp;&nbsp;
<?=stripslashes($row->price)?> Dolares</td>

<td class="celda_masinfo" width="<?=$AnchoMasInfo?>">

<a class="mas_info" href="javascript:void(null)" onclick='javascript:window.open("web/ficha_producto.php?id=<?=$row->id?>","Ficha","width=<?=$AnchoVentana;?>,height=<?=$AltoVentana;?>,left=<?=$LeftVentana;?>,top=<?=$TopVentana;?>,resizable=yes,location=no,status=yes,scrollbars=yes")'><?=$TextoMasInfo?></a><img src="/imagenes/vercarrito.gif" width="24" height="21"><a href="includes/mete_producto.php?id=<?=stripslashes($row->id)?>&nombre=<?=stripslashes($row->name)?>&precio=<?=stripslashes($row->price)?>">Agregar a carrito</a>

</td>

</tr>

</table>
</div>

</td></tr>
</table>
</div>

<div>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td height="10"></td></tr>
</table>
</div>
            
<?
}
?>

este es el codigo de mete_carrito.php

Código PHP:
<?
include("lib_carrito.php");
session_start();
$_SESSION["ocarrito"]->introduce_producto($_GET["id_prod"], $_GET["nombre_prod"], $_GET["precio_prod"]);
?>

<html>
<head>
    <title>Introduce Producto</title>
</head>

<body>

Producto introducido.
<br>
<br>
<a href="productos.php">- Volver</a>
<br>
<br>
<a href="ver_carrito.php">- Ver carrito</a>

</body>
</html>

Con la libreria de carrito no le he tocado esta tal cual la baje ya que e visto otros webs y tienen la misma asi que pienso que el problema estara en estos dos scripts de su ayuda gracias