MrStatic Posted October 25, 2008 Posted October 25, 2008 Ok so I am writing my own live price updater since the one found in the contributions didn't work with my radio buttons that I use instead of a drop down menu. Now my javascript needs to read the 'value' tag and have the prefix and the value of the attribute (option) in that value tag, If I change that would it somehow mess with the cart? The code I use for the loop is as follows. Basically I don't know how to change the output to have the value like I want it and also not sure if that would break the cart. <script type="text/javascript"> var Price = <?php echo ltrim($products_price, "$"); ?>; function test() { var SubTotal = Price; getRadios = document.getElementsByTagName("input") for (x=0; x < getRadios.length; x++) { if ( getRadios[x].type == "radio" && getRadios[x].checked ) SubTotal += +getRadios[x].value; } document.getElementById('currentprice').innerHTML = SubTotal; }
dowser Posted October 21, 2009 Posted October 21, 2009 Ok so I am writing my own live price updater since the one found in the contributions didn't work with my radio buttons that I use instead of a drop down menu. Now my javascript needs to read the 'value' tag and have the prefix and the value of the attribute (option) in that value tag, If I change that would it somehow mess with the cart? The code I use for the loop is as follows. Basically I don't know how to change the output to have the value like I want it and also not sure if that would break the cart. Do you mind sharing how you managed to convert drop down list to radio buttons? I need that for attribute options.
multimixer Posted October 22, 2009 Posted October 22, 2009 Do you mind sharing how you managed to convert drop down list to radio buttons? I need that for attribute options. There are several contributions doing this, I think the most complete is option types v2 My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Recommended Posts
Archived
This topic is now archived and is closed to further replies.