October 13, 200916 yr Coverting a radio button to a regular button? Hey I'm pretty new here but I've been messing around with the web for years now : ) I'm currently working on a shopping cart redesign using Cubecart and I need to change the following radio box code to a normal clickable button, is that possiable? Here is the code : <input name="gateway" type="radio" value="{VAL_GATEWAY_FOLDER}" {VAL_CHECKED} /> I have two gateways installed that display, that basically replace 'VAL_GATEWAY_FOLDER'they are : Print_Order_Form Paypal_Payments_Pro Hope that makes sense! Thanks for your help!
October 13, 200916 yr you can change radio to button. However it may end up calling the button Print_Order_Form or Paypal_Payments_Pro EDIT: just checked, it does work and does display as Print_Order_Form. however if you rename your gateway to want you want dispolayed (eg; Print Form) then it works fine.
October 13, 200916 yr Author Hey thanks for the response! This is what I have tried : <input type="button" value="Print_Order_Form" onclick="javascript:submitDoc('gateway');" /> <input type="button" value="Paypal_Payments_Pro" onclick="javascript:submitDoc('gateway');" /> So that would give me two buttons, however this doesn't work as nothing is submitted and name of the buttons is 'Print_Order_Form' etc which isn't ideal, I'm not sure how to hook these buttons up using the radio button code. This is what I'm trying to achieve: Thanks again
October 13, 200916 yr Author Hey thanks Darren! What was the exact code you used? As I can not seem to get it to work, nothing submits
October 13, 200916 yr Author I think I got it to work with some crazy code editing : ) Hopefully there will not be any problems with it! <!-- BEGIN: gateway --> <br> <div id="viewCart" class="wrapper"> <div class="top"></div> <div class="inside"> <!-- BEGIN: cart_false --> <p>{LANG_CART_EMPTY}</p> <!-- END: cart_false --> <!-- BEGIN: cart_true --> <div id="gateway"> <!-- BEGIN: choose_gate --> <h1>Make Payment</h1> <p>Please choose your preferred payment method from those listed below.<br /> Your order will not be completed until payment has cleared.</p> <div id="gatewayBG"> <h1>{LANG_PAYMENT_SUMMARY}</h1> </div> <br clear="all" /> <form action="{VAL_FORM_ACTION}" method="{VAL_FORM_METHOD}" name="gateway_Paypal" target="{VAL_TARGET}"> <div id="gatewayBG"> <h1>Paypal</h1> <div id="paypalGatewayImg"> <img src="skins/{VAL_SKIN}/styleImages/paypal_gateway.jpg"> </div> <p>Paypal payment method explain text here.</p> </div> <input name="gateway" type="hidden" value="PayPal" {VAL_CHECKED} /> <input type="button" class="gatewayButton" value="Pay with Paypal" onclick="javascript:submitDoc('gateway_Paypal');" /> </form> <br clear="all" /> <br clear="all" /> <div id="gatewayBG"> <form action="{VAL_FORM_ACTION}" method="{VAL_FORM_METHOD}" name="gateway_Print_Order_Form" target="{VAL_TARGET}"> <h1>Postal Order Form</h1> <p>Postal order form payment method explain text here.</p> </div> <input name="gateway" type="hidden" value="Print_Order_Form" {VAL_CHECKED} /> <input type="button" class="gatewayButton" value="Pay by Postal Order Form" onclick="javascript:submitDoc('gateway_Print_Order_Form');" /> </form> <!-- END: choose_gate --> <!-- BEGIN: transfer --> <form action="{VAL_FORM_ACTION}" method="{VAL_FORM_METHOD}" name="gateway" target="{VAL_TARGET}"> {FORM_PARAMETERS} <!-- BEGIN: auto_submit--> <p>{LANG_TRANSFERRING}</p> <p><img src="skins/{VAL_SKIN}/styleImages/progress.gif" alt="Payment Gateway Progress" onload="submitDoc('gateway')" /></p> <!-- END: auto_submit--> <!-- BEGIN: manual_submit--> <p>{LANG_FORM_TITLE}</p> {FORM_TEMPLATE} <!-- END: manual_submit--> <a href="javascript:submitDoc('gateway');" class="txtButton">{LANG_CHECKOUT_BTN}</a> </form> <!-- END: transfer --> <br clear="all" /> <br clear="all" /> </div> <!-- END: cart_true --> </div> </div> <!-- END: gateway -->
October 13, 200916 yr Hi Richard, My method only worked if there was only one payment gateway. Doh!. Having looked at your fix, I don't see any reason why it wouldn't work. Have you tested it?
October 13, 200916 yr Author Yes thanks it worked perfectly : ) Currently testing the entire site so hopefully it wont cause any problems! You can have alook here if you wish - http://development.ask-models.com Thanks again for your help!
Create an account or sign in to comment