Forum Moderators: open
Basically, the story goes as follows; I currently use the following script to post quantities of a product required from my website to Mals E-commerce shopping cart:
<form action="http server host goes here, blanked for Webmaster world" method="post">
<input size="4" name="qty1" value="1">
<input type="submit" name="SubmitBtn" value="Add to Cart">
<input type="hidden" value="64101274" name="userid">
<input type="hidden" value="Epson Stylus Colour 400/800/800+/1000 (S020025): Black Compatible Cartridge" name="product1">
<input type="hidden" value="2.89" name="price1">
</form>
Now the problem comes in the fact that I want to be able to offer price breaks if more than 6 items are ordered. The only way I have been able to do it is by having two submit buttons, one if the customer wishs to order less than 6 and one if they wish to order 6 or above.
Is there anyway that if "qty1"'s value is 6 or higher that I could then make
<input type="hidden" value="2.29" name="price1">
or a similar lower price to reflect that my customer is ordering 6 or more items?
Does this make sense to anybody? Any help you could give would be most apprechated.
Kind Regards
Chris Holgate
function checkit () {
if (document.orderform.qty1.value > 6) {
document.orderform.price1.value = 2.29;
}
document.orderform.submit();
}
I think that would work.