Payment selection, radio buttons?

Questions and answers about ShopSite Custom Templates

Payment selection, radio buttons?

Postby sivstorhaug » Thu Jul 19, 2012 10:38 am

Does anybody know how to transform the drop-down-menu for the payment options in the shopping cart into radio buttons? My customers don't get that there are several options as they see only the first one in the drop-down-menu... I have not been able to locate any check box where to choose radio buttons instead of drop-down-menu, so my guess is that there must be a way integrating some nice HTML-code in the Shopping Cart Template... Or?
sivstorhaug
 
Posts: 13
Joined: Fri Jun 01, 2007 11:44 am

Re: Payment selection, radio buttons?

Postby Jim » Thu Jul 19, 2012 11:53 am

There is currently no option to display the payment options as a list of radio button options instead of the pulldown list.
The template tag that displays the payment options is [-- SC_PaymentSelection --]. I put some text, JIM<br> before and <br>JIM after the tag in my template to see what it out puts and here is what I get.
Code: Select all
JIM <br>
      <span id="ss_payment">
<script type="text/javascript" language="JavaScript">
<!--
function re_check_none(){;}
// -->
</script>
Select payment type:&nbsp;<select class="paytype" name="paytype" id="selPaytype">
<option selected="selected" value="-1">Choose a Payment option</option>
<option value="0">Visa</option>
<option value="1">MasterCard</option>
<option value="2">Discover</option>
<option value="5">C.O.D. </option>
</select>
</span>
<br>JIM

It would probably be possible to convert that code to use the radio button input style and just hard code it into your template and leave the template tag out. There are some issues that would need to be looked at before doing this. 1. Once hardcoded into the template any changes you make to the payment methods in the backoffice would not be reflected in the shopping cart. So if you stop taking Visa for example it won't disappear from the shopping cart, but it would if you used the template tag. 2. The text "Select payment type:" would also not change if you changed it in the backoffice like the template tag would allow. 3. You would need to make sure you have the correct "value=X" for the payment method, I don't know if there is a list of what all the possibilities are but if you configure your store to use the ones you want then you could view the source of the shopping cart and find the related numbers. 4. Not sure what would be needed for payments that don't go through the ShopSite checkout screen like PayPal, Google Checkout etc.

No guarantee that it will work but you could give it a try, making sure to check that each option still works.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Payment selection, radio buttons?

Postby robm » Thu Jul 19, 2012 12:52 pm

I found this link that shows how to convert a dropdown to radio buttons using JQuery:

http://stackoverflow.com/questions/3974217/convert-dropdowns-to-radio-buttons-w-o-modifying-html

Might be worth testing.

Rob
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 100 guests