Ver Mensaje Individual
  #6 (permalink)  
Antiguo 24/04/2007, 15:48
gabrisa
 
Fecha de Ingreso: noviembre-2006
Ubicación: tuxtla gtz, chiapas
Mensajes: 79
Antigüedad: 17 años, 6 meses
Puntos: 1
Re: de javascript a php

hola ahi esta lo de mi codigo de ver el carrito...aparte hay otra pagina que realiza lo que se agrega, la cual funciona bien, asi que mi idea esta en que la actualizacion de la cantidad se realiza en este script...
se los agradeceria si me ayudan....

Código PHP:
foreach($carro as $k => $v){  
            
$subto=$v['cantidad']*$v['precio'];  
            
$suma=$suma+$subto;  
            
$contador++; 
            
$iva=$suma*0.15;
            
$sumatotal$suma*1.15;    
            
$cantidad$v['cantidad'];        
            
//Contenido de la tabla de lo que se agrega en el carrito
                            
echo  "<td>";
                            echo  
"<input name='cantidad_rec' type='text' size='5' value='$cantidad'>";
                            echo  
"</td>";    
                            echo  
"<td>";                    
                            echo 
"<font color='#0033CC'> <strong>";
                            echo  
$v['marca'];
                            echo  
"  ";
                            echo  
$v['modelo'];
                            echo  
"</font> </strong>";
                            echo  
"</td>";    
                            echo  
"<td>";    
                            echo  
number_format($v['precio'], 2);        
                            echo  
"</td>";
                            echo  
"<td>$   ";
                            echo  
number_format($subto2);
                            echo  
"</td>";
                            echo  
"<td> <a href=borrar_art.php? SID &id=".$row[id_prod].">";
                            echo  
"<div  id='borrar'>  Borrar  </div>";
                            echo  
"</a>";
                            echo  
"</td>";
                            echo  
"</tr>\n";
                            }
 
                        echo 
"</table> \n";        
                        echo  
"<br>";                
                        echo 
"<div align=center>";
                        echo 
"<table border='0' width='30%'>";
                        echo  
"<tr align=left>";
                        echo  
"<td> Subtotal     $</td>";
                        echo  
"<td align=right>";
                        echo   
number_format($suma2);
                        echo   
"</td>";
                        echo  
"</tr>";
                        echo  
"<tr align=left>";
                        echo  
"<td>IVA 15%       $</td>";    
                        echo  
"<td align=right>";
                        echo   
number_format($iva2);
                        echo   
"</td>";                            
                        echo  
"</tr>";
                        echo   
"<tr align=left> <strong>";
                        echo  
"<td>Total         $</td>";
                        echo  
"<td align=right>";
                        echo   
number_format($sumatotal2);
                        echo   
"</strong></td>";
                        echo   
"</tr>";
                        echo  
"</table>";
                        echo  
"</div>";
            }
            else