public function delivery_change() { $this->set_header(); $this->_common(false, $_POST['isfastbuy']); $area_id = $_POST['area']; $shipping_method = $_POST['shipping_method']; $obj_delivery = new b2c_order_dlytype(); $sdf = array(); $sdf = $this->pagedata['aCart']; if (isset($_POST['payment']) && $_POST['payment']) { $sdf['pay_app_id'] = $_POST['payment']; } $this->pagedata['app_id'] = $app_id; echo $obj_delivery->select_delivery_method($this, $area_id, $sdf, $shipping_method, 'wap/cart/checkout/delivery_list.html'); exit; }
public function delivery_change() { //$this->set_header(); switch ($_REQUEST['isfastbuy']) { case 'true': $isfastbuy = true; break; case 'group': $isfastbuy = 'group'; break; default: $isfastbuy = false; break; } $this->_common(false, $isfastbuy); $area_id = $_POST['area']; $shipping_method = $_POST['shipping_method']; $obj_delivery = new b2c_order_dlytype(); $sdf = array(); $sdf = $this->pagedata['aCart']; if (isset($_POST['payment']) && $_POST['payment']) { $sdf['pay_app_id'] = $_POST['payment']; } $this->pagedata['app_id'] = $app_id; $deliverys = $obj_delivery->select_delivery_method($this, $area_id, $sdf, $shipping_method, 'API'); foreach ($deliverys as $key => $v) { $deliverys[$key]['shipping'] = '{"id":' . $v['dt_id'] . ',"has_cod":"' . $v['has_cod'] . '","dt_name":"' . $v['dt_name'] . '","money":"' . $v['money'] . '"}'; } return $deliverys; }
public function shipping() { $this->_common(); $area_id = $_POST['area']; $obj_delivery = new b2c_order_dlytype(); $sdf = array(); $sdf = $this->pagedata['aCart']; echo $obj_delivery->select_delivery_method($this, $area_id, $sdf); exit; }
public function delivery_change() { $this->set_header(); $this->_common(false, $_POST['isfastbuy']); if (empty($_POST['area'])) { $arrMember = $this->get_current_member(); $def_addr = kernel::single('b2c_member_addrs')->get_default_addr($arrMember['member_id']); $area = explode(':', $def_addr['area']); $_POST['area'] = $area[2]; } $area_id = $_POST['area']; $shipping_method = $_POST['shipping_method']; $obj_delivery = new b2c_order_dlytype(); $sdf = array(); $sdf = $this->pagedata['aCart']; if (isset($_POST['payment']) && $_POST['payment']) { $sdf['pay_app_id'] = $_POST['payment']; } $this->pagedata['app_id'] = $app_id; return $obj_delivery->select_delivery_method($this, $area_id, $sdf, $shipping_method, 'wap/cart/checkout/delivery_list.html'); exit; }
/** * 查找相对应支付方式 * @param null * @return null */ public function shipping() { $area_id = $_POST['area']; $obj_delivery = new b2c_order_dlytype(); $sdf = array(); $member_indent = md5($_POST['member_id'] . kernel::single('base_session')->sess_id()); $obj_mCart = $this->app->model('cart'); if ($_POST['member_id']) { $data = $obj_mCart->get_cookie_cart_arr($member_indent, $_POST['member_id']); } else { $data = $obj_mCart->get_cookie_cart_arr($member_indent); } $arr_cart_objects = $obj_mCart->get_cart_object($data); echo $obj_delivery->select_delivery_method($this, $area_id, $arr_cart_objects, '', 'admin/order/checkout_shipping.html'); }
public function shipping() { $this->_common(); $area_id = $_POST['area']; $shipping_method = $_POST['shipping_method']; $obj_delivery = new b2c_order_dlytype(); $sdf = array(); $sdf = $this->pagedata['aCart']; if (isset($_POST['payment']) && $_POST['payment']) { $sdf['pay_app_id'] = $_POST['payment']; } header("Cache-Control:no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // 强制查询etag header('Progma: no-cache'); /** * 额外设置的地址checkbox是否显示 */ $is_recsave_display = 'true'; $is_rec_addr_edit = 'true'; $app_id = 'b2c'; $obj_recsave_checkbox = kernel::servicelist('b2c.checkout_recsave_checkbox'); $arr_extends_checkout = array(); if ($obj_recsave_checkbox) { foreach ($obj_recsave_checkbox as $object) { if (!is_object($object)) { continue; } if (method_exists($object, 'get_order')) { $index = $object->get_order(); } else { $index = 10; } while (true) { if (!isset($arr_extends_checkout[$index])) { break; } $index++; } $arr_extends_checkout[$index] = $object; } ksort($arr_extends_checkout); } if ($arr_extends_checkout) { foreach ($arr_extends_checkout as $obj) { if (method_exists($obj, 'check_display')) { $obj->check_display($is_recsave_display); } if (method_exists($obj, 'check_edit')) { $obj->check_edit($is_rec_addr_edit); } if (method_exists($obj, 'check_app_id')) { $obj->check_app_id($app_id); } } } $this->pagedata['app_id'] = $app_id; echo $obj_delivery->select_delivery_method($this, $area_id, $sdf, $shipping_method); exit; }