Mindestbestellwert und 2 Währungen
Aus Wiki | modified eCommerce Shopsoftware
Zur Navigation springenZur Suche springenNur bis zur Version 1.03 der modified eCommerce Shopsoftware (Behoben ab Revision r924 pre1.04)
Wenn ich als Mindestbestellwert 5 EUR (=Hauptwährung) angebe funktioniert der Mindestbestellwert wenn ich den Artikel in EUR kaufen möchte. Wenn ich aber in einer anderen, geringer wertigen, Währung bezahlen möchte, so ist mein Mindestbestellwert schon nach 5 Einheiten dieser Währung erreicht. Ein Bruchteil des eigentlichen Mindestbestellwertes.
Bugfix:
Datei /shopping_cart.php, Zeile 99 ca.
Finde:
if ($_SESSION['cart']->show_total() < $_SESSION['customers_status']['customers_status_min_order'] ) {
$_SESSION['allow_checkout'] = 'false';
$more_to_buy = $_SESSION['customers_status']['customers_status_min_order'] - $_SESSION['cart']->show_total();
$order_amount=$xtPrice->xtcFormat($more_to_buy, true);
$min_order=$xtPrice->xtcFormat($_SESSION['customers_status']['customers_status_min_order'], true);
$smarty->assign('info_message_1', MINIMUM_ORDER_VALUE_NOT_REACHED_1);
$smarty->assign('info_message_2', MINIMUM_ORDER_VALUE_NOT_REACHED_2);
$smarty->assign('order_amount', $order_amount);
$smarty->assign('min_order', $min_order);
}
Ersetze gegen:
if ( $xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total()) < $_SESSION['customers_status']['customers_status_min_order'] ) {
$_SESSION['allow_checkout'] = 'false';
//$more_to_buy = $_SESSION['customers_status']['customers_status_min_order'] - $_SESSION['cart']->show_total();
$more_to_buy = $_SESSION['customers_status']['customers_status_min_order'] - $xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total());
$more_to_buy *= $xtPrice->currencies[$xtPrice->actualCurr]['value'];
$order_amount=$xtPrice->xtcFormat($more_to_buy, true);
$min_order = $_SESSION['customers_status']['customers_status_min_order'];
$min_order *= $xtPrice->currencies[$xtPrice->actualCurr]['value'];
$min_order=$xtPrice->xtcFormat($min_order, true);
$smarty->assign('info_message_1', MINIMUM_ORDER_VALUE_NOT_REACHED_1);
$smarty->assign('info_message_2', MINIMUM_ORDER_VALUE_NOT_REACHED_2);
$smarty->assign('order_amount', $order_amount);
$smarty->assign('min_order', $min_order);
}