Esempio n. 1
0
 /**
  * Check if cart meets basic requirements for a coupon
  *
  * @param CartInterface   $cart   Cart
  * @param CouponInterface $coupon Coupon
  *
  * @throws CouponIncompatibleException Coupon incompatible
  */
 public function validateCoupon(CartInterface $cart, CouponInterface $coupon)
 {
     if ($cart->getTotalItemNumber() === 0) {
         throw new CouponIncompatibleException();
     }
     $this->couponManager->checkCoupon($coupon);
 }