I am trying to write a new observer class to check shipping method and minimum order amout. I am basing all this on the Minimum Order contrib that I have installed and working.
This works...
But, if I try to add the AND shipping method like this...PHP Code:if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
$messageStack->add('checkout_payment', sprintf($_SESSION['shipping']['id'] . TEXT_ORDER_UNDER_MIN_CHECKOUT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
}
The code fails.PHP Code:if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) && ($_SESSION['shipping']['id'] == 'flat_flat') {
$messageStack->add('checkout_payment', sprintf($_SESSION['shipping']['id'] . TEXT_ORDER_UNDER_MIN_CHECKOUT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
}
What I don't understand is the $_SESSION['shipping']['id'] prints fine in the message. I assume that means I am using the right variable.
Did I use the wrong var, or am I doing something wrong with my compare or my AND?
Thanks,
Jeff


That was it.
