udpated changes
This commit is contained in:
@@ -703,17 +703,17 @@
|
||||
<dd>{$customer->ape}</dd>
|
||||
{/if} -->
|
||||
</dl>
|
||||
{if $order->id_booking_staying_guest}
|
||||
{if $order->id_customer_guest_detail}
|
||||
<dl class="panel">
|
||||
<div class="panel-heading">
|
||||
{l s='Staying guest'}
|
||||
{l s='Guest'}
|
||||
</div>
|
||||
<dt>{l s='Name'}</dt>
|
||||
<dd>{$bookingStayingGuest->firstname} {$bookingStayingGuest->lastname}</dd><br>
|
||||
<dd>{$customerGuestDetail->firstname} {$customerGuestDetail->lastname}</dd><br>
|
||||
<dt>{l s='Email'}</dt>
|
||||
<dd><a href="mailto:{$bookingStayingGuest->email}"><i class="icon-envelope-o"></i> {$bookingStayingGuest->email}</a></dd><br>
|
||||
<dd><a href="mailto:{$customerGuestDetail->email}"><i class="icon-envelope-o"></i> {$customerGuestDetail->email}</a></dd><br>
|
||||
<dt>{l s='Phone'}</dt>
|
||||
<dd><a href="tel:{$bookingStayingGuest->phone}"><i class="icon-envelope-o"></i> {$bookingStayingGuest->phone}</a></dd>
|
||||
<dd><a href="tel:{$customerGuestDetail->phone}"><i class="icon-envelope-o"></i> {$customerGuestDetail->phone}</a></dd>
|
||||
</dl>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -88,7 +88,7 @@ class CartCore extends ObjectModel
|
||||
*/
|
||||
public $is_advance_payment;
|
||||
|
||||
public $id_booking_staying_guest;
|
||||
public $id_customer_guest_detail;
|
||||
|
||||
protected static $_nbProducts = array();
|
||||
protected static $_isVirtualCart = array();
|
||||
@@ -118,7 +118,7 @@ class CartCore extends ObjectModel
|
||||
'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_guest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_booking_staying_guest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_customer_guest_detail' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'recyclable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||
'gift' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
class BookingStayingGuestCore extends ObjectModel
|
||||
class CustomerGuestDetailCore extends ObjectModel
|
||||
{
|
||||
public $id_booking_staying_guest;
|
||||
public $id_customer_guest_detail;
|
||||
public $id_gender;
|
||||
public $firstname;
|
||||
public $lastname;
|
||||
@@ -30,9 +30,10 @@ class BookingStayingGuestCore extends ObjectModel
|
||||
public $date_upd;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'booking_staying_guest',
|
||||
'primary' => 'id_booking_staying_guest',
|
||||
'table' => 'customer_guest_detail',
|
||||
'primary' => 'id_customer_guest_detail',
|
||||
'fields' => array(
|
||||
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_gender' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'size' => 32),
|
||||
'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'size' => 32),
|
||||
@@ -43,11 +44,21 @@ class BookingStayingGuestCore extends ObjectModel
|
||||
),
|
||||
);
|
||||
|
||||
public static function getBookingStayingGuestInfo($id_booking_staying_guest)
|
||||
public static function getCustomerGuests($id_customer)
|
||||
{
|
||||
return Db::getInstance()->getRow('
|
||||
SELECT * FROM `'._DB_PREFIX_.'booking_staying_guest`
|
||||
WHERE `id_booking_staying_guest` = '.(int)$id_booking_staying_guest
|
||||
SELECT `id_customer_guest_detail`, `id_gender`, `firstname`, `lastname`, `email`, `phone`
|
||||
FROM `'._DB_PREFIX_.'customer_guest_detail`
|
||||
WHERE `id_customer` = '.(int)$id_customer
|
||||
);
|
||||
}
|
||||
|
||||
public static function getCustomerGuestDetail($id_customer_guest_detail)
|
||||
{
|
||||
return Db::getInstance()->getRow('
|
||||
SELECT `id_gender`, `firstname`, `lastname`, `email`, `phone`
|
||||
FROM `'._DB_PREFIX_.'customer_guest_detail`
|
||||
WHERE `id_customer_guest_detail` = '.(int)$id_customer_guest_detail
|
||||
);
|
||||
}
|
||||
|
||||
@@ -362,9 +362,9 @@ abstract class PaymentModuleCore extends Module
|
||||
$order->advance_paid_amount = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_);
|
||||
}
|
||||
|
||||
// save staying guest information
|
||||
if ($this->context->cart->id_booking_staying_guest) {
|
||||
$order->id_booking_staying_guest = (int)$this->context->cart->id_booking_staying_guest;
|
||||
// save customer guest information
|
||||
if ($this->context->cart->id_customer_guest_detail) {
|
||||
$order->id_customer_guest_detail = (int)$this->context->cart->id_customer_guest_detail;
|
||||
}
|
||||
|
||||
// Creating order
|
||||
@@ -1022,22 +1022,22 @@ abstract class PaymentModuleCore extends Module
|
||||
null, _PS_MAIL_DIR_, false, (int)$order->id_shop
|
||||
);
|
||||
}
|
||||
// send mail to staying guest if customer booked for someone other.
|
||||
if ($order->id_booking_staying_guest) {
|
||||
if ($stayingGuestInfo = BookingStayingGuest::getBookingStayingGuestInfo(
|
||||
$order->id_booking_staying_guest
|
||||
// send mail to customer guest if customer booked for someone other.
|
||||
if ($order->id_customer_guest_detail) {
|
||||
if ($customerGuestDetail = CustomerGuestDetail::getCustomerGuestDetail(
|
||||
$order->id_customer_guest_detail
|
||||
)) {
|
||||
if (Validate::isEmail($stayingGuestInfo['email'])) {
|
||||
$data['{firstname}'] = $stayingGuestInfo['firstname'];
|
||||
$data['{lastname}'] = $stayingGuestInfo['lastname'];
|
||||
$data['{email}'] = $stayingGuestInfo['email'];
|
||||
if (Validate::isEmail($customerGuestDetail['email'])) {
|
||||
$data['{firstname}'] = $customerGuestDetail['firstname'];
|
||||
$data['{lastname}'] = $customerGuestDetail['lastname'];
|
||||
$data['{email}'] = $customerGuestDetail['email'];
|
||||
Mail::Send(
|
||||
(int)$order->id_lang,
|
||||
'order_conf',
|
||||
Mail::l('Order confirmation', (int)$order->id_lang),
|
||||
$data,
|
||||
$stayingGuestInfo['email'],
|
||||
$stayingGuestInfo['firstname'].' '.$stayingGuestInfo['lastname'],
|
||||
$customerGuestDetail['email'],
|
||||
$customerGuestDetail['firstname'].' '.$customerGuestDetail['lastname'],
|
||||
null,
|
||||
null,
|
||||
$file_attachement,
|
||||
|
||||
@@ -43,10 +43,10 @@ class CheckoutCustomerDetailsStep extends AbstractCheckoutStep
|
||||
}
|
||||
} elseif (Tools::getValue('proceed_to_payment')) {
|
||||
$guestInfoComplete = true;
|
||||
if ($this->context->cart->id_booking_staying_guest) {
|
||||
if ($this->context->cart->id_customer_guest_detail) {
|
||||
$guestInfoComplete = false;
|
||||
$objBookingStayingGuest = new BookingStayingGuest($this->context->cart->id_booking_staying_guest);
|
||||
if ($objBookingStayingGuest->validateGuestInfo()) {
|
||||
$objCustomerGuestDetail = new CustomerGuestDetail($this->context->cart->id_customer_guest_detail);
|
||||
if ($objCustomerGuestDetail->validateGuestInfo()) {
|
||||
$guestInfoComplete = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ class OrderCore extends ObjectModel
|
||||
/** @var int Customer id */
|
||||
public $id_customer;
|
||||
|
||||
/** @var int Staying guest id */
|
||||
public $id_booking_staying_guest;
|
||||
/** @var int Customer guest id */
|
||||
public $id_customer_guest_detail;
|
||||
|
||||
/** @var int Carrier id */
|
||||
public $id_carrier;
|
||||
@@ -209,7 +209,7 @@ class OrderCore extends ObjectModel
|
||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_booking_staying_guest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_customer_guest_detail' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'current_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5'),
|
||||
|
||||
@@ -1335,9 +1335,9 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
// get details if booking is done for some other guest
|
||||
$bookingStayingGuest = false;
|
||||
if ($order->id_booking_staying_guest) {
|
||||
$bookingStayingGuest = new BookingStayingGuest($order->id_booking_staying_guest);
|
||||
$customerGuestDetail = false;
|
||||
if ($order->id_customer_guest_detail) {
|
||||
$customerGuestDetail = new CustomerGuestDetail($order->id_customer_guest_detail);
|
||||
}
|
||||
|
||||
// gets warehouses to ship products, if and only if advanced stock management is activated
|
||||
@@ -1522,7 +1522,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'cart' => new Cart($order->id_cart),
|
||||
'customer' => $customer,
|
||||
'gender' => $gender,
|
||||
'bookingStayingGuest' => $bookingStayingGuest,
|
||||
'customerGuestDetail' => $customerGuestDetail,
|
||||
'customer_addresses' => $customer->getAddresses($this->context->language->id),
|
||||
'addresses' => array(
|
||||
'delivery' => $addressDelivery,
|
||||
|
||||
@@ -317,8 +317,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->ajaxDie($this->changeRoomDemands());
|
||||
exit;
|
||||
break;
|
||||
case 'submitBookingStayingGuest':
|
||||
$this->ajaxDie($this->submitBookingStayingGuest());
|
||||
case 'submitCustomerGuestDetail':
|
||||
$this->ajaxDie($this->submitCustomerGuestDetail());
|
||||
exit;
|
||||
break;
|
||||
default:
|
||||
@@ -483,10 +483,10 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->_assignPayment();
|
||||
// GUEST BOOKING
|
||||
if ($this->isLogged) {
|
||||
if ($this->context->cart->id_booking_staying_guest) {
|
||||
$this->context->smarty->assign('booking_staying_guest', BookingStayingGuest::getBookingStayingGuestInfo($this->context->cart->id_booking_staying_guest));
|
||||
if ($this->context->cart->id_customer_guest_detail) {
|
||||
$this->context->smarty->assign('customer_guest_detail', CustomerGuestDetail::getCustomerGuestDetail($this->context->cart->id_customer_guest_detail));
|
||||
}
|
||||
$this->context->smarty->assign('id_booking_staying_guest', $this->context->cart->id_booking_staying_guest);
|
||||
$this->context->smarty->assign('id_customer_guest_detail', $this->context->cart->id_customer_guest_detail);
|
||||
}
|
||||
Tools::safePostVars();
|
||||
|
||||
@@ -976,33 +976,33 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
die('0');
|
||||
}
|
||||
|
||||
public function submitBookingStayingGuest()
|
||||
public function submitCustomerGuestDetail()
|
||||
{
|
||||
$booking_staying_guest = Tools::getValue('booking_staying_guest');
|
||||
$customer_guest_detail = Tools::getValue('customer_guest_detail');
|
||||
$this->context->cookie->__set('customer_details_proceeded', 0);
|
||||
$this->context->cookie->checkedTOS = false;
|
||||
if ($booking_staying_guest) {
|
||||
if ($this->context->cart->id_booking_staying_guest) {
|
||||
$objBookingStayingGuest = new BookingStayingGuest($this->context->cart->id_booking_staying_guest);
|
||||
if ($customer_guest_detail) {
|
||||
if ($this->context->cart->id_customer_guest_detail) {
|
||||
$objCustomerGuestDetail = new CustomerGuestDetail($this->context->cart->id_customer_guest_detail);
|
||||
} else {
|
||||
$objBookingStayingGuest = new BookingStayingGuest();
|
||||
$objCustomerGuestDetail = new CustomerGuestDetail();
|
||||
}
|
||||
$booking_staying_guest_gender = Tools::getValue('booking_staying_guest_gender');
|
||||
$booking_staying_guest_firstname = Tools::getValue('booking_staying_guest_firstname');
|
||||
$booking_staying_guest_lastname = Tools::getValue('booking_staying_guest_lastname');
|
||||
$booking_staying_guest_email = Tools::getValue('booking_staying_guest_email');
|
||||
$booking_staying_guest_phone = Tools::getValue('booking_staying_guest_phone');
|
||||
$objBookingStayingGuest->id_gender = $booking_staying_guest_gender;
|
||||
$objBookingStayingGuest->firstname = $booking_staying_guest_firstname;
|
||||
$objBookingStayingGuest->lastname = $booking_staying_guest_lastname;
|
||||
$objBookingStayingGuest->email = $booking_staying_guest_email;
|
||||
$objBookingStayingGuest->phone = $booking_staying_guest_phone;
|
||||
$objBookingStayingGuest->save();
|
||||
$this->context->cart->id_booking_staying_guest = $objBookingStayingGuest->id;
|
||||
$customer_guest_detail_gender = Tools::getValue('customer_guest_detail_gender');
|
||||
$customer_guest_detail_firstname = Tools::getValue('customer_guest_detail_firstname');
|
||||
$customer_guest_detail_lastname = Tools::getValue('customer_guest_detail_lastname');
|
||||
$customer_guest_detail_email = Tools::getValue('customer_guest_detail_email');
|
||||
$customer_guest_detail_phone = Tools::getValue('customer_guest_detail_phone');
|
||||
$objCustomerGuestDetail->id_gender = $customer_guest_detail_gender;
|
||||
$objCustomerGuestDetail->firstname = $customer_guest_detail_firstname;
|
||||
$objCustomerGuestDetail->lastname = $customer_guest_detail_lastname;
|
||||
$objCustomerGuestDetail->email = $customer_guest_detail_email;
|
||||
$objCustomerGuestDetail->phone = $customer_guest_detail_phone;
|
||||
$objCustomerGuestDetail->save();
|
||||
$this->context->cart->id_customer_guest_detail = $objCustomerGuestDetail->id;
|
||||
} else {
|
||||
$objBookingStayingGuest = new BookingStayingGuest($this->context->cart->id_booking_staying_guest);
|
||||
$objBookingStayingGuest->delete();
|
||||
$this->context->cart->id_booking_staying_guest = false;
|
||||
$objCustomerGuestDetail = new CustomerGuestDetail($this->context->cart->id_customer_guest_detail);
|
||||
$objCustomerGuestDetail->delete();
|
||||
$this->context->cart->id_customer_guest_detail = false;
|
||||
}
|
||||
$this->context->cart->save();
|
||||
}
|
||||
|
||||
@@ -182,7 +182,6 @@ CREATE TABLE `PREFIX_cart` (
|
||||
`id_currency` int(10) unsigned NOT NULL,
|
||||
`id_customer` int(10) unsigned NOT NULL,
|
||||
`id_guest` int(10) unsigned NOT NULL,
|
||||
`id_booking_staying_guest` int(10) unsigned NOT NULL,
|
||||
`secure_key` varchar(32) NOT NULL DEFAULT '-1',
|
||||
`recyclable` tinyint(1) unsigned NOT NULL DEFAULT '1',
|
||||
`gift` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
@@ -674,9 +673,21 @@ CREATE TABLE `PREFIX_customer_thread` (
|
||||
KEY `id_product` (`id_product`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_booking_staying_guest` (
|
||||
`id_booking_staying_guest` int(10) unsigned NOT NULL auto_increment,
|
||||
CREATE TABLE `PREFIX_order_customer_guest_detail` (
|
||||
`id_customer_guest_detail` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_cart` int(10) unsigned NOT NULL,
|
||||
`id_gender` int(10) unsigned NOT NULL,
|
||||
`firstname` varchar(32) NOT NULL,
|
||||
`lastname` varchar(32) NOT NULL,
|
||||
`email` varchar(128) NOT NULL,
|
||||
`phone` varchar(32) DEFAULT NULL,
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_customer_guest_detail`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_cart_customer_guest_detail` (
|
||||
`id_customer_guest_detail` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_order` int(10) unsigned NOT NULL,
|
||||
`id_gender` int(10) unsigned NOT NULL,
|
||||
`firstname` varchar(32) NOT NULL,
|
||||
@@ -685,7 +696,7 @@ CREATE TABLE `PREFIX_booking_staying_guest` (
|
||||
`phone` varchar(32) DEFAULT NULL,
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_booking_staying_guest`)
|
||||
PRIMARY KEY (`id_customer_guest_detail`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_customization` (
|
||||
@@ -1112,7 +1123,6 @@ CREATE TABLE `PREFIX_orders` (
|
||||
`id_carrier` int(10) unsigned NOT NULL,
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
`id_customer` int(10) unsigned NOT NULL,
|
||||
`id_booking_staying_guest` int(10) unsigned NOT NULL,
|
||||
`id_cart` int(10) unsigned NOT NULL,
|
||||
`id_currency` int(10) unsigned NOT NULL,
|
||||
`id_address_delivery` int(10) unsigned NOT NULL,
|
||||
|
||||
@@ -50,18 +50,18 @@ $(document).ready(function()
|
||||
$("#partial_data").slideDown();
|
||||
});
|
||||
|
||||
// staying guest booking
|
||||
// customer guest booking
|
||||
function initGuestbookingcontainer() {
|
||||
if ($("#booking_staying_guest:checked").val() == 1) {
|
||||
if ($("#customer_guest_detail:checked").val() == 1) {
|
||||
$('#customer_info_container').hide('slow');
|
||||
$('#booking_staying_guest_container').show('slow');
|
||||
$('#customer_guest_detail_container').show('slow');
|
||||
} else {
|
||||
$('#booking_staying_guest_container').hide('slow');
|
||||
$('#customer_guest_detail_container').hide('slow');
|
||||
$('#customer_info_container').show('slow');
|
||||
}
|
||||
}
|
||||
function validateBookingStayingGuestForm() {
|
||||
$('#booking_staying_guest_form input.validate').each(function (index, element) {
|
||||
function validateCustomerGuestDetailForm() {
|
||||
$('#customer_guest_detail_form input.validate').each(function (index, element) {
|
||||
if (!validate_field(element)) {
|
||||
if ($('#cgv').prop('checked') == 1) {
|
||||
$('#cgv').trigger('click');
|
||||
@@ -70,21 +70,21 @@ $(document).ready(function()
|
||||
});
|
||||
}
|
||||
initGuestbookingcontainer();
|
||||
$("#booking_staying_guest").on('change',function() {
|
||||
$("#customer_guest_detail").on('change',function() {
|
||||
initGuestbookingcontainer();
|
||||
});
|
||||
if ($("#booking_staying_guest:checked").val() == 1) {
|
||||
validateBookingStayingGuestForm();
|
||||
if ($("#customer_guest_detail:checked").val() == 1) {
|
||||
validateCustomerGuestDetailForm();
|
||||
}
|
||||
|
||||
$('#booking_staying_guest_form').on('change', function(e) {
|
||||
$('#customer_guest_detail_form').on('change', function(e) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: orderOpcUrl,
|
||||
async: false,
|
||||
cache: false,
|
||||
dataType : "json",
|
||||
data: $(this).serialize()+'&method=submitBookingStayingGuest&ajax=true&token=' + static_token
|
||||
data: $(this).serialize()+'&method=submitCustomerGuestDetail&ajax=true&token=' + static_token
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -78,46 +78,46 @@
|
||||
<div id="collapse-guest-info" class="opc-collapse {if !$step->step_is_current}collapse{/if}" aria-labelledby="guest-info-head" data-parent="#oprder-opc-accordion">
|
||||
<div class="card-body">
|
||||
{if $is_logged || $isGuest}
|
||||
<form id="booking_staying_guest_form">
|
||||
<form id="customer_guest_detail_form">
|
||||
{if $is_logged}
|
||||
<p class="checkbox">
|
||||
<input type="checkbox" name="booking_staying_guest" id="booking_staying_guest" value="1" {if $id_booking_staying_guest}checked="checked"{/if}/>
|
||||
<label for="booking_staying_guest" id="booking_staying_guest_txt">{l s='Booking for someone else?'}</label>
|
||||
<input type="checkbox" name="customer_guest_detail" id="customer_guest_detail" value="1" {if $id_customer_guest_detail}checked="checked"{/if}/>
|
||||
<label for="customer_guest_detail" id="customer_guest_detail_txt">{l s='Booking for someone else?'}</label>
|
||||
</p>
|
||||
{/if}
|
||||
<div id="booking_staying_guest_container" {if !$id_booking_staying_guest}style="display: none;"{/if}>
|
||||
<div id="customer_guest_detail_container" {if !$id_customer_guest_detail}style="display: none;"{/if}>
|
||||
<div class="row">
|
||||
<div class="required clearfix gender-line col-sm-2">
|
||||
<label>{l s='Social title'}</label>
|
||||
<select name="booking_staying_guest_gender" id="booking_staying_guest_gender">
|
||||
<select name="customer_guest_detail_gender" id="customer_guest_detail_gender">
|
||||
{foreach from=$genders key=k item=gender}
|
||||
<option value="{$gender->id_gender}"{if isset($smarty.post.booking_staying_guest_gender) && $smarty.post.booking_staying_guest_gender == $gender->id_gender || (isset($booking_staying_guest) && $booking_staying_guest.id_gender == $gender->id_gender)} selected="selected"{/if}>{$gender->name}</option>
|
||||
<option value="{$gender->id_gender}"{if isset($smarty.post.customer_guest_detail_gender) && $smarty.post.customer_guest_detail_gender == $gender->id_gender || (isset($customer_guest_detail) && $customer_guest_detail.id_gender == $gender->id_gender)} selected="selected"{/if}>{$gender->name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="required form-group col-sm-5">
|
||||
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
||||
<input type="text" class="text form-control validate is_required" id="booking_staying_guest_firstname" name="booking_staying_guest_firstname" data-validate="isName"{if isset($smarty.post.booking_staying_guest_firstname) && $smarty.post.booking_staying_guest_firstname} value="{$smarty.post.booking_staying_guest_firstname}"{elseif isset($booking_staying_guest) && $booking_staying_guest.firstname} value="{$booking_staying_guest.firstname}"{/if}/>
|
||||
<input type="text" class="text form-control validate is_required" id="customer_guest_detail_firstname" name="customer_guest_detail_firstname" data-validate="isName"{if isset($smarty.post.customer_guest_detail_firstname) && $smarty.post.customer_guest_detail_firstname} value="{$smarty.post.customer_guest_detail_firstname}"{elseif isset($customer_guest_detail) && $customer_guest_detail.firstname} value="{$customer_guest_detail.firstname}"{/if}/>
|
||||
</div>
|
||||
<div class="required form-group col-sm-5">
|
||||
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
|
||||
<input type="text" class="form-control validate is_required" id="booking_staying_guest_lastname" name="booking_staying_guest_lastname" data-validate="isName"{if isset($smarty.post.booking_staying_guest_lastname) && $smarty.post.booking_staying_guest_lastname} value="{$smarty.post.booking_staying_guest_lastname}"{elseif isset($booking_staying_guest) && $booking_staying_guest.lastname} value="{$booking_staying_guest.lastname}"{/if}/>
|
||||
<input type="text" class="form-control validate is_required" id="customer_guest_detail_lastname" name="customer_guest_detail_lastname" data-validate="isName"{if isset($smarty.post.customer_guest_detail_lastname) && $smarty.post.customer_guest_detail_lastname} value="{$smarty.post.customer_guest_detail_lastname}"{elseif isset($customer_guest_detail) && $customer_guest_detail.lastname} value="{$customer_guest_detail.lastname}"{/if}/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="required text form-group col-sm-6">
|
||||
<label for="email">{l s='Email'} <sup>*</sup></label>
|
||||
<input type="email" class="text form-control validate is_required" id="booking_staying_guest_email" name="booking_staying_guest_email" data-validate="isEmail"{if isset($smarty.post.booking_staying_guest_email) && $smarty.post.booking_staying_guest_email} value="{$smarty.post.booking_staying_guest_email}"{elseif isset($booking_staying_guest) && $booking_staying_guest.email} value="{$booking_staying_guest.email}"{/if}/>
|
||||
<input type="email" class="text form-control validate is_required" id="customer_guest_detail_email" name="customer_guest_detail_email" data-validate="isEmail"{if isset($smarty.post.customer_guest_detail_email) && $smarty.post.customer_guest_detail_email} value="{$smarty.post.customer_guest_detail_email}"{elseif isset($customer_guest_detail) && $customer_guest_detail.email} value="{$customer_guest_detail.email}"{/if}/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group col-sm-6">
|
||||
<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>**</sup>{/if}</label>
|
||||
<input type="text" class="text form-control validate is_required" name="booking_staying_guest_phone" id="booking_staying_guest_phone" data-validate="isPhoneNumber"{if isset($smarty.post.booking_staying_guest_phone) && $smarty.post.booking_staying_guest_phone} value="{$smarty.post.booking_staying_guest_phone}"{elseif isset($booking_staying_guest) && $booking_staying_guest.phone} value="{$booking_staying_guest.phone}"{/if}/>
|
||||
<input type="text" class="text form-control validate is_required" name="customer_guest_detail_phone" id="customer_guest_detail_phone" data-validate="isPhoneNumber"{if isset($smarty.post.customer_guest_detail_phone) && $smarty.post.customer_guest_detail_phone} value="{$smarty.post.customer_guest_detail_phone}"{elseif isset($customer_guest_detail) && $customer_guest_detail.phone} value="{$customer_guest_detail.phone}"{/if}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="customer_info_container" {if $id_booking_staying_guest}style="display: none;"{/if}>
|
||||
<div id="customer_info_container" {if $id_customer_guest_detail}style="display: none;"{/if}>
|
||||
<div class="row margin-btm-10">
|
||||
<div class="col-sm-3 col-xs-5 info-head">{l s='Name'}</div>
|
||||
<div class="col-sm-9 col-xs-7 info-value">{$guestInformations['firstname']} {$guestInformations['lastname']}</div>
|
||||
|
||||
Reference in New Issue
Block a user