本文整理汇总了PHP中Self::sendZohoMailupdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Self::sendZohoMailupdate方法的具体用法?PHP Self::sendZohoMailupdate怎么用?PHP Self::sendZohoMailupdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Self
的用法示例。
在下文中一共展示了Self::sendZohoMailupdate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateReservationDetail
/**
* Updates the reservation details stored in DB.
*
* @access public
* @param array $arrData
* @return array
* @since 1.0.0
*/
public static function updateReservationDetail($arrData)
{
//array to hold response
$arrResponse = array();
$date = date_create($arrData['reservationTime']);
$arrData['reservationTime'] = date_format($date, "h:i A");
//Read and hold the last reservation details
$lastReservationDetail = self::getLastReservationDetail($arrData);
$queryResult = Self::where('id', $arrData['reservationID'])->whereIn('reservation_status', array('new', 'edited'))->first();
if ($queryResult) {
$reservation = Self::find($arrData['reservationID']);
//initializing the data
$reservation->reservation_status = 'edited';
$reservation->reservation_date = $arrData['reservationDate'];
$reservation->reservation_time = $arrData['reservationTime'];
$reservation->no_of_persons = $arrData['partySize'];
$reservation->vendor_location_id = $arrData['vendorLocationID'];
$reservation->guest_name = $arrData['guestName'];
$reservation->guest_email = $arrData['guestEmail'];
$reservation->guest_phone = $arrData['phone'];
$reservation->reservation_type = $arrData['reservationType'];
//setting up the variables that may be present
if (isset($arrData['specialRequest'])) {
$reservation->special_request = $arrData['specialRequest'];
}
if (isset($arrData['giftCardID'])) {
$reservation->giftcard_id = $arrData['giftCardID'];
}
if (isset($arrData['addedBy'])) {
$reservation->added_by = $arrData['addedBy'];
}
//setting up the value of the location id as per type
if ($arrData['reservationType'] == 'alacarte') {
$reservation->vendor_location_id = $arrData['vendorLocationID'];
$reservation->product_vendor_location_id = 0;
} else {
if ($arrData['reservationType'] == 'experience') {
$reservation->vendor_location_id = 0;
$reservation->product_vendor_location_id = $arrData['vendorLocationID'];
//----------------------------------------------------------------------
$arrResult = self::readProductIdAndVendorLocation($arrData['vendorLocationID']);
$reservation->vendor_location_id = $arrResult->vendor_location_id;
$reservation->product_id = $arrResult->product_id;
//-----------------------------------------------------------------------
if (array_key_exists('addon', $arrData) && !empty($arrData['addon'])) {
//self::updateReservationAddonDetails($arrData['reservationID'],$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.") , ";
}
}
*/
$finalAddontext = isset($addonsText) && $addonsText != "" ? "Addons: " . $addonsText : " ";
$special_request = isset($arrData['specialRequest']) && !empty($arrData['specialRequest']) ? "Spl Req: " . $arrData['specialRequest'] : "";
$arrData['addons_special_request'] = $finalAddontext . " " . $special_request;
//---------------------------------------------------------------------------
} else {
$finalAddontext = " ";
$special_request = isset($arrData['specialRequest']) && !empty($arrData['specialRequest']) ? "Spl Req: " . $arrData['specialRequest'] : "";
$arrData['addons_special_request'] = $finalAddontext . " " . $special_request;
}
}
}
#saving the information into the DB
$savedData = $reservation->save();
//Added on 28.5.15
$resultData = Self::where('id', $arrData['reservationID'])->select('reservation_type', 'product_vendor_location_id', 'vendor_location_id')->first();
//print_r($resultData['product_vendor_location_id']);
//print_r($resultData['vendor_location_id']);
//die();
$zohoMailStatus = Self::sendZohoMailupdate($arrData, $lastReservationDetail);
//.........这里部分代码省略.........