public function check(Discount $discount) { if ($discount->MinOrderValue > 0 && $this->order->SubTotal() < $discount->MinOrderValue) { $this->error(sprintf(_t("Discount.MINORDERVALUE", "Your cart subtotal must be at least %s to use this discount"), $discount->dbObject("MinOrderValue")->Nice())); return false; } return true; }