本文整理匯總了PHP中Prefs::save_box方法的典型用法代碼示例。如果您正苦於以下問題:PHP Prefs::save_box方法的具體用法?PHP Prefs::save_box怎麽用?PHP Prefs::save_box使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Prefs
的用法示例。
在下文中一共展示了Prefs::save_box方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: order_save
//.........這裏部分代碼省略.........
$order['chargeable_amount'] = $dcost;
}
if (isset($in->show_shop)) {
$order['show_shop'] = $in->show_shop;
}
if (isset($in->show_merchant)) {
$order['show_merchant'] = $in->show_merchant;
}
$order['is_api'] = 1;
$ship = new \Shipment();
foreach ($order as $k => $v) {
$ship->{$k} = $v;
}
$ship->save();
$sequence = $ship->id;
if (isset($in->delivery_id)) {
if (is_null($in->delivery_id) || $in->delivery_id == '') {
$delivery_id = \Prefs::get_delivery_id($sequence, $app->merchant_id);
} else {
$delivery_id = \Prefs::get_delivery_id($sequence, $app->merchant_id, $in->delivery_id);
}
} else {
$delivery_id = \Prefs::get_delivery_id($sequence, $app->merchant_id);
}
$ship->delivery_id = $delivery_id;
//print_r($ship);
$ship->save();
//die();
if (isset($in->box_count)) {
$box_count = $in->box_count;
} else {
$box_count = 1;
}
\Prefs::save_box($delivery_id, trim($transaction_id), $order['fulfillment_code'], $box_count);
$nedata['fullname'] = $in->buyer_name;
$nedata['merchant_trx_id'] = trim($transaction_id);
$nedata['delivery_id'] = $delivery_id;
$nedata['merchantname'] = $app->application_name;
$nedata['app'] = $app;
$order['delivery_id'] = $delivery_id;
$buyer_id = \Prefs::save_buyer($order);
/*
$this->db->where('id',$sequence)->update($this->config->item('incoming_delivery_table'),array('delivery_id'=>$delivery_id));
*/
/*
$this->table_tpl = array(
'table_open' => '<table border="0" cellpadding="4" cellspacing="0" class="dataTable">'
);
$this->table->set_template($this->table_tpl);
$this->table->set_heading(
'No.',
'Description',
'Quantity',
'Total'
); // Setting headings for the table
*/
$d = 0;
$gt = 0;
if ($in->trx_detail) {
$seq = 0;
foreach ($in->trx_detail as $it) {
$item = new \Deliverydetail();
$item->ordertime = $order['ordertime'];
$item->delivery_id = $delivery_id;