本文整理汇总了PHP中Self::zohoAddBooking方法的典型用法代码示例。如果您正苦于以下问题:PHP Self::zohoAddBooking方法的具体用法?PHP Self::zohoAddBooking怎么用?PHP Self::zohoAddBooking使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Self
的用法示例。
在下文中一共展示了Self::zohoAddBooking方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addReservationDetails
//.........这里部分代码省略.........
//Reading offers detail
$offersResult = self::getSpecialOfferDetail($arrData['vendorLocationID']);
//for the new db structure support
$combined_date_and_time = $arrData['reservationDate'] . ' ' . $arrData['reservationTime'];
$newDb['attributes']['reserv_datetime'] = Carbon::createFromFormat('Y-m-d H:i A', $combined_date_and_time)->toDateTimeString();
$newDb['attributes']['no_of_people_booked'] = $arrData['partySize'];
$newDb['attributes']['cust_name'] = $arrData['guestName'];
$newDb['attributes']['email'] = $arrData['guestEmail'];
$newDb['attributes']['contact_no'] = $arrData['phone'];
$newDb['attributes']['reserv_type'] = "Alacarte";
//$newDb['attributes']['gift_card_id_reserv'] = $dataPost['giftCardID'];
$newDb['attributes']['loyalty_points_awarded'] = $aLaCarteDetail['reward_point'];
$newDb['attributes']['special_request'] = isset($arrData['specialRequest']) && !empty($arrData['specialRequest']) ? $arrData['specialRequest'] : "";
$newDb['attributes']['experience'] = $aLaCarteDetail['name'] . ' - Ala Carte';
$newDb['attributes']['api_added'] = "Mobile";
$newDb['attributes']['giu_membership_id'] = $userDetail['data']['membership_number'];
$newDb['attributes']['outlet'] = $aLaCarteDetail['location'];
$newDb['attributes']['auto_reservation'] = "Not available";
$newDb['attributes']['ar_confirmation_id'] = "0";
$newDb['attributes']['alternate_id'] = 'A' . sprintf("%06d", $reservation_id['id']);
$newDb['attributes']['reservation_status_id'] = 1;
$newDb['userdetails']['user_id'] = $userID;
$newDb['userdetails']['status'] = 1;
//print_r($newDb);die;
$reservDetails = new ReservationModel();
$newDbStatus = $reservDetails->updateAttributes($reservation_id['id'], $newDb);
//print_r($newDbStatus);die;
/*TODO: Add the status of success check and include added_by and transaction_id attributes */
//echo "alacarte success";die;
//Mail by mailchimp
$mailStatus = self::mailByMailChimp($arrData, $userID, $objMailChimp, $city_name);
$zoho_data = array('Name' => $arrData['guestName'], 'Email_ids' => $arrData['guestEmail'], 'Contact' => $arrData['phone'], 'Experience_Title' => $aLaCarteDetail['name'] . ' - Ala Carte', 'No_of_People' => $arrData['partySize'], 'Date_of_Visit' => date('d-M-Y', strtotime($arrData['reservationDate'])), 'Time' => date("g:ia", strtotime($arrData['reservationTime'])), 'Alternate_ID' => 'A' . sprintf("%06d", $reservation_id['id']), 'Special_Request' => isset($arrData['specialRequest']) && !empty($arrData['specialRequest']) ? $arrData['specialRequest'] : "", 'Type' => "Alacarte", 'API_added' => 'Mobile', 'GIU_Membership_ID' => $userDetail['data']['membership_number'], 'Outlet' => $aLaCarteDetail['location'], 'AR_Confirmation_ID' => '0', 'Auto_Reservation' => 'Not available', 'Special_offer_title' => $offersResult['special_offer_title'], 'Special_offer_desc' => $offersResult['special_offer_desc'], 'Calling_option' => 'No');
//Calling zoho api method
$zoho_res = Self::zohoAddBooking($zoho_data);
//Call zoho send mail method
Self::zohoSendMail($zoho_res, $zoho_data, $reservation_id['id'], $arrData);
} else {
if ($arrData['reservationType'] == 'experience') {
$arrResponse['status'] = Config::get('constants.API_SUCCESS');
if (array_key_exists('addon', $arrData) && !empty($arrData['addon'])) {
//self::addReservationAddonDetails($reservation->id, $arrData['addon']);
//Reading value for addon
$count = $arrData['addon'];
if ($count == "") {
$arrData['addon'] = array();
}
// echo "<pre>"; print_r($dataPost);
$addonsText = '';
foreach ($arrData['addon'] as $key => $value) {
if ($value['qty'] > 0) {
//echo "prod id = ".$prod_id." , qty = ".$qty;
$prod_id = $value['prod_id'];
$addonsDetails = DB::select("SELECT attribute_value from product_attributes_text where product_id = {$prod_id} and product_attribute_id = 17");
//echo "<pre>"; print_r($addonsDetails);
$addonsText .= $addonsDetails[0]->attribute_value . " (" . $value['qty'] . ") , ";
}
}
/*
foreach($arrData['addon'] as $prod_id => $qty) {
if($qty > 0){
//echo "prod id = ".$prod_id." , qty = ".$qty;
$addonsDetails = DB::select("SELECT attribute_value from product_attributes_text where product_id = $prod_id and product_attribute_id = 17");
//echo "<pre>"; print_r($addonsDetails);
$addonsText .= $addonsDetails[0]->attribute_value." (".$qty.") , ";
}