Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/units/orders/orders_event_handler.php
| Show First 20 Lines • Show All 2213 Lines • ▼ Show 20 Line(s) | |||||
| $set_new_status = $this->approveOrder($order_items); | $set_new_status = $this->approveOrder($order_items); | ||||
| // $set_new_status = $this->shipOrder($order_items); | // $set_new_status = $this->shipOrder($order_items); | ||||
| $object->SetDBField('ShippingDate', adodb_mktime()); | $object->SetDBField('ShippingDate', adodb_mktime()); | ||||
| $object->UpdateFormattersSubFields(); | $object->UpdateFormattersSubFields(); | ||||
| $shipping_email = $object->GetDBField('ShippingEmail'); | $shipping_email = $object->GetDBField('ShippingEmail'); | ||||
| $email_params['to_email'] = $shipping_email ? $shipping_email : $email_params['_user_email']; | $email_params['to_email'] = $shipping_email ? $shipping_email : $email_params['_user_email']; | ||||
| if ( strlen($email_params['to_email']) ) { | |||||
| $this->Application->emailUser('ORDER.SHIP', null, $email_params); | $this->Application->emailUser('ORDER.SHIP', null, $email_params); | ||||
| } | |||||
| // inform payment gateway that order was shipped | // inform payment gateway that order was shipped | ||||
| $gw_data = $object->getGatewayData(); | $gw_data = $object->getGatewayData(); | ||||
| /** @var kGWBase $gateway_object */ | /** @var kGWBase $gateway_object */ | ||||
| $gateway_object = $this->Application->recallObject($gw_data['ClassName']); | $gateway_object = $this->Application->recallObject($gw_data['ClassName']); | ||||
| $gateway_object->OrderShipped($object->GetFieldValues(), $gw_data['gw_params']); | $gateway_object->OrderShipped($object->GetFieldValues(), $gw_data['gw_params']); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1887 Lines • Show Last 20 Lines | |||||