2013-02-21 19:17
i want to use radio buttons for payment selection. for example ; templates/order-step-2.php
< input type = "radio" value = "Banka Havalesi - EFT - Western Union" name = "odemesekli[]" onClick = "odeme1()" /> Banka Havalesi / EFT / Western Union < input type = "radio" value = "Kapıda Nakit Ödeme" name = "odemesekli[]" onClick = "odeme2()" checked = "checked" /> Kap & #305;da Nakit Ödeme
in addition, i add this code same file ;
if (isset( $aData [ "odemesekli" ]) && is_array ( $aData [ "odemesekli" ]) && count ( $aData [ "odemesekli" ]) > 0 ) { foreach( $aData [ 'odemesekli' ] as $checkodemesekli ) { $odemesekli_msg .= "$checkodemesekli\n" ; } }
and then, i add below code templates/admin directory orders-form.php file
<input type="text" name="odemesekli[]" value="<?php if( isset( $aData [ '$odemesekli_msg' ] ) ) echo $aData [ '$odemesekli_msg' ]; ?> " size="50" maxlength="40" class="input" alt="simple" />
but radio buton's selected options doesn't appear How can i do ?
» Quick.Cart v6.x 2013-02-21 20:37
1. in order-step-2.tpl find:
<select name="sShippingPayment" title="simple;<?php echo $lang [ 'Select_shipping_and_payment' ]; ?> " onchange="countShippingPrice( this )" id="oShippingPayment"> <option value=""><?php echo $lang [ 'Select' ]; ?> </option> <?php echo $sShippingPaymentSelect ; ?> </select>
Delete and leave only
<?php echo $sShippingPaymentSelect ; ?>
2. Open core/orders.php and change
'<option value="' . $iShipping . ';' . $iPayment . ';' . $fShippingPaymentPrice . '">' . $aData [ 'sName' ]. ' - ' . $aPayments [ $iPayment ][ 'sName' ]. ': ' . displayPrice ( $fShippingPaymentPrice ). ' ' . $GLOBALS [ 'config' ][ 'currency_symbol' ] . '</option>' ;
with:
'<input type="radio" value="' . $iShipping . ';' . $iPayment . ';' . $fShippingPaymentPrice . '" name="sShippingPayment" onclick="countShippingPrice( this )" id="oShippingPayment">' . $aData [ 'sName' ]. ' - ' . $aPayments [ $iPayment ][ 'sName' ]. ': ' . displayPrice ( $fShippingPaymentPrice ). ' ' . $GLOBALS [ 'config' ][ 'currency_symbol' ]. '<br>' ;
Should work.
2013-03-29 01:33
Thanks @interkob for answer but i dont want to use with shipping shipping payment etc.. Again i want to use for example order-step-2 i used array method for name="payment"
< input type = "radio" name = "payment[]" value = "bank transfer" /> < input type = "radio" name = "payment[]" value = "cash" /> cash < input type = "radio" name = "payment[]" value = "cart" /> cart
Where can i used below my php code or how i can use it
if (isset( $_POST [ "payment" ]) && is_array ( $_POST [ "payment" ]) && count ( $_POST [ "payment" ]) > 0 ) { foreach( $_POST [ 'payment' ] as $checkpayment ) { $payment_msg .= "$checkpayment\n" ; } }
2013-03-29 09:40
so you want to use radio buttons for payments? and how about shipping?
2013-03-29 13:50
hocam kodunu paylasirmisin.
2013-03-29 14:57
@interkop Yes, I want to use only radio buttons for payments in additon, I dont use shipping because it is not necessary. My screen ; [IMG]http://i50.tinypic.com/21od7cp.png[/IMG] direct link : http://i50.tinypic.com/21od7cp.png after then, i wanna see choosen payment type in my admin panel's orders-form screen admin panel ; [IMG]http://i47.tinypic.com/5pid5w.png[/IMG] http://i47.tinypic.com/5pid5w.png Thanks interkob @Ortahan burdan kodları paylaşmam sıkıntı olabilir. Mail adresim hakkidilek@gmail.com ordan mesaj atarsan paylaşırım iletişime geçebiliriz.
2013-03-29 15:23
so there is no differences. you've got the solution above how to use check button list. if you do not want to display the shipping name, then delete the following code from the code above. $aData['sName'].' - '. also you should delete the name from email and order print page. with admin side that would be another changes. let me know how is going.