/** * @param \XLite\Module\CDev\Coupons\Model\Coupon $coupon Coupon * @param \XLite\Model\Order $cart Cart * * @return string */ protected function checkCompatibility($coupon, $cart) { $error = ''; try { $coupon->checkCompatibility($cart) && $coupon->checkUnique($cart); } catch (\XLite\Module\CDev\Coupons\Core\CompatibilityException $exception) { $error = static::t($exception->getMessage(), $exception->getParams()); } return $error; }