|
|||
|
Hi,
ich m?chte beim vorletzten Schritt der Bestellabwicklung (Auswahl der Zahlungsart) eine kurze Beschreibung der jeweiligen Zahlart hinzuf?gen. Zudem soll die Checkbox VOR der Zahlart stehen, nicht dahinter. Ich habe schon etwas in der checkout_payment.php herumgespielt, finde jedoch keinen Ansatz. Vielen Dank f?r die Hilfe
|
|
|||
|
Leider hilf mir das nicht weiter. Der Bereich, in dem die Checkbox VOR die Versandart geschoben werden soll, wird in der checkout_payment.html lediglich als '"{$PAYMENT_BLOCK}" angezeigt. Die Infos zu den Zahlungsarten werde ich wahrscheinlich mit Javascript einbinden... falls es mir gelingt.
Nun bleibt nur noch das Problem mit der Checkbox. ![]()
|
|
|||
|
Das ist eine gute Idee, weil einfach besser lesbar. Werden wir auch bei uns so ?ndern.
Wir haben die ?nderung so angelegt, dass man w?hlen kann, ob die Optionsfelder links oder rechts positioniert werden. Das wird gesteuert durch die Variable "$OptionBoxRight" Folgende ?nderungen sind dazu notwendig: ================================================== ================================================== =========================== im Module <span style='color:blue'>checkout_payment.php</span> Code:
$selection = $payment_modules->selection();
$radio_buttons = 0;
for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
$payment_block .= '
<tr>
<td>'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
';
if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
$payment_block .= ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')" >' . "\n";
} else {
$payment_block .= ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
$payment_block .= '
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td class="main" colspan="3"><b>'. $selection[$i]['module'].'</b></td>
<td class="main" align="right" >
';
if (sizeof($selection) > 1) {
$payment_block .= xtc_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $_SESSION['payment']));
} else {
$payment_block .= xtc_draw_hidden_field('payment', $selection[$i]['id']);
}
$payment_block .= '
</td>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>
';
Code:
$selection = $payment_modules->selection();
// W. Kaiser
$OptionBoxRight =false; // true; //Optionbox position: true-> on right side, false-> on left side
$radio_buttons = 0;
for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
$payment_block .= '
<tr>
<td>'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
';
if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
$payment_block .= ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')" >' . "\n";
} else {
$payment_block .= ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
$payment_block .= '
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
';
if ($OptionBoxRight)
{
$payment_block .= '
<td class="main" colspan="3"><b>'. $selection[$i]['module'].'</b></td>
';
}
$payment_block .= '
<td class="main" align="left" width="3%">
';
if (sizeof($selection) > 1) {
$payment_block .= xtc_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $_SESSION['payment']));
} else {
$payment_block .= xtc_draw_hidden_field('payment', $selection[$i]['id']);
}
$payment_block .= '
</td>
';
if (!$OptionBoxRight)
{
$payment_block .= '
<td class="main" colspan="3" align="left"><b>'. $selection[$i]['module'].'</b></td>
';
}
$payment_block .= '
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>
';
// W. Kaiser
Die Verwendung erfolgt auf eigene Gefahr, wir ?bernehmen keinerlei Gew?hrleistung f?r die Fehlerfreiheit dieser ?nderungen. Vor allen ?nderungen unbedingt den Originalzustand sichern!. |
|
|||
|
Aus Konsistenzgr?nden haben wir auch die Auswahl der Versandart jetzt entsprechend ge?ndert.
Wir haben die ?nderung so angelegt, dass man w?hlen kann, ob die Optionsfelder links oder rechts positioniert werden. Das wird gesteuert durch die Variable "$OptionBoxRight" Folgende ?nderungen sind dazu notwendig: ================================================== ================================================== =========================== im Module <span style='color:blue'>checkout_shipping.php</span> Code:
$radio_buttons = 0;
for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
$shipping_block .='
<tr>
<td>'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td class="main" colspan="3"><b>'. $quotes[$i]['module'].'</b>'. $quotes[$i]['icon'].'</td>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>';
if (isset($quotes[$i]['error'])) {
$shipping_block .='
<tr>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td class="main" colspan="3">'. $quotes[$i]['error'].'</td>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>';
} else {
for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);
if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
$shipping_block .=' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
$shipping_block .= ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
$shipping_block .='
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td class="main" width="75%">'. $quotes[$i]['methods'][$j]['title'].'</td>
';
if ( ($n > 1) || ($n2 > 1) ) {
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 ) $quotes[$i]['tax'] = '';
if ($_SESSION['customers_status']['customers_status_show_price_tax']==0) $quotes[$i]['tax']=0;
$shipping_block .='
<td class="main">'. xtc_format_price(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']),$price_special=1,$calculate_currencies=true).'</td>
<td class="main" align="right">'. xtc_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked).'</td>
';
} else {
if ($_SESSION['customers_status']['customers_status_show_price_tax']==0) $quotes[$i]['tax']=0;
$shipping_block .='
<td class="main" align="right" colspan="2">'. xtc_format_price(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']),$price_special=1,$calculate_currencies=true) . xtc_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']).'</td>
';
}
$shipping_block .='
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>
';
$radio_buttons++;
}
}
$shipping_block .='
</table></td>
<td>'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>
';
}
Code:
// W. Kaiser
$OptionBoxRight =false; // true; //Optionbox position: true-> on right side, false-> on left side
$radio_buttons = 0;
for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
$shipping_block .='
<tr>
<td>'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td class="main" colspan="3"><b>'. $quotes[$i]['module'].'</b>'. $quotes[$i]['icon'].'</td>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>';
if (isset($quotes[$i]['error'])) {
$shipping_block .='
<tr>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
<td class="main" colspan="3">'. $quotes[$i]['error'].'</td>
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>';
} else {
for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);
if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
$shipping_block .='<tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
$shipping_block .= '<tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
$shipping_block .='
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>';
if ($OptionBoxRight)
{
$shipping_block .='<td class="main" width="75%">'. $quotes[$i]['methods'][$j]['title'].'</td>';
}
else
{
$shipping_block .='<td class="main" align="left" width="10">'. xtc_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked).'</td>';
}
$shipping_block .= '<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>';
if ( ($n > 1) || ($n2 > 1) ) {
if ($OptionBoxRight)
{
//if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 ) $quotes[$i]['tax'] = '';
if ($_SESSION['customers_status']['customers_status_show_price_tax']==0) $quotes[$i]['tax']=0;
$shipping_block .='
<td class="main">'. xtc_format_price(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']),$price_special=1,$calculate_currencies=true).'</td>';
$shipping_block .= '<td class="main" align="right">'. xtc_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked).'</td>';
}
else
{
$shipping_block .='<td class="main" width="75%" align="left">'. $quotes[$i]['methods'][$j]['title'].'</td>';
//if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 ) $quotes[$i]['tax'] = '';
if ($_SESSION['customers_status']['customers_status_show_price_tax']==0) $quotes[$i]['tax']=0;
$shipping_block .='
<td class="main">'. xtc_format_price(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']),$price_special=1,$calculate_currencies=true).'</td>';
}
} else {
if ($_SESSION['customers_status']['customers_status_show_price_tax']==0) $quotes[$i]['tax']=0;
$shipping_block .='
<td class="main" align="right" colspan="2">'. xtc_format_price(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']),$price_special=1,$calculate_currencies=true) . xtc_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']).'</td>
';
}
$shipping_block .='
<td width="10">'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>
';
$radio_buttons++;
}
}
$shipping_block .='
</table></td>
<td>'. xtc_draw_separator('pixel_trans.gif', '10', '1').'</td>
</tr>
';
}
// W. Kaiser
Die Verwendung erfolgt auf eigene Gefahr, wir ?bernehmen keinerlei Gew?hrleistung f?r die Fehlerfreiheit dieser ?nderungen. Vor allen ?nderungen unbedingt den Originalzustand sichern!. |
![]() |
| Lesezeichen |
| Stichworte |
| auswahl, zahlungsweise |
| Themen-Optionen | |
| Ansicht | |
|
|