View Single Post
  #2  
Old 03-17-2016, 04:31 AM
 
Tontinuk Tontinuk is offline
 

Newbie
  
Join Date: Jan 2015
Posts: 3
 

Default Re: Changing quantity on the fly

Ive done this now with the following
Code:
var value = parseInt(product_option_value("MUH")); var value2 = parseInt(product_option_value("MUW")); var newquant = (value * value2); document.getElementById("product_avail").value = newquant ; var qtybox = parseInt(document.getElementById("product_avail").value); if ( qtybox !== newquant) { alert("Sorry, the quantity does not match the mailbox bank sizer ytybox " + qtybox + "newquant " + newquant); return false; }

the problem with this is it only changes the quantity when the add to cart button is pressed thus calling the checkoptions routine,

can I call the routine when either of the dropdowns are changed and if so how and where should I put the code.
__________________
v4.6.6
Reply With Quote