| Server IP : 162.214.74.102 / Your IP : 216.73.216.36 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/public_html/lrsys_projetos/sopizzas/application/views/frontend/ |
Upload File : |
<?php
$myArray = $this->session->userdata('order_restaurant_id');
$businessType = isset($myArray['is_restaurant']) ? $myArray['is_restaurant'] : "0";
//print_r($res_details);
?>
<?php echo $map['js']; ?>
<script src="https://maps.googleapis.com/maps/api/js?key=<?=MAP_API_KEY?>&callback=initMap"
async defer></script>
<style type="text/css">
@import url(http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css);
</style>
<div class="for-fixed-img"></div>
<section>
<?php
if ($res_details['restaurant_display_banner'] == 'Yes') {
$banner_image_file_path = FCPATH . RESTAURAT_BANNER_PATH_THUMBS . $res_details['res_marketbanner_img_code'];
if ($res_details['res_marketbanner_img_code'] != '') //file_exists of a url returns false.It should be real file path
{
$banner_image_name_with_path = base_url() . RESTAURAT_BANNER_PATH_THUMBS . $res_details['res_marketbanner_img_code'];
} else {
$banner_image_name_with_path = base_url() . RESTAURAT_BANNER_PATH_THUMBS . RESTAURAT_DEFAULT_BANNER;
}
} else {
//$banner_image_name_with_path=base_url().RESTAURAT_BANNER_PATH_THUMBS.RESTAURAT_DEFAULT_BANNER;
}
?>
<?php if ($res_details['restaurant_display_banner'] == 'Yes') { ?>
<div class="details-header"
style="background: url(<?php echo $banner_image_name_with_path; ?>) no-repeat center center; background-size: cover;">
<!--<div class="details-header" style="background: url(<?= base_url(); ?>/assets/uploaded_image/restaurant/thumbs/171_20170628064300_banner.jpg) no-repeat center center; background-size: cover;">-->
<?php }else{ ?>
<div class="details-header" style="background: <?php echo $res_details['banner_color']; ?>">
<?php } ?>
<div class="container">
<div class="col-md-12 custom-padding-0">
<div class="col-md-8 col-sm-7 custom-padding-0">
<div class="restaurant-infobox">
<div class="vendor-imagebox">
<?php
if (isset($res_details['restaurant_logo']) && $res_details['restaurant_logo'] != '') {
$image_file_path = FCPATH . RESTAURAT_LOGO_PATH_THUMBS . $res_details['restaurant_logo'];
if (file_exists($image_file_path)) //file_exists of a url returns false.It should be real file path
{
$image_name_with_path = base_url() . RESTAURAT_LOGO_PATH_THUMBS . $res_details['restaurant_logo'];
} else {
$image_name_with_path = base_url() . RESTAURAT_LOGO_PATH_THUMBS . RESTAURAT_DEFAULT_IMAGE;
}
} else {
$image_name_with_path = base_url() . RESTAURAT_LOGO_PATH_THUMBS . RESTAURAT_DEFAULT_IMAGE;
}
?>
<img class="lazy-loaded" alt="" src="<?php echo $image_name_with_path; ?>" height="100"
width="100">
</div>
<div class="vendor-info">
<p class="ratingstar">
<div class="star-ratings-sprite" style="float: left;"><span
style="width: <?= $avgRating ?>%" class="star-ratings-sprite-rating"></span>
</div> <!-- <span>(1 Reviews)</span> --></p>
<div class="clearfix"></div>
<h2 class="restonametext"><?php echo $res_details['restaurant_name']; ?></h2>
<?php
$streetAddress = $res_details['restaurant_streetaddress'];
if ($streetAddress != '' && $res_details['restaurant_city']) {
$streetAddress .= ', ' . $res_details['restaurant_city'];
}
if ($streetAddress != '' && $res_details['restaurant_state']) {
$streetAddress .= ', ' . $res_details['restaurant_state'];
}
if ($streetAddress != '' && $res_details['restaurant_zip']) {
$streetAddress .= ', ' . $res_details['restaurant_zip'];
}
?>
<p class="restoaddress"><i class="fa fa-map-marker"
aria-hidden="true"></i> <?php echo $streetAddress; ?></p>
<div class="fb-share-button" data-href="<?= SITE_ADDRESS . $_SERVER["REQUEST_URI"] ?>"
data-layout="button_count" data-size="small" data-mobile-iframe="true"><a
class="fb-xfbml-parse-ignore" target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=<?= urlencode(SITE_ADDRESS . $_SERVER["REQUEST_URI"]) ?>">Share</a>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-5 custom-padding-0">
<?php
$invisible = 'invisible';
$deliveryDetails_deliveryZone = 0;
$deliveryDetails_deliveryCharge = 0;
$deliveryDetails_minOrderPrice = 0;
if ($this->session->userdata('delivery_details')) {
$deliveryDetails = $this->session->userdata('delivery_details');
if ($deliveryDetails['isDeliveryAvailable']) {
$invisible = '';
$deliveryDetails_deliveryZone = $deliveryDetails['deliveryZone'];
$deliveryDetails_deliveryCharge = $deliveryDetails['deliveryCharge'];
$deliveryDetails_minOrderPrice = $deliveryDetails['minOrderPrice'];
}
}
?>
<div class="delivery-info <?= $invisible ?>">
<div class="deliverystat-icon">
<i class="fa fa-motorcycle" aria-hidden="true"></i>
</div>
<div class="deliveryfee-stat">
<p><?php echo $this->lang->line('Delivery_Fee'); ?>:
<span><?php echo SITENAME_CURRENCY . $deliveryDetails_deliveryCharge; ?></span></p>
<p><?php echo $this->lang->line('Min_Order'); ?>:
<span><?php echo SITENAME_CURRENCY . $deliveryDetails_minOrderPrice; ?></span></p>
</div>
</div>
<?php
$day = strtolower(date('D'));
$time1_open = isset($res_details['restaurant_delivery_' . $day . '_opentime']) ? $res_details['restaurant_delivery_' . $day . '_opentime'] : '';
$time1_close = isset($res_details['restaurant_delivery_' . $day . '_closetime']) ? $res_details['restaurant_delivery_' . $day . '_closetime'] : '';
$time2_open = isset($res_details['restaurant_delivery_' . $day . '_opentime1']) ? $res_details['restaurant_delivery_' . $day . '_opentime1'] : '';
$time2_close = isset($res_details['restaurant_delivery_' . $day . '_closetime1']) ? $res_details['restaurant_delivery_' . $day . '_closetime1'] : '';
$time3_open = isset($res_details['restaurant_delivery_' . $day . '_opentime2']) ? $res_details['restaurant_delivery_' . $day . '_opentime2'] : '';
$time3_close = isset($res_details['restaurant_delivery_' . $day . '_closetime2']) ?: '';
$openCloseTimeHtml = '';
if ($time1_open !== '' && $time1_close !== '') {
$openCloseTimeHtml .= '<option value="0"><span class="thisday">' . $this->lang->line('Today') . ' :</span> ' . date('H:i a', strtotime($time1_open)) . ' - ' . date('H:i a', strtotime($time1_close)) . '</option>';
}
if ($time2_open !== '' && $time2_close !== '') {
$openCloseTimeHtml .= '<option value="1"><span class="thisday">' . $this->lang->line('Today') . ' :</span> ' . date('H:i a', strtotime($time2_open)) . ' - ' . date('H:i a', strtotime($time2_close)) . '</option>';
}
if ($time3_open !== '' && $time3_close !== '') {
$openCloseTimeHtml .= '<option value="2"><span class="thisday">' . $this->lang->line('Today') . ' :</span> ' . date('H:i a', strtotime($time3_open)) . ' - ' . date('H:i a', strtotime($time3_close)) . '</option>';
}
?>
<?php
if ($openCloseTimeHtml !== '') {
?>
<div class="selectizing-wrapper hide">
<select class="custom-select-one">
<?= $openCloseTimeHtml ?>
<!-- <option value="0"><span class="thisday">'.$this->lang->line('Today').' :</span> 11:00 am - 01:00 pm</option>
<option value="1"><span class="thisday">'.$this->lang->line('Today').' :</span> 03:00 pm - 6:00 pm</option>
<option value="2"><span class="thisday">'.$this->lang->line('Today').' :</span> 08:00 pm - 11:00 pm</option> -->
</select>
</div>
<?php
}
?>
</div>
</div>
</div>
<!-- <div class="location-header">
<div class="container">
<?php
$streetAddress = $res_details['restaurant_streetaddress'];
if ($streetAddress != '' && $res_details['restaurant_city']) {
$streetAddress .= ', ' . $res_details['restaurant_city'];
}
if ($streetAddress != '' && $res_details['restaurant_state']) {
$streetAddress .= ', ' . $res_details['restaurant_state'];
}
if ($streetAddress != '' && $res_details['restaurant_zip']) {
$streetAddress .= ', ' . $res_details['restaurant_zip'];
}
?>
<span><i class="fa fa-map-marker" aria-hidden="true"></i> <?php echo $streetAddress; ?></span>
</div>
</div> -->
<div class="container-overlay container-overal-rdp"></div>
</div>
</section>
<section id="details-restaurant">
<div class="container">
<div class="row">
<div class="col-md-2 col-sm-4 mc-top40">
<aside class="vendor-menu__categories">
<div class="sticky-wrapper" id="sticky-wrapper">
<div style="" class="js-sticky-element" id="menu-center">
<h3><i class="fa fa-cutlery"
aria-hidden="true"></i> <?php echo $this->lang->line('Categories'); ?></h3>
<ul class="categories__list ">
<li class="categories__list__item">
<a href="javascript:void(0)"
onclick="goTo('#menu-center')"><?php echo $this->lang->line('All_Categories'); ?></a>
</li>
<?php if (is_array($categoryList) && sizeof($categoryList) > 0) {
foreach ($categoryList as $key => $value) {
?>
<li class="categories__list__item">
<a href="javascript:void(0)"
onclick="goTo('#<?= $value['maincateid'] ?>')"><?= $value['maincatename'] ?></a>
</li>
<?php }
} ?>
</ul>
</div>
</div>
</aside>
</div>
<div class="col-md-6 col-sm-8 col-xs-12 paddxs" id="leftBox">
<ul class="nav nav-tabs vendor-tabs">
<li class="<?php echo ($tabName != "bookTable" ? "active" : "")?>"><a data-toggle="tab" href="#home"><i class="fa fa-coffee"
aria-hidden="true"></i> <?php echo $this->lang->line('Menu'); ?>
</a></li>
<li><a data-toggle="tab" href="#menu1"><i class="fa fa-bookmark" aria-hidden="true"></i> <?php echo $this->lang->line('Coupons'); ?></a>
</li>
<?php
if ($businessType == 0) {
?>
<li><a data-toggle="tab" href="#menu2"><i class="fa fa-commenting"
aria-hidden="true"></i> <?php echo $this->lang->line('Info'); ?>
</a></li>
<?php
}
?>
<li class="hide"><a data-toggle="tab" href="#menu3"><i class="fa fa-heart"
aria-hidden="true"></i> <?php echo $this->lang->line('Reviews'); ?>
</a></li>
<li onclick="show_gmap();"><a data-toggle="tab" href="#menu4"><i class="fa fa-map-marker"
aria-hidden="true"></i> <?php echo $this->lang->line('GetDirections'); ?></a></li>
<li class="<?php echo ($res_details["restaurant_booktable"] == "Yes" ? "hide" : "hide"); echo ($tabName == "bookTable" ? "active" : "")?>"><a data-toggle="tab"
href="#menu5"><i
class="fa fa-book" aria-hidden="true"></i> <?php echo $this->lang->line('Reservation'); ?></a></li>
</ul>
<div class="tab-content">
<div id="home" class="tab-pane fade <?php echo ($tabName != "bookTable" ? "active in" : "")?>">
<div class="vendor-menu">
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<!-- <form name="addOrderForm" id="addOrderForm" method="post"> -->
<?php $parameters = array('name' => 'addOrderForm', 'id' => 'addOrderForm');
echo form_open('', $parameters); ?>
<span id="menuDetailsWrap"></span>
</form>
</div>
<!-- Modal -->
<div class="vendor-menu__menus">
<section class="menu">
<div id="uct" class="col-xs-12 custom-padding-0 desp">
<span class="addons-icon"><span
class="menu-item__dish-characteristic menu-item__dish-characteristic__vegetarian"
data-toggle="tooltip"
data-placement="bottom">●</span> <?php echo $this->lang->line('Veg'); ?></span>
<span class="addons-icon"><span
class="menu-item__dish-characteristic_non menu-item__dish-characteristic__nonvegetarian"
data-toggle="tooltip"
data-placement="bottom">●</span> <?php echo $this->lang->line('Non-Veg'); ?></span>
<span class="addons-icon"><img
src="<?php echo base_url(); ?>assets/img/front-end/popular.png"> <p><?php echo $this->lang->line('Popular'); ?></p></span>
<span class="addons-icon"><img
src="<?php echo base_url(); ?>assets/img/front-end/nuts.png"> <p><?php echo $this->lang->line('Contain_Nuts'); ?></p></span>
<span class="addons-icon"><img
src="<?php echo base_url(); ?>assets/img/front-end/mid-hot.png"> <p><?php echo $this->lang->line('Medium_Hot'); ?></p></span>
<span class="addons-icon"><img
src="<?php echo base_url(); ?>assets/img/front-end/fair-hot.png"> <p><?php echo $this->lang->line('Fairly_Hot'); ?></p></span>
<span class="addons-icon"><img
src="<?php echo base_url(); ?>assets/img/front-end/very-hot.png"> <p><?php echo $this->lang->line('Very_Hot'); ?></p></span>
<span class="addons-icon"><img
src="<?php echo base_url(); ?>assets/img/front-end/gluten.png"> <p><?php echo $this->lang->line('Contains_Gluten'); ?></p></span>
<span class="addons-icon"><img
src="<?php echo base_url(); ?>assets/img/front-end/extremely-hot.png"> <p><?php echo $this->lang->line('Extremely_Hot'); ?></p></span>
</div>
<?php echo $MenuList; ?>
</section>
</div>
</div>
</div>
<div id="menu1" class="tab-pane fade">
<h3>Offers</h3>
<?php $offernow = "";
if (is_array($Offers) && sizeof($Offers) > 0) {
foreach ($Offers as $key => $value) {
$couponcode = $value['coupon_code'];
if ($value['offer_percentage'] != 0.00) {
$offernow = $value['offer_percentage'] . " %";
} else if ($value['offer_price'] != 0.00) {
$offernow = "$ " . $value['offer_price'];
}
?>
<p><?php echo $this->lang->line('Oneofferperorder'); ?></p>
<h1>
<label style="border: 1px dashed black;background: rgba(0, 0, 0, 0.05) none repeat scroll 0% 0%;"><?php echo $couponcode; ?></label>
</h1>
<h3><?php echo $offernow; ?> <?php echo $this->lang->line('OFF'); ?> <span
style="float:right;"><?php echo $this->lang->line('Validtill'); ?>: <?php echo date('m-d-Y', strtotime($value['offer_valid_to'])); ?></span>
</h3>
<?php }
} else { ?>
<p><?php echo $this->lang->line('Nooffer'); ?></p>
<?php } ?>
</div>
<div id="menu2" class="tab-pane fade">
<h3><?php echo $this->lang->line('About_Restaurant'); ?></h3>
<p><?php echo nl2br($res_details['restaurant_description']); ?></p>
<!-- <h3>Delivery Area</h3>
<p>Alamo</p> -->
<div class="table-responsive">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th colspan="4"><h3><?php echo $this->lang->line('Opening_Hours_Days'); ?></h3></th>
</tr>
</thead>
<tbody>
<tr class="">
<td><?php echo $this->lang->line('Mon'); ?></td>
<?php
$restaurant_delivery_mon_time = '';
$restaurant_delivery_mon_time1 = '';
$restaurant_delivery_mon_time2 = '';
$restaurant_delivery_mon_opentime = '';
$restaurant_delivery_mon_opentime = isset($res_details['restaurant_delivery_mon_opentime']) ? $res_details['restaurant_delivery_mon_opentime'] : '';
$restaurant_delivery_mon_closetime = '';
$restaurant_delivery_mon_closetime = isset($res_details['restaurant_delivery_mon_closetime']) ? $res_details['restaurant_delivery_mon_closetime'] : '';
if ($restaurant_delivery_mon_closetime != '' && $restaurant_delivery_mon_opentime != '') {
$restaurant_delivery_mon_time = $restaurant_delivery_mon_opentime . " to " . $restaurant_delivery_mon_closetime;
} else {
$restaurant_delivery_mon_time = "Close";
}
?>
<td><?php echo $restaurant_delivery_mon_time; ?> </td>
<?php
$restaurant_delivery_mon_opentime1 = '';
$restaurant_delivery_mon_closetime1 = '';
$restaurant_delivery_mon_opentime2 = '';
$restaurant_delivery_mon_closetime2 = '';
if ($restaurant_delivery_mon_time != "Close") {
$restaurant_delivery_mon_opentime1 = isset($res_details['restaurant_delivery_mon_opentime1']) ? $res_details['restaurant_delivery_mon_opentime1'] : '';
$restaurant_delivery_mon_closetime1 = isset($res_details['restaurant_delivery_mon_closetime1']) ? $res_details['restaurant_delivery_mon_closetime1'] : '';
if ($restaurant_delivery_mon_closetime1 != '' && $restaurant_delivery_mon_opentime1 != '') {
$restaurant_delivery_mon_time1 = $restaurant_delivery_mon_opentime1 . " to " . $restaurant_delivery_mon_closetime1;
}
$restaurant_delivery_mon_opentime2 = isset($res_details['restaurant_delivery_mon_opentime2']) ? $res_details['restaurant_delivery_mon_opentime2'] : '';
$restaurant_delivery_mon_closetime2 = isset($res_details['restaurant_delivery_mon_closetime1']) ? $res_details['restaurant_delivery_mon_closetime2'] : '';
if ($restaurant_delivery_mon_closetime2 != '' && $restaurant_delivery_mon_opentime2 != '') {
$restaurant_delivery_mon_time2 = $restaurant_delivery_mon_opentime2 . " to " . $restaurant_delivery_mon_closetime2;
}
}
?>
<td><?php echo $restaurant_delivery_mon_time1; ?> </td>
<td><?php echo $restaurant_delivery_mon_time2; ?> </td>
</tr>
<tr class="">
<?php
$restaurant_delivery_tue_time = '';
$restaurant_delivery_tue_time1 = '';
$restaurant_delivery_tue_time2 = '';
$restaurant_delivery_tue_opentime = '';
$restaurant_delivery_tue_opentime = isset($res_details['restaurant_delivery_tue_opentime']) ? $res_details['restaurant_delivery_tue_opentime'] : '';
$restaurant_delivery_tue_closetime = '';
$restaurant_delivery_tue_closetime = isset($res_details['restaurant_delivery_tue_closetime']) ? $res_details['restaurant_delivery_tue_closetime'] : '';
if ($restaurant_delivery_tue_closetime != '' && $restaurant_delivery_tue_opentime != '') {
$restaurant_delivery_tue_time = $restaurant_delivery_tue_opentime . " to " . $restaurant_delivery_tue_closetime;
} else {
$restaurant_delivery_tue_time = "Close";
}
$restaurant_delivery_tue_opentime1 = '';
$restaurant_delivery_tue_closetime1 = '';
$restaurant_delivery_tue_opentime1 = '';
$restaurant_delivery_tue_closetime2 = '';
if ($restaurant_delivery_tue_time != "Close") {
$restaurant_delivery_tue_opentime1 = isset($res_details['restaurant_delivery_tue_opentime1']) ? $res_details['restaurant_delivery_tue_opentime1'] : '';
$restaurant_delivery_tue_closetime1 = isset($res_details['restaurant_delivery_tue_closetime1']) ? $res_details['restaurant_delivery_tue_closetime1'] : '';
if ($restaurant_delivery_tue_closetime1 != '' && $restaurant_delivery_tue_opentime1 != '') {
$restaurant_delivery_tue_time1 = $restaurant_delivery_tue_opentime1 . " to " . $restaurant_delivery_tue_closetime1;
}
$restaurant_delivery_tue_opentime2 = isset($res_details['restaurant_delivery_tue_opentime2']) ? $res_details['restaurant_delivery_tue_opentime2'] : '';
$restaurant_delivery_tue_closetime2 = isset($res_details['restaurant_delivery_tue_closetime2']) ? $res_details['restaurant_delivery_tue_closetime2'] : '';
if ($restaurant_delivery_tue_closetime2 != '' && $restaurant_delivery_tue_opentime2 != '') {
$restaurant_delivery_tue_time2 = $restaurant_delivery_tue_opentime2 . " to " . $restaurant_delivery_tue_closetime2;
}
}
?>
<td><?php echo $this->lang->line('Tue'); ?></td>
<td><?php echo $restaurant_delivery_tue_time; ?> </td>
<td><?php echo $restaurant_delivery_tue_time1; ?> </td>
<td><?php echo $restaurant_delivery_tue_time2; ?> </td>
</tr>
<tr class="">
<?php
$restaurant_delivery_wed_time = '';
$restaurant_delivery_wed_time1 = '';
$restaurant_delivery_wed_time2 = '';
$restaurant_delivery_wed_opentime = '';
$restaurant_delivery_wed_opentime = isset($res_details['restaurant_delivery_wed_opentime']) ? $res_details['restaurant_delivery_wed_opentime'] : '';
$restaurant_delivery_wed_closetime = '';
$restaurant_delivery_wed_closetime = isset($res_details['restaurant_delivery_wed_closetime']) ? $res_details['restaurant_delivery_wed_closetime'] : '';
if ($restaurant_delivery_wed_closetime != '' && $restaurant_delivery_wed_opentime != '') {
$restaurant_delivery_wed_time = $restaurant_delivery_wed_opentime . " to " . $restaurant_delivery_wed_closetime;
} else {
$restaurant_delivery_wed_time = "Close";
}
$restaurant_delivery_wed_opentime1 = '';
$restaurant_delivery_wed_closetime1 = '';
$restaurant_delivery_wed_opentime2 = '';
$restaurant_delivery_wed_closetime2 = '';
if ($restaurant_delivery_wed_time != "Close") {
$restaurant_delivery_wed_opentime1 = isset($res_details['restaurant_delivery_wed_opentime1']) ? $res_details['restaurant_delivery_wed_opentime1'] : '';
$restaurant_delivery_wed_closetime1 = isset($res_details['restaurant_delivery_wed_closetime1']) ? $res_details['restaurant_delivery_wed_closetime1'] : '';
if ($restaurant_delivery_wed_closetime1 != '' && $restaurant_delivery_wed_opentime1 != '') {
$restaurant_delivery_wed_time1 = $restaurant_delivery_wed_opentime1 . " to " . $restaurant_delivery_wed_closetime1;
}
$restaurant_delivery_wed_opentime2 = isset($res_details['restaurant_delivery_wed_opentime2']) ? $res_details['restaurant_delivery_wed_opentime2'] : '';
$restaurant_delivery_wed_closetime2 = '';
$restaurant_delivery_wed_closetime2 = isset($res_details['restaurant_delivery_wed_closetime2']) ? $res_details['restaurant_delivery_wed_closetime2'] : '';
if ($restaurant_delivery_wed_closetime2 != '' && $restaurant_delivery_wed_opentime2 != '') {
$restaurant_delivery_wed_time2 = $restaurant_delivery_wed_opentime2 . " to " . $restaurant_delivery_wed_closetime2;
}
}
?>
<td><?php echo $this->lang->line('Wed'); ?></td>
<td><?php echo $restaurant_delivery_wed_time; ?></td>
<td><?php echo $restaurant_delivery_wed_time1; ?> </td>
<td><?php echo $restaurant_delivery_wed_time2; ?> </td>
</tr>
<tr class="">
<?php
$restaurant_delivery_thu_time = '';
$restaurant_delivery_thu_time1 = '';
$restaurant_delivery_thu_time2 = '';
$restaurant_delivery_thu_opentime = '';
$restaurant_delivery_thu_opentime = isset($res_details['restaurant_delivery_thu_opentime']) ? $res_details['restaurant_delivery_thu_opentime'] : '';
$restaurant_delivery_thu_closetime = '';
$restaurant_delivery_thu_closetime = isset($res_details['restaurant_delivery_thu_closetime']) ? $res_details['restaurant_delivery_thu_closetime'] : '';
if ($restaurant_delivery_thu_closetime != '' && $restaurant_delivery_thu_opentime != '') {
$restaurant_delivery_thu_time = $restaurant_delivery_thu_opentime . " to " . $restaurant_delivery_thu_closetime;
} else {
$restaurant_delivery_thu_time = "Close";
}
$restaurant_delivery_thu_opentime1 = '';
$restaurant_delivery_thu_closetime1 = '';
$restaurant_delivery_thu_opentime2 = '';
$restaurant_delivery_thu_closetime2 = '';
if ($restaurant_delivery_thu_time != "Close") {
$restaurant_delivery_thu_opentime1 = isset($res_details['restaurant_delivery_thu_opentime1']) ? $res_details['restaurant_delivery_thu_opentime1'] : '';
$restaurant_delivery_thu_closetime1 = isset($res_details['restaurant_delivery_thu_closetime1']) ? $res_details['restaurant_delivery_thu_closetime1'] : '';
if ($restaurant_delivery_thu_closetime1 != '' && $restaurant_delivery_thu_opentime1 != '') {
$restaurant_delivery_thu_time1 = $restaurant_delivery_thu_opentime1 . " to " . $restaurant_delivery_thu_closetime1;
}
$restaurant_delivery_thu_opentime2 = isset($res_details['restaurant_delivery_thu_opentime2']) ? $res_details['restaurant_delivery_thu_opentime2'] : '';
$restaurant_delivery_thu_closetime2 = isset($res_details['restaurant_delivery_thu_closetime2']) ? $res_details['restaurant_delivery_thu_closetime2'] : '';
if ($restaurant_delivery_thu_closetime2 != '' && $restaurant_delivery_thu_opentime2 != '') {
$restaurant_delivery_thu_time2 = $restaurant_delivery_thu_opentime2 . " to " . $restaurant_delivery_thu_closetime2;
}
}
?>
<td><?php echo $this->lang->line('Thu'); ?></td>
<td><?php echo $restaurant_delivery_thu_time; ?> </td>
<td><?php echo $restaurant_delivery_thu_time1; ?> </td>
<td><?php echo $restaurant_delivery_thu_time2; ?> </td>
</tr>
<tr class="">
<?php
$restaurant_delivery_fri_time = '';
$restaurant_delivery_fri_time1 = '';
$restaurant_delivery_fri_time2 = '';
$restaurant_delivery_fri_opentime = '';
$restaurant_delivery_fri_opentime = isset($res_details['restaurant_delivery_fri_opentime']) ? $res_details['restaurant_delivery_fri_opentime'] : '';
$restaurant_delivery_fri_closetime = '';
$restaurant_delivery_fri_closetime = isset($res_details['restaurant_delivery_fri_closetime']) ? $res_details['restaurant_delivery_fri_closetime'] : '';
if ($restaurant_delivery_fri_closetime != '' && $restaurant_delivery_fri_opentime != '') {
$restaurant_delivery_fri_time = $restaurant_delivery_fri_opentime . " to " . $restaurant_delivery_fri_closetime;
} else {
$restaurant_delivery_fri_time = "Close";
}
$restaurant_delivery_fri_opentime1 = '';
$restaurant_delivery_fri_closetime1 = '';
$restaurant_delivery_fri_opentime2 = '';
$restaurant_delivery_fri_closetime2 = '';
if ($restaurant_delivery_fri_time != "Close") {
$restaurant_delivery_fri_opentime1 = isset($res_details['restaurant_delivery_fri_opentime1']) ? $res_details['restaurant_delivery_fri_opentime1'] : '';
$restaurant_delivery_fri_closetime1 = isset($res_details['restaurant_delivery_fri_closetime1']) ? $res_details['restaurant_delivery_fri_closetime1'] : '';
if ($restaurant_delivery_fri_closetime1 != '' && $restaurant_delivery_fri_opentime1 != '') {
$restaurant_delivery_fri_time1 = $restaurant_delivery_fri_opentime1 . " to " . $restaurant_delivery_fri_closetime1;
}
$restaurant_delivery_fri_opentime2 = isset($res_details['restaurant_delivery_fri_opentime2']) ? $res_details['restaurant_delivery_fri_opentime2'] : '';
$restaurant_delivery_fri_closetime2 = isset($res_details['restaurant_delivery_fri_closetime2']) ? $res_details['restaurant_delivery_fri_closetime2'] : '';
if ($restaurant_delivery_fri_closetime2 != '' && $restaurant_delivery_fri_opentime2 != '') {
$restaurant_delivery_fri_time2 = $restaurant_delivery_fri_opentime2 . " to " . $restaurant_delivery_fri_closetime2;
}
}
?>
<td><?php echo $this->lang->line('Fri'); ?></td>
<td><?php echo $restaurant_delivery_fri_time; ?> </td>
<td><?php echo $restaurant_delivery_fri_time1; ?> </td>
<td><?php echo $restaurant_delivery_fri_time2; ?> </td>
</tr>
<tr class="">
<?php
$restaurant_delivery_sat_time = '';
$restaurant_delivery_sat_time1 = '';
$restaurant_delivery_sat_time2 = '';
$restaurant_delivery_sat_opentime = '';
$restaurant_delivery_sat_opentime = isset($res_details['restaurant_delivery_sat_opentime']) ? $res_details['restaurant_delivery_sat_opentime'] : '';
$restaurant_delivery_sat_closetime = '';
$restaurant_delivery_sat_closetime = isset($res_details['restaurant_delivery_sat_closetime']) ? $res_details['restaurant_delivery_sat_closetime'] : '';
if ($restaurant_delivery_sat_closetime != '' && $restaurant_delivery_sat_opentime != '') {
$restaurant_delivery_sat_time = $restaurant_delivery_sat_opentime . " to " . $restaurant_delivery_sat_closetime;
} else {
$restaurant_delivery_sat_time = "Close";
}
$restaurant_delivery_sat_opentime1 = '';
$restaurant_delivery_sat_closetime1 = '';
$restaurant_delivery_sat_opentime2 = '';
$restaurant_delivery_sat_closetime2 = '';
if ($restaurant_delivery_sat_time != "Close") {
$restaurant_delivery_sat_opentime1 = isset($res_details['restaurant_delivery_sat_opentime1']) ? $res_details['restaurant_delivery_sat_opentime1'] : '';
$restaurant_delivery_sat_closetime1 = isset($res_details['restaurant_delivery_sat_closetime1']) ? $res_details['restaurant_delivery_sat_closetime1'] : '';
if ($restaurant_delivery_sat_closetime1 != '' && $restaurant_delivery_sat_opentime1 != '') {
$restaurant_delivery_sat_time1 = $restaurant_delivery_sat_opentime1 . " to " . $restaurant_delivery_sat_closetime1;
}
$restaurant_delivery_sat_opentime2 = isset($res_details['restaurant_delivery_sat_opentime2']) ? $res_details['restaurant_delivery_sat_opentime2'] : '';
$restaurant_delivery_sat_closetime2 = isset($res_details['restaurant_delivery_sat_closetime2']) ? $res_details['restaurant_delivery_sat_closetime2'] : '';
if ($restaurant_delivery_sat_closetime2 != '' && $restaurant_delivery_sat_opentime2 = '') {
$restaurant_delivery_sat_time2 = $restaurant_delivery_sat_opentime2 . " to " . $restaurant_delivery_sat_closetime2;
}
}
?>
<td><?php echo $this->lang->line('Sat'); ?></td>
<td><?php echo $restaurant_delivery_sat_time; ?> </td>
<td><?php echo $restaurant_delivery_sat_time1; ?> </td>
<td><?php echo $restaurant_delivery_sat_time2; ?> </td>
</tr>
<tr class="">
<?php
$restaurant_delivery_sun_time = '';
$restaurant_delivery_sun_time1 = '';
$restaurant_delivery_sun_time2 = '';
$restaurant_delivery_sun_opentime = '';
$restaurant_delivery_sun_opentime = isset($res_details['restaurant_delivery_sun_opentime']) ? $res_details['restaurant_delivery_sun_opentime'] : '';
$restaurant_delivery_sun_closetime = '';
$restaurant_delivery_sun_closetime = isset($res_details['restaurant_delivery_sun_closetime']) ? $res_details['restaurant_delivery_sun_closetime'] : '';
if ($restaurant_delivery_sun_closetime != '' && $restaurant_delivery_sun_opentime != '') {
$restaurant_delivery_sun_time = $restaurant_delivery_sun_opentime . " to " . $restaurant_delivery_sun_closetime;
} else {
$restaurant_delivery_sun_time = "Close";
}
$restaurant_delivery_sun_opentime1 = '';
$restaurant_delivery_sun_closetime1 = '';
$restaurant_delivery_sun_opentime2 = '';
$restaurant_delivery_sun_closetime2 = '';
if ($restaurant_delivery_sun_time != "Close") {
$restaurant_delivery_sun_opentime1 = isset($res_details['restaurant_delivery_sun_opentime1']) ? $res_details['restaurant_delivery_sun_opentime1'] : '';
$restaurant_delivery_sun_closetime1 = isset($res_details['restaurant_delivery_sun_closetime1']) ? $res_details['restaurant_delivery_sun_closetime1'] : '';
if ($restaurant_delivery_sun_closetime1 != '' && $restaurant_delivery_sun_opentime1 != '') {
$restaurant_delivery_sun_time1 = $restaurant_delivery_sun_opentime1 . " to " . $restaurant_delivery_sun_closetime1;
}
$restaurant_delivery_sun_opentime2 = isset($res_details['restaurant_delivery_sun_opentime2']) ? $res_details['restaurant_delivery_sun_opentime2'] : '';
$restaurant_delivery_sun_closetime2 = isset($res_details['restaurant_delivery_sun_closetime2']) ? $res_details['restaurant_delivery_sun_closetime2'] : '';
if ($restaurant_delivery_sun_closetime2 != '') {
$restaurant_delivery_sun_time2 = $restaurant_delivery_sun_opentime2 . " to " . $restaurant_delivery_sun_closetime2;
}
}
?>
<td><?php echo $this->lang->line('Sun'); ?></td>
<td><?php echo $restaurant_delivery_sun_time; ?> </td>
<td><?php echo $restaurant_delivery_sun_time1; ?> </td>
<td><?php echo $restaurant_delivery_sun_time2 ?> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="menu3" class="tab-pane fade">
<div class="reviewsection">
<?php
if (isset($RestaurantReviewList) && is_array($RestaurantReviewList)) {
foreach ($RestaurantReviewList as $key => $value) {
?>
<div class="media">
<div class="media-left media-top">
<a href="javascript:void(0);">
<img class="media-object"
src="<?= base_url(); ?>assets/img/front-end/userImage.png" alt="">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">
<?= $value['customer_name'] ?> <?= $value['customer_lastname'] ?>
<?php
if ($value['rating'] != 0) {
?>
<span class="label label-info"><?= $value['rating'] ?> <i
class="fa fa-star" aria-hidden="true"></i></span>
<?php
}
?>
</h4>
<p><?= $value['message'] ?></p>
</div>
</div>
<?php
}
} else {
?>
<div class="media">
<div class="media-body">
<p><?php echo $this->lang->line('No_reviews'); ?></p>
</div>
</div>
<?php
}
?>
<!-- <h4>Add your review</h4>
<form>
<input value="0" type="hidden" class="rating" data-min=0 data-max=5 data-step=0.5 data-size="xs" title="0">
<div class="clearfix"></div>
<div class="form-group">
<textarea placeholder="Write somthing...." class="form-control reviewbox" rows="5" id="comment"></textarea>
</div>
<div class="clearfix"></div>
<button type="button" class="btn btn-warning">Submit</button>
</form> -->
</div>
</div>
<div id="menu4" class="tab-pane fade">
<div id="map1"><?php echo $map['html']; ?></div>
</div>
<?php if ($res_details["restaurant_booktable"] == "Yes") { ?>
<div id="menu5" class="tab-pane fade <?php echo ($tabName == "bookTable" ? "active in" : "")?>">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 paddxs">
<?php if ($this->session->flashdata('success_msg')) { ?>
<div class="alert alert-info text-center">
<a href="#" class="close" data-dismiss="alert"
aria-label="close">×</a>
<strong><?php echo $this->session->flashdata('success_msg'); ?></strong>
</div>
<?php } ?>
<?php if ($this->session->flashdata('error_msg')) { ?>
<div class="alert alert-danger text-center">
<a href="#" class="close" data-dismiss="alert"
aria-label="close">×</a>
<strong><?php echo $this->session->flashdata('error_msg'); ?></strong>
</div>
<?php } ?>
<?php if (validation_errors() != FALSE) { ?>
<div class="alert alert-danger text-center">
<a href="#" class="close" data-dismiss="alert"
aria-label="close">×</a>
<strong><?php echo validation_errors(); ?></strong>
</div>
<?php } ?>
<?php $validator = array('role' => 'form', 'data-toggle' => 'validator', "id"=>"tableBooking");
echo form_open('restaurantviewpage/'.$restaurant_seourl, $validator); ?>
<div class="row">
<div class="checkBg row">
<h4 class="text-center">Table Reservation</h4>
<hr style="margin-top:9px;">
<h3 class="col-sm-12">Customer Details</h3>
<div class="col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<input value="" required name="booking_name" id="booking_name" type="text"
class="form-control bod-form typePrivateField" placeholder="Name" tab-index="1">
<div class="help-block with-errors"></div>
</div>
</div>
<div class=" col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<input value="" required name="booking_home_address" id="booking_home_address" type="text"
class="form-control bod-form typePrivateField" placeholder="Home address" tab-index="2">
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<input pattern="(?:[+][0-9]{1,3}[\s]?)?(?:(?:[(][0-9]{2}[)][\s]?)|(?:[0-9]{2}[\s]?))?(?:(?:[0-9]{1}[0-9.-]{6,8}[0-9]{1})|(?:[0-9]{1}[\s]?[0-9\.-]{6,8}[0-9]{1})){1}"
data-pattern-error="Please enter a valid mobile number" value="" required
name="booking_mobile_number" id="booking_mobile_number" type="text"
class="form-control bod-form typePrivateField" placeholder="Mobile telephone number"
tab-index="3">
<div class="help-block with-errors"></div>
</div>
</div>
<div class=" col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<input pattern="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"
data-pattern-error="Please enter valid email." autocomplete="false" type="email" value=""
required name="booking_email_address" id="booking_email_address"
class="form-control bod-form typePrivateField" placeholder="Email address" tab-index="4">
<div class="help-block with-errors"></div>
</div>
</div>
<div class=" col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<input onkeypress="return false;" value="" required name="booking_date"
id="booking_date" type="text" class="form-control bod-form"
placeholder="Date" tab-index="5">
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="input-group form-group col-md-12 col-xs-12 col-sm-12 paddingleft0">
<input onkeypress="return false;" value="" name="booking_best_time" id="booking_best_time" required
type="text" class="form-control bod-form typePrivateField" placeholder="Time"
tab-index="6">
<div class="help-block with-errors"></div>
</div>
</div>
<div class="clearfix"></div>
<h3 class="col-sm-12">Number of guests</h3>
<div class="col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<input onkeypress="return only_num(event, this.value)" value="" required
name="booking_number_of_attendees_over12"
id="booking_number_of_attendees_over12" type="text"
class="form-control bod-form"
placeholder="Number of attendees over the age of 12"
tab-index="7">
<div class="help-block with-errors"></div>
</div>
</div>
<div class=" col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<input onkeypress="return only_num(event, this.value)" value="" required
name="booking_number_of_attendees_under12"
id="booking_best_time_to_reach_under12" type="text"
class="form-control bod-form"
placeholder="Number of attendees under the age of 12"
tab-index="8">
<div class="help-block with-errors"></div>
</div>
</div>
<h3 class="col-sm-12">Describe special request</h3>
<div class="col-md-12 col-xs-12 col-sm-12 paddxs">
<div class="form-group">
<textarea class="areatext resize_cl" style="" rows="5"
id="booking_special_request" name="booking_special_request"
placeholder="Special request" tab-index="9"></textarea>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 text-center mctop30 paddleft">
<input type="hidden" name="favorite_restaurant" value="<?=$res_details["restaurant_id"]?>" />
<button type="submit" class="btn btn-info col-xs-12"
style="float:none;padding: 12px 12px;">Submit
</button>
</div>
</form>
</div>
<!-- <div class="col-md-4 col-sm-12 col-xs-12 paddxs">
<div class="col-md-12 text-center">
<img src="assets/img/front-end/delivery_man.png">
</div>
<div class="clearfix"></div>
<p class="a-user">Already member? <a href="login.html">Sign in </a> </p>
</div> -->
</div>
</div>
<?php } ?>
</div>
</div>
<div class="col-md-4 col-sm-12 col-xs-12 paddleft0 paddxs">
<?php
if ($res_details['business_type'] == 0) {
?>
<div class="cart__header__head" <?php if ($res_details["restaurant_delivery"] == "Yes") {}else{?> style="visibility: hidden;"<?php }?> >
<div class="cart__header__head__delivery-time">
<div class="cart__header__head__delivery-time__label"><?php echo $this->lang->line('Estimated_delivery_time'); ?></div>
<div class="cart__header__head__delivery-time__time">
<?php
if ($res_details['restaurant_estimated_time'] != '') {
$estimated_time = $res_details['restaurant_estimated_time'];
} else {
$estimated_time = isset($DelliveryTimeList['0']['estimated_time']) ? $DelliveryTimeList['0']['estimated_time'] : '0.00';
}
?>
<span class="delivery_time_minutes"><?php echo $estimated_time; ?></span>
<span class="delivery_time_label"><?php echo $this->lang->line('minutes'); ?></span>
</div>
<div class="clearfix"></div>
</div>
</div>
<?php
//print_r($res_details);
?>
<div class="cart-content" id="myFloatingCart">
<div class="row" style="border-bottom: solid 1px #ededed;padding-bottom: 5px;">
<div class="col-xs-12 center-block text-center">
<!-- <label class="text-white"><strong>Our Services</strong></label> -->
<div class="clearfix"></div>
<?php if ($res_details["restaurant_delivery"] == "Yes") { ?>
<div class="col-xs-12 col-sm-3 text-center"><i class="fa fa-truck"
aria-hidden="true"></i><br/><?php echo $this->lang->line('Delivery'); ?>
</div>
<?php } ?>
<?php if ($res_details["restaurant_dinein"] == "Yes") { ?>
<div class="col-xs-12 col-sm-3 text-center"><i class="fa fa-cutlery"
aria-hidden="true"></i><br/><?php echo $this->lang->line('Dine-In'); ?>
</div>
<?php } ?>
<!-- <?php if ($res_details["restaurant_booktable"] == "Yes") { ?>
<div class="col-xs-12 col-sm-3 text-center"><i class="fa fa-book"
aria-hidden="true"></i><br/>Reservation
</div>
<?php } ?> -->
<?php if ($res_details["restaurant_pickup"] == "Yes") { ?>
<div class="col-xs-12 col-sm-3 text-center"><i class="fa fa-shopping-basket"
aria-hidden="true"></i><br/><?php echo $this->lang->line('Pickup'); ?>
</div>
<?php } ?>
</div>
</div>
<div class="clearfix"></div>
<?php $validator = array('role' => 'form', 'id' => 'cartFullForm');
echo form_open('createorderfrontend', $validator); ?>
<input type="hidden" name="subtotal" id="subtotal">
<input type="hidden" name="taxAmount" id="taxAmount">
<input type="hidden" name="subtotalWithTax" id="subtotalWithTax">
<input type="hidden" name="deliveryCharge" id="deliveryCharge">
<input type="hidden" name="subtotalWithTaxWithDelCharge" id="subtotalWithTaxWithDelCharge">
<!-- <input type="hidden" name="minOrder" id="minOrder" value="<?= $res_details['restaurant_minorder_price'] ?>"> -->
<input type="hidden" name="minOrder" id="minOrder"
value="<?= $deliveryDetails_minOrderPrice ?>">
<div class="cart__header">
<div class="clearfix"></div>
<div class="cart__header__title">
<span class="default-delivery-label"><i class="fa fa-shopping-basket"
aria-hidden="true"></i> <?php echo $this->lang->line('Your_order'); ?></span>
<span class="fa fa-refresh fa-spin pull-right" id="cartLoader"
style="display: none;"></span>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
<div class="cart__products">
<span id="cartDetailsWrap">
<div class="table-responsive">
<table class="table table-hover table-bordered" id="add-cart">
<tbody>
<tr class="text-center">
<td>
<?php echo $this->lang->line('No_items'); ?>
</td>
</tr>
</tbody>
</table>
</div>
</span>
<div class="col-md-12 text-center btn-over">
<button type="submit" class="btn cos-mh-btn col-xs-12" style="float:none;"
id="cartButton"><?php echo $this->lang->line('Next'); ?></button>
</div>
</form>
</div>
</div>
<div class="clearfix"></div>
<?php
} else {
?>
<button type="button" class="bulk"
onclick="window.location.href='<?= base_url() ?>bookorder'"><?php echo $this->lang->line('Bulk'); ?></button>
<?php
}
?>
<!-- <div id="extra-feat">
<span class="col-md-6"><b><i class="fa fa-clock-o fa1"></i> Delivery time</b> </span>
<span class="col-md-6">: <?php echo $estimated_time; ?> min</span>
<div class="clearfix"></div>
<span class="col-md-6"><b><i class="fa fa-sort-amount-desc fa1"></i> Minimum Order</b></span>
<span class="col-md-6">: $<?php echo $res_details['restaurant_minorder_price']; ?></span>
<div class="clearfix"></div>
<span class="col-md-6"><b><i class="fa fa-money fa1"></i> Delivery Fee</b> </span>
<span class="col-md-6">: $<?php echo $admin_data['delivery_by_admin_fee']; ?></span>
</div> -->
</div>
</div>
</div>
</section>
<script type="text/javascript">
//jQuery(document).ready(function($) {
// $('.custom-select-one').selectizing({
// background: '#FFF',
// change: function(){
// var value = $(this).val();
// var text = $(this).find('option:selected').html();
// $('#event-change').html(value + ' : ' + text);
// }
// });
//});
$(window).on("scroll", function () {
var maxWidth = $(document).width();
if (maxWidth > 992) {
if ($(document).scrollTop() > $('.navbar-fixed-top').height() + $('.details-header').height() && $(document).scrollTop() < $('#leftBox').height()) {
$("#myFloatingCart").css("margin-top", $(document).scrollTop() - 450);
}
else if ($(document).scrollTop() < $('.navbar-fixed-top').height() + $('.details-header').height()) {
$("#myFloatingCart").css("margin-top", "0px");
}
}
if (maxWidth >= 768) {
if ($(document).scrollTop() > $('.navbar-fixed-top').height() + $('.details-header').height() + $('.vendor-tabs').height() && $(document).scrollTop() < $('#leftBox').height()) {
$(".vendor-menu__categories").css("margin-top", $(document).scrollTop() - 380);
}
else if ($(document).scrollTop() < $('.navbar-fixed-top').height() + $('.details-header').height() + $('.vendor-tabs').height()) {
$(".vendor-menu__categories").css("margin-top", "0px");
}
}
//console.log($(document).scrollTop());
});
$(function () {
$('#cartFullForm').validator().on('submit', function (e) {
if (e.isDefaultPrevented()) {
// handle the invalid form...
} else {
var cartSubtotal = parseFloat($('#subtotal').val());
var subtotalWithTaxWithDelCharge = parseFloat($('#subtotalWithTaxWithDelCharge').val());
var minOrder = parseFloat($('#minOrder').val());
var choosedOrderType = false;
$('.orderTypeClass').each(function () {
if ($(this).is(':checked')) {
choosedOrderType = true;
}
})
if (cartSubtotal == 0.00) {
swal('', '<?php echo $this->lang->line('cart_is_empty');?>', 'warning');
return false;
}
// else if(minOrder > subtotalWithTaxWithDelCharge) {
else if (minOrder > cartSubtotal) {
swal('', '<?php echo $this->lang->line('Minimum_order_price');?>' + minOrder + ' <?php echo $this->lang->line('is_not_reached');?>', 'warning');
return false;
}
else if (choosedOrderType == false) {
swal('', '<?php echo $this->lang->line('choose_an_option');?>', 'warning');
return false;
}
}
});
base_url = '<?php echo base_url(); ?>';
url = base_url + 'createorderfrontend/updateCartView';
$('#cartLoader').show();
$.ajax({
url: url,
type: 'POST',
data: {csrf_token_apm: myCsrfHash},
success: function (data) {
//console.log(data);
obj = JSON.parse(data);
$('#cartDetailsWrap').html(obj['myHtml']);
$('#cartSubtotal').html(obj['subtotal']);
$('#cartGrandtotal').html(obj['subtotalWithTaxWithDelCharge']);
$('#subtotal').val(obj['subtotal']);
$('#taxAmount').val(obj['taxAmount']);
$('#subtotalWithTax').val(obj['subtotalWithTax']);
$('#deliveryCharge').val(obj['deliveryCharge']);
$('#subtotalWithTaxWithDelCharge').val(obj['subtotalWithTaxWithDelCharge']);
$('#cartLoader').hide();
}
})
$('#cartFullForm').validator().on('submit', function (e) {
if (e.isDefaultPrevented()) {
// handle the invalid form...
} else {
var cartSubtotal = parseFloat($('#cartSubtotal').html());
if (cartSubtotal == 0.00) {
$('#cartDetails').modal('show');
return false;
}
}
})
$('#tableBooking').validator().on('submit', function (e) {
if (e.isDefaultPrevented()) {
// handle the invalid form...
} else {
$('#myLoader').show();
}
})
})
function setSizeDetails(myThis) {
var sizeId = $(myThis).attr('data-size-id');
var sizeName = $(myThis).attr('data-size-name');
var sizePrice = $(myThis).attr('data-size-price');
$('#mySizeId').val(sizeId);
$('#mySizeName').val(sizeName);
$('#mySizePrice').val(sizePrice);
}
function setAddonDetails(myThis, parentId, childId) {
var myString = '';
var checked_quan = 0;
$('#addon-qty-' + childId).html('1');
$('input.single-checkbox_' + parentId).each(function () {
if ($(this).is(':checked') == true) {
checked_quan = checked_quan + 1;
var addonName = $(this).attr('data-addon-name');
var addonPrice = $(this).attr('data-addon-price');
var addonId = $(this).attr('data-addon-id');
var addonQty = parseInt($('#addon-qty-' + addonId).html());
myString += ',' + addonName + '|' + addonPrice + '|' + addonQty + '|' + addonId + '|' + parentId;
}
});
$('#myAddonList_' + parentId).val(myString);
}
function changeAddonCount(myThis, childId, parentId, reason, cnt) {
var myString = '';
var checked_quan = 0;
var myAddonQty = 0;
var quantity = $('#myMenuQty').val();
cnt = cnt * quantity;
if ($('#advacce_menu_' + childId).is(':checked') == false) {
swal('', '<?php echo $this->lang->line('tick_the_above');?>', 'warning');
return false;
}
$('input.single-checkbox_' + parentId).each(function () {
if ($(this).is(':checked') == true) {
var addonId = $(this).attr('data-addon-id');
myAddonQty = myAddonQty + parseInt($('#addon-qty-' + addonId).html());
}
});
if (myAddonQty >= cnt && reason == 'i') {
return false;
}
var nowCount = $('#addon-qty-' + childId).html();
var nextCount = parseInt(nowCount);
if (reason == 'd' && nextCount > 1) {
nextCount = nextCount - 1;
}
else if (reason == 'i') {
nextCount = nextCount + 1;
}
$('#addon-qty-' + childId).html(nextCount);
$('input.single-checkbox_' + parentId).each(function () {
if ($(this).is(':checked') == true) {
checked_quan = checked_quan + 1;
var addonName = $(this).attr('data-addon-name');
var addonPrice = $(this).attr('data-addon-price');
var addonId = $(this).attr('data-addon-id');
var addonQty = parseInt($('#addon-qty-' + addonId).html());
myString += ',' + addonName + '|' + addonPrice + '|' + addonQty + '|' + addonId + '|' + parentId;
}
});
$('#myAddonList_' + parentId).val(myString);
}
function addonLimit(cnt, childId, parentId) {
var myAddonQty = 0;
var quantity = $('#myMenuQty').val();
cnt = cnt * quantity;
var checked_quan = 0;
$('input.single-checkbox_' + parentId).each(function () {
if ($(this).is(':checked') == true) {
checked_quan = checked_quan + 1;
var addonId = $(this).attr('data-addon-id');
myAddonQty = myAddonQty + parseInt($('#addon-qty-' + addonId).html());
}
});
if (checked_quan > cnt || myAddonQty > cnt) {
$("#advacce_menu_" + childId).attr('checked', false);
}
}
function resetAddon(myThis) {
var quantity = $(myThis).val();
var oldQuantity = $(myThis).attr('data-old-qty');
$(myThis).attr('data-old-qty', quantity);
$('.commonChooseUpto').each(function () {
var oldUpto = parseInt($(this).attr('data-old-count'));
var newUpto = oldUpto * quantity;
$(this).html(newUpto);
})
if (oldQuantity > quantity) {
$('.commonCheckbox').attr('checked', false);
$('.commonAddonQuantity').html('1');
$('.commonMyAddonList').val('');
}
}
function addOrder() {
url = '<?php echo base_url(); ?>createorderfrontend/addOrder';
$('#cartLoader').show();
$.ajax({
url: url,
type: 'POST',
data: $('#addOrderForm').serialize(),
success: function (data) {
obj = JSON.parse(data);
$('#cartDetailsWrap').html(obj['myHtml']);
$('#cartSubtotal').html(obj['subtotal']);
$('#cartGrandtotal').html(obj['subtotalWithTaxWithDelCharge']);
$('#subtotal').val(obj['subtotal']);
$('#taxAmount').val(obj['taxAmount']);
$('#subtotalWithTax').val(obj['subtotalWithTax']);
$('#deliveryCharge').val(obj['deliveryCharge']);
$('#subtotalWithTaxWithDelCharge').val(obj['subtotalWithTaxWithDelCharge']);
//console.log(data);
$('#cartLoader').hide();
swal('', '<?php echo $this->lang->line('cart_add_successfully');?>', 'success');
}
})
$("#myModal").modal("hide");
}
function editOrder(rowid, menu_id) {
$('#myLoader').show();
url = '<?php echo base_url(); ?>createorderfrontend/showEditItemDetails';
$.ajax({
url: url,
type: 'POST',
data: {rowid: rowid, id: menu_id, csrf_token_apm: myCsrfHash},
success: function (data) {
$('#myLoader').hide();
$("#menuDetailsWrap").html(data);
$('#myModal').modal("show");
},
error: function (data) {
$('#myLoader').hide();
console.log(data);
}
})
}
function deleteFromCart(rowid) {
//$('#row_'+rowid).fadeOut();
url = '<?php echo base_url(); ?>createorderfrontend/deleteFromCart';
$('#cartLoader').show();
$.ajax({
url: url,
type: 'POST',
data: {rowid: rowid, csrf_token_apm: myCsrfHash},
success: function (data) {
obj = JSON.parse(data);
$('#cartDetailsWrap').html(obj['myHtml']);
$('#cartSubtotal').html(obj['subtotal']);
$('#cartGrandtotal').html(obj['subtotalWithTaxWithDelCharge']);
$('#subtotal').val(obj['subtotal']);
$('#taxAmount').val(obj['taxAmount']);
$('#subtotalWithTax').val(obj['subtotalWithTax']);
$('#deliveryCharge').val(obj['deliveryCharge']);
$('#subtotalWithTaxWithDelCharge').val(obj['subtotalWithTaxWithDelCharge']);
$('#cartLoader').hide();
swal('', '<?php echo $this->lang->line('deleted_from_cart');?>', 'success');
}
})
}
function changeCount(rowid, reason) {
var nowCount = $('#count_' + rowid).html();
var nextCount = parseInt(nowCount);
if (reason == 'd' && nextCount > 1) {
nextCount = nextCount - 1;
}
else if (reason == 'i') {
nextCount = nextCount + 1;
}
$('#count_' + rowid).html(nextCount);
url = '<?php echo base_url(); ?>createorderfrontend/updateCartCount';
$.ajax({
url: url,
type: 'POST',
data: {rowid: rowid, qty: nextCount, csrf_token_apm: myCsrfHash},
success: function (data) {
obj = JSON.parse(data);
$('#cartDetailsWrap').html(obj['myHtml']);
$('#cartSubtotal').html(obj['subtotal']);
$('#cartGrandtotal').html(obj['subtotalWithTaxWithDelCharge']);
$('#subtotal').val(obj['subtotal']);
$('#taxAmount').val(obj['taxAmount']);
$('#subtotalWithTax').val(obj['subtotalWithTax']);
$('#deliveryCharge').val(obj['deliveryCharge']);
$('#subtotalWithTaxWithDelCharge').val(obj['subtotalWithTaxWithDelCharge']);
}
})
}
function ShowDetails(my_id) {
if (my_id === undefined) {
my_id = 0;
}
$('#myLoader').show();
url = '<?php echo base_url(); ?>createorderfrontend/showItemDetails';
$.ajax({
url: url,
type: 'POST',
data: {id: my_id, csrf_token_apm: myCsrfHash},
success: function (data) {
$('#myLoader').hide();
$("#menuDetailsWrap").html(data);
$('#myModal').modal("show");
},
error: function (data) {
$('#myLoader').hide();
console.log(data);
}
})
}
function changeOrderType(myThis) {
$('#myLoader').show();
url = '<?php echo base_url(); ?>createorderfrontend/changeOrderType';
$.ajax({
url: url,
type: 'POST',
data: {orderType: $(myThis).attr('data-type'), csrf_token_apm: myCsrfHash},
success: function (data) {
obj = JSON.parse(data);
$('#cartDetailsWrap').html(obj['myHtml']);
$('#cartSubtotal').html(obj['subtotal']);
$('#cartGrandtotal').html(obj['subtotalWithTaxWithDelCharge']);
$('#subtotal').val(obj['subtotal']);
$('#taxAmount').val(obj['taxAmount']);
$('#subtotalWithTax').val(obj['subtotalWithTax']);
$('#deliveryCharge').val(obj['deliveryCharge']);
$('#subtotalWithTaxWithDelCharge').val(obj['subtotalWithTaxWithDelCharge']);
$('#myLoader').hide();
},
error: function (data) {
$('#myLoader').hide();
console.log(data);
}
})
}
function goTo(destiny) {
var top_gap = $('.navbar.navbar-fixed-top.open').height();
//alert(top_gap);
$('html, body').animate({
scrollTop: $(destiny).offset().top - (100 + top_gap)
}, 500);
}
function show_gmap() {
setTimeout(function () {
initialize_map();
}, 1000);
}
</script>
<style type="text/css">
.mct30 {
margin-top: 30px;
}
.cartItemAddon {
font-size: 10px;
}
.addonSingleWrap i {
color: #54B67A;
}
.cartItemRow {
border-bottom: 1px dashed #D2D2D2;
}
#myFloatingCart, .vendor-menu__categories {
transition: all 0.5s ease-in-out;
}
.cart__header__head {
background-color: #FFF;
margin-top: 40px;
}
.midAlign * {
vertical-align: middle;
margin: 0px !important;
}
.midAlign label {
vertical-align: middle;
margin-right: 5px !important;
}
</style>