Пример #1
0
 /**
  * Add Shipment to cart
  *
  * @param Shipment
  * @return Cart
  */
 public function setShipment(Shipment $shipment)
 {
     $key = Shipment::getKey($shipment->getId());
     $this->_shipments[$key] = $shipment;
     return $this;
 }
Пример #2
0
 /**
  * Add a specified Shipment to this Discount
  *
  * @param Shipment
  * @return Discount
  */
 public function setShipment(Shipment $shipment)
 {
     $key = Shipment::getKey($shipment->getId());
     if (!in_array($key, $this->getShipments())) {
         $this->_shipments[] = $key;
     }
     return $this;
 }