Hallo,


Undzwar gibt es einen Bug wenn der Gutscheinwert über dem Bestellwert liegt bzw diesen Abdeckt.

GX 3.7.2.0 und vorher.
PHP 7.1.8


In der includes/classes/order_total.php

Zeile 179 wird das total aus der $order genommen anstatt aus dem berechneten $order_total

Hab hier mal die Zeile auskommentiert und mit der richtigen ersetzt (2. if unten):

Code:
	function pre_confirmation_check() {
		global $order;
		if (MODULE_ORDER_TOTAL_INSTALLED) {
			$total_deductions = 0;
			reset($this->modules);
			$order_total = $order->info['total'];
			while (list (, $value) = each($this->modules)) {
				$class = substr($value, 0, strrpos($value, '.'));
				$order_total = $this->get_order_total_main($class, $order_total);
				if (($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class)) {
					$total_deductions = $total_deductions + $GLOBALS[$class]->pre_confirmation_check($order_total);
					$order_total = $order_total - $GLOBALS[$class]->pre_confirmation_check($order_total);
				}
			}
			if( round( $order_total, 2 ) - round( $total_deductions, 2 ) <= 0 ) {
			//if (round($order->info['total'], 2) - round($total_deductions, 2) <= 0) { //dont use $order total, use calculated $order_total
				$_SESSION['credit_covers'] = true;
			} else { // belts and suspenders to get rid of credit_covers variable if it gets set once and they put something else in the cart
				unset ($_SESSION['credit_covers']);
			}
		}
	}

Dadurch wird die Session Variable nicht gesetzt, welche aussagt das der Gutschein den Bestellwert abdeckt und man kann die Bestellung nicht abschließen, da ein Zahlungmodul ausgewählt werden soll/muss welche nicht angezeigt werden da der Gutschein den Wert deckt.


Viele Grüße

Nils