本文整理汇总了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;