Ejemplo n.º 1
0
 public function ready_to_pickup_order_view($orderID = '')
 {
     $this->session->set_userdata(array('log_MODULE' => 'ready_to_pickup_order_view', 'log_MID' => ''));
     $this->data['title'] = 'Ready To Be Pickup Orders View';
     $orderID = id_decrypt($orderID);
     $result = $this->order_pickup_lib->pickup_order_view($orderID, 3);
     $this->data['result'] = $result;
     $this->data['orderID'] = $orderID;
     if ($_POST) {
         $this->custom_log->write_log('custom_log', 'Post data is ' . print_r($_POST, true));
         $result['trackingNbr'] = $this->input->post('track_number');
         $rules = add_tracking_number_rules();
         $this->form_validation->set_rules($rules);
         $this->form_validation->set_error_delimiters('<div class="error">', '</div>');
         if ($this->form_validation->run()) {
             if ($this->order_m->save_tracking_number($orderID, $result['trackingNbr'])) {
                 $this->session->set_flashdata('success', $this->lang->line('success_save_track_no'));
                 $this->custom_log->write_log('custom_log', $this->lang->line('success_save_track_no'));
             } else {
                 $this->session->set_flashdata('error', $this->lang->line('error_save_track_no'));
                 $this->custom_log->write_log('custom_log', $this->lang->line('error_save_track_no'));
             }
             redirect(base_url() . $this->session->userdata('userType') . '/ready_to_pickup/ready_to_pickup_order_view/' . id_encrypt($orderID));
         }
     }
     $this->data['result'] = $result;
     $this->data['orderID'] = $orderID;
     $this->adminCustomView('shipping_management/pickup_orders_management/ready_to_shipped_order_view', $this->data);
 }
Ejemplo n.º 2
0
 public function economic_order_view($orderId = 0)
 {
     $this->session->set_userdata(array('log_MODULE' => 'economic_order_view', 'log_MID' => ''));
     $this->data['title'] = 'Order Details View';
     $result = $this->order_lib->economic_order_view($orderId);
     //echo "<pre>"; print_r($result); exit;
     if ($_POST) {
         $this->custom_log->write_log('custom_log', 'Post data is ' . print_r($_POST, true));
         $result['trackingNbr'] = $this->input->post('track_number');
         $rules = add_tracking_number_rules();
         $this->form_validation->set_rules($rules);
         $this->form_validation->set_error_delimiters('<div class="error">', '</div>');
         if ($this->form_validation->run()) {
             if ($this->order_m->economic_save_tracking_number($orderId, $result['trackingNbr'])) {
                 $customOrderDet = $this->order_m->order_custom_payment_details($orderId);
                 if (!empty($customOrderDet)) {
                     $this->order_m->single_shippment_save_tracking_number($customRow[0]->orderCustomPaymentId, $result['trackingNbr']);
                 }
                 $this->session->set_flashdata('success', $this->lang->line('success_save_track_no'));
                 $this->custom_log->write_log('custom_log', $this->lang->line('success_save_track_no'));
             } else {
                 $this->session->set_flashdata('error', $this->lang->line('error_save_track_no'));
                 $this->custom_log->write_log('custom_log', $this->lang->line('error_save_track_no'));
             }
             redirect(base_url() . $this->session->userdata('userType') . '/order_management/economic_order_view/' . $orderId);
         }
     }
     $this->data['result'] = $result;
     $this->data['orderId'] = $orderId;
     $this->adminCustomView('order_managements/economic_order_view', $this->data);
 }
