Foros del Web » Programando para Internet » ASP Clásico »

Ayuda con Tienda

Estas en el tema de Ayuda con Tienda en el foro de ASP Clásico en Foros del Web. Tengo un problema, estoy haciendo una tienda y para añadir al precio total los gastos de envio, pero siempre que la cantidad mayor de 60.00, ...
  #1 (permalink)  
Antiguo 11/08/2006, 10:51
 
Fecha de Ingreso: mayo-2006
Mensajes: 26
Antigüedad: 18 años, 1 mes
Puntos: 0
Ayuda con Tienda

Tengo un problema, estoy haciendo una tienda y para añadir al precio total los gastos de envio, pero siempre que la cantidad mayor de 60.00, y no lo consigo. Esto es lo que tengo puesto para que se me añada el IVA al precio Total:
itemlist = 0;
for (var i = 0; i <= fulllist.length; i++) {
if (fulllist.substring(i,i+1) == '[') {
itemstart = i+1;
} else if (fulllist.substring(i,i+1) == ']') {
itemend = i;
thequantity = fulllist.substring(itemstart, itemend);
itemtotal = 0;
itemtotal = (eval(theprice*thequantity));
temptotal = itemtotal * 100;
var tax = itemtotal / 100 * (16.0 - 0);
tax = Math.floor(tax * 100)/100
totprice = totprice + itemtotal + tax;
itemlist=itemlist+1;
document.writeln('<tr><td>'+theitem+'</td><td align=right>'+thequantity+'</td><td align=right>'+theprice+'</td><td align=right>'+alterError(itemtotal)+'</td><td align=center><input TYPE="button" NAME="remove" VALUE="Quitar" onclick="javascript:removeItem('+itemlist+')"></td></tr>');
} else if (fulllist.substring(i,i+1) == ',') {
theitem = fulllist.substring(itemstart, i);
itemstart = i+1;
} else if (fulllist.substring(i,i+1) == '#') {
theprice = fulllist.substring(itemstart, i);
itemstart = i+1;
}
}

document.writeln('<tr><td colspan=3><b>Impuestos</b></td><td align=right>16.0%</td><td>&nbsp;</td></tr>');

document.writeln('<tr><td colspan=3><b>Total</b></td><td align=right>'+alterError(totprice)+'</td><td>&nbsp;</td></tr>');

Podriais por favor ayudarme, estoi parado por culpa de no conseguir como y donde ponerlo.
Gracias Salu2
  #2 (permalink)  
Antiguo 11/08/2006, 11:02
 
Fecha de Ingreso: abril-2004
Ubicación: México D.F.
Mensajes: 1.724
Antigüedad: 20 años, 1 mes
Puntos: 4
Este es un problema veo más de javascript, q de asp.
  #3 (permalink)  
Antiguo 11/08/2006, 11:09
 
Fecha de Ingreso: mayo-2006
Mensajes: 26
Antigüedad: 18 años, 1 mes
Puntos: 0
Perdonar me equivocado, me voy al de javascript
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:41.