</div> </div> <div class="container-fluid"> <div class="row"> <hr class="divider"> </div> </div> <div class="container-fluid"> <div class="row"> <div class="form-inline"> <div class="form-group col-sm-6"> <label for="txtBuyerId">Select a Buyer</label> <select required name="txtBuyerId" id="txtBuyerId" class="form-control pull-right"> <option selected disabled value="">Select a Buyer</option> <?php $buyers = $custCon->getCustomers(); if ($buyers->errorInfo()[2] == null) { $rows = $buyers->fetchAll(); $rowCount = count($rows); if ($rowCount > 0) { foreach ($rows as $row) { $person = $personCon->getPerson($row['person_id']); $person = $person->fetch(); ?> <option <?php checkSelected($row['customer_id'], $buyerId); ?> value="<?php echo $row['customer_id']; ?> "><?php
/* GET CUSTOMER DETAIL CORRESPONDING to a restaurantID and customerID*/ $app->get('/merchant/:id/customer/:id2', function ($id, $id2) use($app) { // check for required params $request = array(); $response = array(); $apiKey = array(); $headers = $app->request->headers->all(); verifyHeaders(array('Key')); // reading request params $apiKey = $headers['Key']; $request['apiKey'] = $apiKey; $request['restaurantID'] = $id; $request["customerID"] = $id2; $controller = new CustomerController(); // Call controller function $response = $controller->getCustomers($request); // echo json response echoRespnse(200, $response); }); /* GET CUSTOMER PHONE DETAIL CORRESPONDING to a restaurantID and customerID*/ $app->get('/merchant/:id/customerphone/:id2', function ($id, $id2) use($app) { // check for required params $request = array(); $response = array(); $apiKey = array(); $headers = $app->request->headers->all(); verifyHeaders(array('Key')); // reading request params $apiKey = $headers['Key']; $request['apiKey'] = $apiKey; $request['restaurantID'] = $id;