Ejemplo n.º 3
0
 public function pickup_order_view($orderDetailId)
 {
     $result = array();
     $result['customerOrderId'] = '';
     $result['newOrderTime'] = '';
     $result['confirmOrderTime'] = '';
     $result['readyToShippedOrderTime'] = '';
     $result['inTransitOrderTime'] = '';
     $result['deliveredOrderTime'] = '';
     $result['trackingNbr'] = '';
     $result['productList'] = '';
     $dropShipCenterId = 0;
     $organizationProductId = 0;
     $customerId = 0;
     $shippingOrgId = 0;
     $orderTotalId = 0;
     $result['orderActiveStatus'] = 0;
     $result['dropShipCenterName'] = '';
     $result['dropShipCenterAddress'] = '';
     $result['pickupName'] = '';
     $result['pickupBusDays'] = '';
     $result['pickupBusHours'] = '';
     $result['pickupAddressLine'] = '';
     $result['pickupPhone'] = '';
     $result['pickupStateName'] = '';
     if ($_POST) {
         $this->CI->custom_log->write_log('custom_log', 'Post data is ' . print_r($_POST, true));
         $result['trackingNbr'] = $this->CI->input->post('track_number');
         $rules = add_tracking_number_rules();
         $this->CI->form_validation->set_rules($rules);
         $this->CI->form_validation->set_error_delimiters('<div class="error">', '</div>');
         if ($this->CI->form_validation->run()) {
             if ($this->CI->order_m->quick_shippment_save_tracking_number($orderDetailId, $result['trackingNbr'])) {
                 $this->CI->session->set_flashdata('success', $this->CI->lang->line('success_save_track_no'));
                 $this->CI->custom_log->write_log('custom_log', $this->CI->lang->line('success_save_track_no'));
             } else {
                 $this->CI->session->set_flashdata('error', $this->CI->lang->line('error_save_track_no'));
                 $this->CI->custom_log->write_log('custom_log', $this->CI->lang->line('error_save_track_no'));
             }
             redirect(base_url() . $this->CI->session->userdata('userType') . '/orders_management/pickup_order_view/' . id_encrypt($orderDetailId));
         }
     }
     $productList = $this->CI->order_m->pickup_order_list($orderDetailId);
     //echo "<pre>"; print_r($productList); exit;
     if (!empty($productList)) {
         $orderStatusId = $productList->orderStatusId;
         $result['productId'] = $productList->productId;
         $result['productName'] = $productList->code;
         $result['quantity'] = $productList->quantity;
         $result['orderStatusId'] = $productList->orderStatusId;
         $result['colorCode'] = $productList->colorCode;
         $result['size'] = $productList->sizes;
         $result['imageName'] = $productList->imageName;
         $result['totalProductAmount'] = $productList->totalProductAmount;
         $result['totalRetailerAmount'] = $productList->totalRetailerAmount;
         $result['orderDetailId'] = $productList->orderDetailId;
         $result['totalCustomAmount'] = $productList->totalCustomAmount;
         $result['totalCustomShippingAmount'] = $productList->totalCustomShippingAmount;
         $result['totalCustomCashHandlingAmount'] = $productList->totalCustomCashHandlingAmount;
         $result['customOrderId'] = $productList->customOrderId;
         $result['organizationName'] = $productList->organizationName;
         $result['trackingNbr'] = $productList->trackingNbr;
         $result['orderActiveStatus'] = $productList->active;
         $result['orderStatusId'] = $productList->orderStatusId;
         $result['paymentStatus'] = $productList->paymentStatus;
         $orderDetailId = $productList->orderDetailId;
         $dropShipCenterId = $productList->dropShipCenterId;
         $organizationProductId = $productList->organizationProductId;
         $customerId = $productList->customerId;
         $shippingOrgId = $productList->shippingOrgId;
         $orderTotalId = $productList->orderTotalId;
         $pickupId = $productList->pickupId;
         if ($orderDetailId) {
             $trackDetails = $this->CI->order_m->custom_track_order_time($orderDetailId);
             if (!empty($trackDetails)) {
                 foreach ($trackDetails as $row) {
                     if ($row->orderStatusId == 1) {
                         $result['newOrderTime'] = $row->createDt;
                     } elseif ($row->orderStatusId == 2) {
                         $result['confirmOrderTime'] = $row->createDt;
                     } elseif ($row->orderStatusId == 3) {
                         $result['readyToShippedOrderTime'] = $row->createDt;
                     } elseif ($row->orderStatusId == 4) {
                         $result['inTransitOrderTime'] = $row->createDt;
                     } elseif ($row->orderStatusId == 5) {
                         $result['deliveredOrderTime'] = $row->createDt;
                     }
                 }
             }
         }
         if ($dropShipCenterId) {
             $dropshipDetails = $this->CI->retailer_m->dropship_details($dropShipCenterId);
             if (!empty($dropshipDetails)) {
                 $result['dropShipCenterName'] = $dropshipDetails->dropCenterName;
                 $result['dropShipCenterAddress'] = $dropshipDetails->addressLine1;
             }
         }
         if ($organizationProductId) {
             $retailerDetails = $this->CI->order_m->order_retailer_details($organizationProductId);
             if (!empty($retailerDetails)) {
                 $result['retailerOrganizationName'] = $retailerDetails->organizationName;
                 $result['retailerEmail'] = $retailerDetails->email;
                 $result['retailerFirstName'] = $retailerDetails->firstName;
                 $result['retailerMiddle'] = $retailerDetails->middle;
                 $result['retailerLastName'] = $retailerDetails->lastName;
                 $result['retailerBussPhCode'] = $retailerDetails->businessPhoneCode;
                 $result['retailerBusinessPhone'] = $retailerDetails->businessPhone;
                 $result['retailerUserName'] = $retailerDetails->userName;
                 $result['retailerAddressLine1'] = $retailerDetails->addressLine1;
                 $result['retailerAddressLine2'] = $retailerDetails->address_Line2;
                 $result['retailerCountryName'] = $retailerDetails->countryName;
                 $result['retailerStateName'] = $retailerDetails->stateName;
                 $result['retailerCityName'] = $retailerDetails->cityName;
                 $result['retailerAreaName'] = $retailerDetails->areaName;
             }
         }
         if ($customerId) {
             $customerDetails = $this->CI->customer_m->get_customer_user_detail($customerId);
             if (!empty($customerDetails)) {
                 $result['customerFirstName'] = $customerDetails->firstName;
                 $result['customerLastName'] = $customerDetails->lastName;
                 $result['customerPhone'] = $customerDetails->phone;
                 $result['customerEmail'] = $customerDetails->email;
             }
         }
         if ($pickupId) {
             $pickupDet = $this->CI->cart_m->pickup_details($pickupId);
             if (!empty($pickupDet)) {
                 $result['pickupName'] = $pickupDet->pickupName;
                 $result['pickupBusDays'] = $pickupDet->businessDays;
                 $result['pickupBusHours'] = $pickupDet->businessHours;
                 $result['pickupAddressLine'] = $pickupDet->addressLine1;
                 $result['pickupPhone'] = $pickupDet->phone;
                 $result['pickupStateName'] = $pickupDet->stateName;
             }
         }
     }
     //echo "<pre>"; print_r($result); exit;
     return $result;
 }