Unable to remove unwanted drop-down menu in shopping cart

Questions and answers about ShopSite Custom Templates

Unable to remove unwanted drop-down menu in shopping cart

Postby sivstorhaug » Sat Dec 29, 2012 7:56 pm

I have messed up a little, I wanted radio buttons for the payment option, looks like I've got that part working, BUT, now there is an unwanted (and empty) drop down box side by side to the first radio button, where did I go wrong? How do I get rid of it?

The custom template now looks like this: http://neglemakeriet.com/store/media/remove-drop-down-menu.jpg

The HTML is as follows:


<tr>
<td>
<center>
<span id="ss_payment">
<script type="text/javascript" language="JavaScript">
<!--
function re_check_none(){;}
// -->
</script>

<font color="red" size="5px"><b>Velg betalingsmåte</b></font>
<br><br>


<select class="paytype" name="paytype" id="selPaytype">


<INPUT TYPE=RADIO value=13 checked>VISA/MasterCard<br>
<INPUT TYPE=RADIO value=4 >Nettbank/PayPal etter utsjekking
</select>
</span>
</center>


</td>
</tr>

# <tr><td align="center"><hr noshade size="2"></td></tr>

<tr>
<td class="buttons"><table class="checkout">
<tr>
<br>
<br>
<br>
<br>
<br>

<td class="checkout">[-- BUTTON ContinueShopping --]</td>
<td class="checkout">[-- BUTTON Checkout --]</td>
</tr>
</table></td>





Grateful for any help :D
sivstorhaug
 
Posts: 13
Joined: Fri Jun 01, 2007 11:44 am

Re: Unable to remove unwanted drop-down menu in shopping car

Postby Jim » Sat Dec 29, 2012 10:25 pm

There is not an option to have the payment types display as radio buttons. It looks like you are trying to force that by adding the code yourself but I don't think that it would be possible to do because the template tag that outputs the payment selection code needs to be in the template so that all required fields are present.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Unable to remove unwanted drop-down menu in shopping car

Postby sivstorhaug » Tue Jan 01, 2013 3:49 pm

Thank you Jim, you are absolutely right. I will have to do further testing, but it looks like it is working all right (orders and payments received) apart from the empty drop down menu on the side there. It is, like you say, no option for radio buttons, and that's the problem. Customers constantly send in ordres without choosing the right payment option, because they do not see the different choises they have, therefore they end up with the prechecked payment option bank transfer instead of WorldPay. And making a lot of extra work for me. Is there a way to remove the empty drop down menu, regardless of other issues I might have to resolve?
sivstorhaug
 
Posts: 13
Joined: Fri Jun 01, 2007 11:44 am

Re: Unable to remove unwanted drop-down menu in shopping car

Postby Jim » Thu Jan 03, 2013 10:03 am

The empty select box is displaying because you still have a select statement in your code.
Code: Select all
<font color="red" size="5px"><b>Velg betalingsmåte</b></font>
<br><br>
<select class="paytype" name="paytype" id="selPaytype">
<INPUT TYPE=RADIO value=13 checked>VISA/MasterCard<br>


To test the functionality in a custom template I replaced this line
Code: Select all
  [-- SC_PaymentSelection --]

With this code
Code: Select all
<span id="ss_payment">
<script type="text/javascript" language="JavaScript">
<!--
function re_check_none(){;}
// -->
</script><table><tr><td>
Select payment type:&nbsp;
#<select class="paytype" name="paytype" id="selPaytype">
</td></tr>
<tr><td class="paytype"><input checked="" name="paytype" value="0" type="radio"> VISA</td>
</tr>
<tr><td class="paytype"><input name="paytype" value="5" type="radio"> C.O.D.</td>
</tr>
</table>
</span>

It displayed the two payment options VISA and C.O.D. as radio buttons on the shopping cart screen and when I chose one of them that was what was used on the checkout page. Note that doing this does not preserve the selected payment option if the shopper goes to the checkout screen and then returns to the shopping cart, it will revert back to the initial "checked" value.
A recalculate may also cause it to revert to the "checked" value.

A list of the valid "paytype" values and what payment method they are associated with can be found on ttp://www.shopsite.com/help/11.2/en-US/sc/pro/order.api.spec.html

I don't know what other ramifications this might have but it appears to basically work for me.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 24 guests

cron