/** * add data from the inventory service to the order item * @param IOrderItem * @param Mage_Sales_Model_Order_Item * @return self */ public function injectShippingEstimates(IOrderItem $itemPayload, Mage_Sales_Model_Order_Item $item) { $detail = $this->detailService->getDetailsForOrderItem($item) ?: $this->helper->getOcrBackorderableEddData($item); if ($detail && $detail->isAvailable()) { $itemPayload->setEstimatedDeliveryMode(IEstimatedDeliveryDate::MODE_ENABLED)->setEstimatedDeliveryMessageType(IEstimatedDeliveryDate::MESSAGE_TYPE_DELIVERYDATE)->setEstimatedDeliveryTemplate($this->edd->getEddTemplate()); $this->handleDateFields($itemPayload, $detail); } return $this; }
/** * Get an estimated delivery message for a quote item. * * @return string */ public function getEddMessage() { return $this->edd->getEddMessage($this->getItem()); }