public function addItem(PropertyValue $property) { /** @var PropertyValue $property */ $property = parent::addItem($property); $order = $this->getOrder(); return $order->onPropertyValueCollectionModify(EventActions::ADD, $property); }
/** * @param Payment $payment * @return bool|void */ public function addItem(Payment $payment) { /** @var Payment $payment */ $payment = parent::addItem($payment); $order = $this->getOrder(); return $order->onPaymentCollectionModify(EventActions::ADD, $payment); }
/** * @param Shipment $shipment * @return Internals\CollectableEntity|void */ protected function addItem(Shipment $shipment) { /** @var Shipment $shipment */ $shipment = parent::addItem($shipment); $order = $this->getOrder(); $order->onShipmentCollectionModify(EventActions::ADD, $shipment); return $shipment; }
/** * @param ShipmentItemStore $shipmentItemStore * @return bool|void */ public static function addItem(ShipmentItemStore $shipmentItemStore) { parent::addItem($shipmentItemStore); }
/** * @param ShipmentItem $shipmentItem * @return Internals\CollectableEntity|void * @throws Main\NotSupportedException */ protected function addItem(ShipmentItem $shipmentItem) { parent::addItem($shipmentItem); /** @var Shipment $shipment */ $shipment = $this->getShipment(); $shipment->onShipmentItemCollectionModify(EventActions::ADD, $shipmentItem); // $shipment->setFieldNoDemand('PRICE_DELIVERY', $this->getPrice()); }