Exemplo n.º 1
0
 /**
  * Don't add item to the collection if only fixed are allowed and its carrier is not fixed
  *
  * @param \Magento\Quote\Model\Quote\Address\Rate $rate
  * @return $this
  */
 public function addItem(\Magento\Framework\Object $rate)
 {
     $carrier = $this->_carrierFactory->get($rate->getCarrier());
     if ($this->_allowFixedOnly && (!$carrier || !$carrier->isFixed())) {
         return $this;
     }
     return parent::addItem($rate);
 }