Price Based on Quantity & Size (toggleprice)

Completed modifications to the NOP Shopping Cart. Additions, modifications, and more.

Moderators: Koibito, Stefko, Randy, Rosey

Price Based on Quantity & Size (toggleprice)

Postby Stefko » Thu Aug 05, 2004 3:07 am

Place inbetween HEAD tags:

Code: Select all
<script language="javascript">
function toggleprice()
{

var INFO = document.order.ADDITIONALINFO2;


if ( INFO.value == "2XL" ){
if (document.order.QUANTITY.value >= 12)
{document.order.PRICE.value = 15.00;
}
else if (document.order.QUANTITY.value >= 6)
{document.order.PRICE.value = 25.00;
}

else{
document.order.PRICE.value = 35.00;
}
}
else {
if (document.order.QUANTITY.value >= 12)
{document.order.PRICE.value = 10.00;
}
else if (document.order.QUANTITY.value >= 6)
{document.order.PRICE.value = 20.00;
}
else {
document.order.PRICE.value = 30.00;
}
}
}
</script>


Change this to:

Code: Select all
<FORM NAME=order ACTION="managecart.html" onclick="toggleprice()" onSubmit="AddToCart(this);">


And this to:

Code: Select all
<INPUT type=hidden name="PRICE" value="">
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Re: Price Based on Quantity & Size (toggleprice)

Postby mike123 » Fri Jul 30, 2010 6:55 pm

I tryed this script but it did not work what do you mean by price based on size works only when script is based on quanitity. the problem iam having is the input type=hidden name="price" value=""> will no link to my three differnt info values I created
mike123
WebMaster
 
Posts: 1
Joined: Fri Jul 30, 2010 6:35 pm


Return to Modifications

Who is online

Users browsing this forum: No registered users and 1 guest

cron