Jump to content

Radio buttons in checkout


Recommended Posts

I've been updating my custom skin to be more in line with the stock Foundaton for version 6.2.9.

I have everything close to where it needs to be, but I'm having problems with the checkout page on the small display.

I use radio buttons instead of the dropdown for choosing shipping options. Back in CC5 Brian had helped me with this.

I can get a shipping estimate and the options will update. Problem is if the customer chooses another option, say Parcel Select instead of the automatically selected 1st class, it will not update to the newly selected option, automatically like in checkout.medium or when I click update.  It just won't update at all.

 

Here is the code I'm using:

<td class="bordr4" colspan="4">

              <div class="fz-14l bold pad-top">Select your shipping method  </div>

             <div class="fz-11t fc-darkred" style="font-weight:normal; padding-bottom:0.625rem!important;"> This may change when your actual delivery address is known</div>

                <ul class="no-bullet left" style="margin-top: 0rem!important;margin-bottom: 0rem!important;">

                  {foreach from=$SHIPPING key=group item=methods}

                  {foreach from=$methods item=method}

                  <li>

                    <input name="shipping" type="radio" value="{$method.value}" id="{$method.value}" {$method.selected|replace:'selected':'checked'}><label for="{$method.value}">{$method.display}</label>

                  </li>

                  {/foreach}

                  {/foreach}

                          </ul>

                 </td>     

 

Thanks for any and all help

Link to comment
Share on other sites

Please enable debug mode and enter your IP address in the following text entry field (www.whatismyip.com).

This is solely to stop Smarty from combining and squeezing the CSS and javascript files. This makes troubleshooting several magnitudes of effort easier.

I am not seeing a javascript "click" or "change" event anywhere in the content_checkout_small block.

There are inputs (type of radio), but no encompassing <form> tag. Which implies:

Code that may resemble in content.checkout.php:

{if isset($ITEMS)}
<form action="{$VAL_SELF}" method="post" enctype="multipart/form-data" class="autosubmit" id="checkout_form">
   {if $INCLUDE_CHECKOUT}
   {include file='templates/content.checkout.confirm.php'}
   {/if}
   <h2>{$LANG.checkout.your_basket}</h2>
   {include file='templates/content.checkout.medium-up.php'}
   {include file='templates/content.checkout.small.php'}
   <div class="row">

Check to see if content.checkout.small.php is sitting right next to content.checkout.medium-up.php.

Link to comment
Share on other sites

I have enabled debug

My checkout looks like this:

 

{if isset($ITEMS)}

<form action="{$VAL_SELF}" method="post" enctype="multipart/form-data" class="autosubmit" id="checkout_form">

   {if $INCLUDE_CHECKOUT}

   {include file='templates/content.checkout.confirm.php'}

   {/if}

   <h2>{$LANG.checkout.your_basket}</h2>

   {include file='templates/content.checkout.medium-up.php'}

   {include file='templates/content.checkout.small.php'}

   <div class="row">

         <div class="medium-8 columns text-right">

            {$LANG.basket.coupon_add}

         </div>

Link to comment
Share on other sites

Not that this may be causing the issue, but there are several table rows that do not have the closing </tr> tags.

There is also an extra </div> at the end of the medium-up template.

Again, that may not fix it, but these edits are needed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...