Hi guys,
So I need to add the "add to cart" button to a custom html page, but I can't seem to figure it out. I tried copying the html from the products' source and then pasting it, but then the button doesn't do anything. I'm terrible with JS, as I've just started learnign it, but would there be anything in there preventing the button from functioning? I've attached a copy of the html if it helps anyone, sorry about the formatting =/
<td background="http://www.refurbups.com/template/2011/images/pricebox-bg.jpg" colspan="7"> <table border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td style="padding-left: 14px"> <span style="display: inline-block; text-align: right">Street Price:</span> <span style="display: inline-block; text-decoration: line-through">9.99</span><br> <span style="display: inline-block; text-align: right; font-size: 16px">Our Price:</span> <span style="display: inline-block; color: #CF1111; font-weight: bold; font-size: 16px" class="price">Hi guys,
So I need to add the "add to cart" button to a custom html page, but I can't seem to figure it out. I tried copying the html from the products' source and then pasting it, but then the button doesn't do anything. I'm terrible with JS, as I've just started learnign it, but would there be anything in there preventing the button from functioning? I've attached a copy of the html if it helps anyone, sorry about the formatting =/
8.99</span><br> <table border="0" cellspacing="0" cellpadding="0" style="margin-left: 15px; margin-top: 3px"><form method="post" name="form319" id="form319" onsubmit="return checkmandatory319();" action="/app/site/backend/additemtocart.nl"></form> <input type="hidden" name="c" value="306789"> <input type="hidden" name="n" value="1"> <input type="hidden" name="buyid" id="buyid" value="319"><input type="hidden" name="category" value="129"><input type="hidden" name="itemid" value="319"> <tbody><tr align="left"> <td><input name="qty" id="qty" size="6" maxlength="6" value="1" class="input"> </td> <td><input class="addtoCartButton" type="button" border="0" onclick="if (document.forms['form319'].onsubmit()) { document.forms['form319'].submit(); } return false;" name="addtocart" id="addtocart" value="Add To Cart" style="border: none"></td> </tr><script language="JavaScript" type="text/javascript">NS.form.setValid(true);function checkmandatory319() {if (document.forms['form319'].amount) {var amt=document.forms['form319'].amount;var max_amt=document.forms['form319'].max_amount;if (!validate_field(amt,'poscurrency',true,false,null,null,true,null)) return false;if (max_amt.value > 0.00 && parseFloat(amt.value) > parseFloat(max_amt.value)) {alert('Invalid amount (exceeds maximum allowed)'); return false; }if (amt.value < 0.01) {alert('Invalid number (must be greater than 0).'); return false; }}return NS.form.isValid() ? true : false;}</script> </tbody></table> </td><td style="padding-left: 9px"> <img src="/site/icons/big_checkbox.png"> <b><u>Brand New Battery</u></b><br> <img src="/site/icons/big_checkbox.png"> Maintenance Free<br> <img src="/site/icons/big_checkbox.png"> Same Day Shipping<br> <img src="/site/icons/big_checkbox.png"> Industry Leading Warranty<br> </td> </tr> </tbody></table> </td>