chrometweaks.org

iPage host and domain connection problem ?

Click Here To View All Answers...


Quick question... iPage host and domain connection problem ? Many thanks for any answer or 2. My other question... I've looked around the forums for this, but no luck. Is it possible to set a particular payment module as the "default"? ie, for shipping modules the cheapest method is pre-selected for the customer. Can I pre-select the radio button for "credit card"?..

Comments (68)

That's a good question. I'm not sure what is the answer to your question. I'll do some poking around and get back to you if I bump into an anything. You should email the people at iPage as they probably could give you an answer..

Comment #1

Here's what I did:.

 $radio_buttons = 0;.

 for ($i=0, $n=sizeof($selection); $i<$n; $i++) {.

?>.

             <tr>.

               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>.

               <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">.

<?php.

   if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {.

     echo '                  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, '$radio_buttons')">'"\n";.

   } else {.

     echo '                  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, '$radio_buttons')">'"\n";.

   }.

?>.

                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>.

                   <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>.

                   <td class="main" align="right">.

<?php.

   if (sizeof($selection) > 1) {.

     echo tep_draw_radio_field('payment', $selection[$i]['id']);.

   } else {.

     echo tep_draw_hidden_field('payment', $selection[$i]['id']);.

   }.

?>.

I don't remember exactly what that replaces...

Comment #2

BlueNoteMKVI stuff probably works as well, but here's what I did..

In catalog/checkout_payment.php around line 256 I found this.

And I replaced it with.

This sets the radio select button on the first module you setup in in admin using the sort order..

HTH.

Tom..

Comment #3

Great tip, thanks..

Could the class="moduleRowSelected" be preset as well?..

Comment #4

Be careful. I suspect this will cause problems if the customer goes back to the checkout_payment page after changing their selection. It will look to the user as if the first payment type is selected - at least I think it will. I suspect the right approach is to loop through the values of $selection[$i]['id'] to see if any are selected, and if not, set the first one...

Comment #5

Im trying to get this to work as well. has anyone tried any of the solutions mentioned here? has it worked for anyone?..

Comment #6

I've looked around the forums for this, but no luck. Is it possible to set a particular payment module as the "default"? ie, for shipping modules the cheapest method is pre-selected for the customer. Can I pre-select the radio button for "credit card"?..

Comment #7

Yes, yes... I am running into this problem as well. I suppose someone with alot of PHP experience could set something to be the default radio button selected as I know I've been able to select this within HTML. Any PHP pros who will take this one on out there?.

Tim..

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.