Ejemplo n.º 1
0
 /**
  * Check quote amount
  *
  * @param \Magento\Sales\Model\Quote $quote
  * @param float $amount
  * @return $this
  */
 public function checkQuoteAmount(\Magento\Sales\Model\Quote $quote, $amount)
 {
     if (!$quote->getHasError() && $amount >= self::MAXIMUM_AVAILABLE_NUMBER) {
         $quote->setHasError(true);
         $quote->addMessage(__('This item price or quantity is not valid for checkout.'));
     }
     return $this;
 }