/** * Logs fulfillment of order * * @return bool */ public function logFulfillmentEvent($ps_fulfillment_method, $ps_fulfillment_details = null, $ps_notes = null) { if (!$this->getPrimaryKey()) { return null; } return ca_commerce_fulfillment_events::logEvent($this->get('order_id'), $this->get('item_id'), $ps_fulfillment_method, $ps_fulfillment_details, $ps_notes); }
/** * */ public static function logEvent($pn_order_id, $pn_item_id, $ps_fulfillment_method, $ps_fulfillment_details = null, $ps_notes = null) { $t_event = new ca_commerce_fulfillment_events(); $t_event->setMode(ACCESS_WRITE); $t_event->set('order_id', $pn_order_id); $t_event->set('item_id', $pn_item_id); $t_event->set('fulfillment_method', $ps_fulfillment_method); $t_event->set('fulfillment_details', $ps_fulfillment_details); $t_event->set('notes', $ps_notes); return $t_event->insert(); }