PHP 7.4.33
Preview: food-store.php Size: 64.12 KB
//home/justbyquicklly-old/public_html/food-store.php

<?php
    include("include/config.php");
    include("include/functions.php");
//zip_redirect_outside_us($_COOKIE['postalcode']);
    // Check zipcode
    
    
	$zip="78691";
	setcookie('postalcode', $zip, time()+(86400 * 30 * 12), "/");
    // Set zipcode
//	$_REQUEST['store_slug'] = parseField($_REQUEST['store_slug']);
//	$_REQUEST['cat_slug'] = parseField($_REQUEST['cat_slug']);
    if(isset($_POST['submitzip']) && $_POST['submitzip']=='Submit'){
        $zip=mysqli_real_escape_string($GLOBALS['conn'], $_POST['zip']);
		zip_redirect_outside_us($zip);
       	$zipstore=callAPI('POST', WEBAPI_URL_NEW.'Food-Landing-Page-Zipcode',array("zipcode"=>$zip,'section_id'=>3));
    $record = count($zipstore->lstzipdata);

        if($record>0){
             foreach($zipstore->lstzipdata as $ziprec){}
            //$zipstorearray=array();

            //while($resultzip=$obj->fetchNextObject($zipstore))
            //    array_push($zipstorearray,$resultzip->zips);

            //$zipstorearray=implode(',', $zipstorearray);
            
            setcookie('postalcode', $zip, time()+(86400 * 30 * 12), "/"); // 86400 = 1 day
            // zip_redirect_food($ziprec->city, $ziprec->state);
            //header("Location:/indian-food-delivery/chicago-il");
                         setcookie('url', buildURL($ziprec->city) . ',' . buildURL($ziprec->state), time() + (86400 * 30 * 12), "/");
        
          header("Location:" . SITE_URL . "order-food-online/" . buildURL($ziprec->city) . "-" . buildURL($ziprec->state)."/".$_REQUEST['store_slug']);
            exit;
        }else{ 
            setcookie('postalcode', $zip, time()+(86400 * 30 * 12), "/"); // 86400 = 1 day
            //zip_redirect_food($ziprec->city, $ziprec->state);
		
		header("Location:" . SITE_URL . "meal-kit-stores");
            exit;   
        }
    }
    
    //Dyamic Locaton based URL
    if($_COOKIE['url']!=''){
	$urlarr=explode(',',$_COOKIE['url']);
	$url=$urlarr[0].'-'.$urlarr[1];
	}else{
	$url='';
	}
    
    // Get store data
   
   $store_slug='subham-chettinad-grill-indian-restaurant';
    $zip="78691";
   //$store_slug="hyderabad-house";
  // $zip="60610";
	$StoreResult=callAPI('POST', WEBAPI_URL_NEW.'Food-Store-Data',array("zipcode"=>$zip,'slug'=>$store_slug));
    $Count = count($StoreResult->lststore);

    if($Count > 0){
      
      foreach($StoreResult->lststore as $StoreData){}
         }else{

	$nearurl='';
	$zipcity=getFieldWhere('city','tbl_store_zip','zip',$_COOKIE["postalcode"]);
	$zipstate=getFieldWhere('state','tbl_store_zip','zip',$_COOKIE["postalcode"]);
	if($zipcity!='' && $zipstate!=''){
//	$nearurl='/near-me-in-'.buildURL($zipcity).'-'.buildURL($zipstate);
	}
      //  header("location:".SITE_URL.'indian-food-delivery'.$nearurl); 
}

$food_delivery_slots = (!empty($StoreData->food_delivery_slots) ? $StoreData->food_delivery_slots : '');

    $flgTodaySlotAvailable = true;

    // Check for Chicago
   /* $flgIsCalifornia = false;
    if($StoreData->state == 'CA')
        $flgIsCalifornia = true;*/

    //CODE TO GET STORE TIME SLOT USING API
		$storeInfo = array();
		$paramArr['sid'] = $StoreData->storeid;
		$paramArr['section'] = 'food';
		$paramArr['data'] = 'free';
		$requestParam[] = $paramArr;
		


		$payload = array("apiKey"=> API_KEY, "callFrom"=>"WEBSITE", 
				"zipcode"=>$zip, "lstStoreSection"=> $requestParam);
		//echo json_encode($payload);				

		$storeDetails = callStoreAPI('POST', API_URL.'/common/get-delivery-info', $payload);
		
		
		$storeAPIData = json_decode($storeDetails);
	

		$storeDateArr = $storeAPIData->lstDeliveryDates[0]; 		
		$isStoreOpen = $storeDateArr->isStoreOpen; 
		$storeDateTimeArr = $storeDateArr->lstDateTime; 

		$dateArr = array();
		foreach($storeDateTimeArr as $storeDates)
            {
			$dateArr[$storeDates->value]['date'] = $storeDates->value;
			$dateArr[$storeDates->value]['date_display'] = $storeDates->display;
			$dateArr[$storeDates->value]['available'] = $storeDates->available;
			$dateArr[$storeDates->value]['DeliveryTimes'] = $storeDates->lstDeliveryTimes;
        }

                $flagDayCheck = true;
                $flgPreorder = true;
		$sixty_to_ninty_mints = false;
		if($isStoreOpen == 1){
            $flagDayCheck = false;
			 $flgPreorder = false;
			 if($StoreData->food_delivery_partner != 'MYVALUE365')
            {
				 $sixty_to_ninty_mints = true;
        }
    
    }

//for SEO
$storeid = $StoreData->storeid;
?>

<!DOCTYPE html>
<html lang="en-us">
    <title>Subham Chettinad Grill :: Stores</title>
     <meta charset="utf-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
         
    <?php
    $eplStrAddrs = explode(',', $StoreData->storeaddress);
    $streetAddress = $eplStrAddrs[0];
    $addressLocality = $eplStrAddrs[1];
    $StorePostalcode = end(explode(' ', end($eplStrAddrs)));
    ?>
    <head>
        <?php //include("metas.php"); ?>
        <?php include("css.php"); ?>
        <?php// include("common-head.php"); ?>
        <style>
             html, body {
    max-width: 100%;
    overflow-x: hidden;
}
        </style>
    </head>

<body>
    <?php include("header.php"); ?>
    <?php include("cart.php"); ?>
    <div id="prod-loader" > <div  class="ajax-loader"></div></div>

    <script>
        //$("#prod-loader").show();
    </script>
    <div id="searchhide"></div>
        <div class="clsFoodStoreBanner">
            <?php if($StoreData->banner_1600x250){ ?>
                <img src="https://www.quicklly.com/images/store/1600x250/<?php echo $StoreData->banner_1600x250; ?>" alt="" />
            <?php } else { ?>
                <img src="images/food/default_banner.png" alt="" />
            <?php } ?>

            <div class="clsDetails clsPgWidth">
                 <h2 class="food-heading"><?php echo $StoreData->storename ?></h2>
                <p><?php echo $StoreData->storeaddress ?></p>
            </div>
        </div>
<div class="clsPgWidth clsBreadcrumb">
<ul>
<li><a href="<?php echo SITE_URL; ?>">Home</a></li>
<li><h1><?php echo ucwords(strtolower($StoreData->storename)); ?></h1></li>
</ul>

</div>
        <input type="hidden" id="hdnStoreID" value="<?php echo $StoreData->storeid ?>">
        <input type="hidden" id="hdnStoreName" value="<?php echo $StoreData->storename ?>">
        <?php if($StoreData->photo == ' ' ) { ?>
        
        <input type="hidden" id="hdnStoreImg" value="https://www.quicklly.com/seller/upload_images/store/thumb/<?php echo $StoreData->photo ?>">
        
        <?php } else { ?>
        
                <input type="hidden" id="hdnStoreImg" value="https://www.quicklly.com/seller/upload_images/store/thumb/1703228062-subham-chettinad-grill-authentic-indian-cuisine.jpeg">
            <?php } ?>
        <input type="hidden" id="hdnStoreMin" value="<?php echo $StoreData->minimum_fee ?>">
        <input type="hidden" id="hdnStoreMinOrder" value="<?php echo $StoreData->minimum ?>">
        <input type="hidden" id="hdnStoreDelvPartner" value="<?php echo $StoreData->food_delivery_partner ?>">
        <input type="hidden" id="hdnPreOrder" value="<?php echo $flgPreorder ?>">
        <input type="hidden" id="hdnCurrSysDate" value="<?php echo (new DateTime())->format('Y-m-d'); ?>">
        <input type="hidden" id="hdnCurrSysDateTime" value="<?php echo (new DateTime())->format('Y-m-d H:i:s'); ?>">
        <input type="hidden" id="hdStoreDateTime" value='<?php echo json_encode($dateArr); ?>'>
		<input type="hidden" id="hdnsectionid" value="3">
      

            <div class="clsFoodStoreCat clsFoodStoreSingleCat clsGroceryCats clsPgWidth">
                <div class="clsSliderCats">
                     <a id="cat-0"
                    <?php $url = "order-food-online" . (($url != '') ? '/' . $url : '' ) . "/" . $_REQUEST['store_slug'] ?>
                           onclick="fetchallcat()"
                        href="javascript:void(0)"  >

                        <img src="images/food/category/all_menu.png" alt="" />
                        <span>All</span>
                    </a>

                <?php
                
                  
               $CatArr=callAPI('POST', WEBAPI_URL_NEW.'Food-Store-Category',array("zipcode"=>$_COOKIE["postalcode"],'storeid'=>$StoreData->storeid));
 
                    foreach ($CatArr->lstcat as $key=> $cat) {
                        
                        ?>
                        <a id="cat-<?=$key+1?>"
                        <?php $url = "order-food-online" . (($url != '') ? '/' . $url : '' ) . "/" . $_REQUEST['store_slug'] . '/' . $cat->slug ?>

                            onclick="changeState('<?php echo $url; ?>', '<?php echo $cat->slug ?>', '<?php echo $StoreData->storeid ?>', this  , 'cat-<?=$key+1?>');"
                            href="javascript:void(0)"  >

                            <?php if ($cat->photo) { ?>
                                <img src="images/img-lazy.jpg" data-src="https://quicklly.com/upload_images/category/<?php echo $cat->photo; ?>" alt="" class="lazyload" />
                            <?php } else { ?>
                                <img src="images/img-lazy.jpg" data-src="images/no-img.jpg" alt=""  class="lazyload"/>
                            <?php } ?>
                            <span><?php echo $cat->maincategory; ?> </span>
                        </a>
                    <?php } ?>
                </div>
            </div>

            <?php 
                // Food popup discount
                $popup_discount_line = '';
                $discountPerc = '0';

                if($_COOKIE['fspd'] == '1'){
                    // Get food popup discount data
                    $discountPerc = getFieldWhere('food_popup_discount', 'tbl_setting', 'id', '1');

                    if($discountPerc != '0')
                        $popup_discount_line = '<span class="clsFSP_Discount_Line">EXTRA ' . $discountPerc . '% DISCOUNT APPLIED</span>';
                }

                $sixty_to_ninty_mints = false;
                if ($StoreData->food_delivery_partner == 'MYVALUE365') { ?>
                <div class="clsFoodPreorder">
                    <p>Delivery Time <a href="javascript:void(0);" id="selectDateTimeSlot" class="clsBtn" onClick="openDateTimeDialog();">Select Slot</a>
                    <?php echo $popup_discount_line ?></p>
                    <input type="hidden" name="hdnDeliveryFromTime" id="hdnDeliveryFromTime" value="">
                    <input type="hidden" name="hdnDeliveryToTime" id="hdnDeliveryToTime" value="">
                </div>
            <?php } else if (($flgPreorder == '1') && ($flagDayCheck == '0')) { ?>       
                <div class="clsFoodPreorder">
                    <p>
                        <span>Closed.</span>Next Delivery at <?php echo date("g:i a", strtotime($StoreData->open_time)) ?>.
                        <a href="javascript:void(0);" id="selectDateTimeSlot"  class="clsBtn" onClick="openDateTimeDialog();">Preorder</a>
                        <?php echo $popup_discount_line ?>
                    </p>
                    <input type="hidden" name="hdnDeliveryFromTime" id="hdnDeliveryFromTime" value="">
                    <input type="hidden" name="hdnDeliveryToTime" id="hdnDeliveryToTime" value="">
                </div>
            <?php } else if ($flagDayCheck) { ?>                    
                <div class="clsFoodPreorder">
                    <p>
                        <span>Closed.</span>
                        <a href="javascript:void(0);" id="selectDateTimeSlot"  class="clsBtn" onClick="openDateTimeDialog();">Preorder</a>
                        <?php echo $popup_discount_line ?>
                    </p>
                    
                    <input type="hidden" name="hdnDeliveryFromTime" id="hdnDeliveryFromTime" value="">
                    <input type="hidden" name="hdnDeliveryToTime" id="hdnDeliveryToTime" value="">
                </div>
            <?php } else { ?>
                <div class="clsFoodPreorder">
                    <p>
                        <b style='color:#000;' class="food-time-selection-asap">ASAP (60-90 mins) </b>
                        <a href="javascript:void(0);" class="clsBtn" onClick="openDateTimeDialog();">Schedule Later</a> 
                        <?php echo $popup_discount_line ?>
                    </p>
                    <input type="hidden" name="hdnDeliveryFromTime" id="hdnDeliveryFromTime" value="">
                    <input type="hidden" name="hdnDeliveryToTime" id="hdnDeliveryToTime" value="">
                </div>
            <?php 
                $sixty_to_ninty_mints = true;

                } ?>

            <div class="clsFoodStore">
                <div class="clsContent clsPgWidth">
                    <?php if ($StoreData->banner_1200x300) { ?>
                        <img src="https://quicklly.com/images/store/1200x300/<?php echo $StoreData->banner_1200x300; ?>" alt="" />
                    <?php } else { ?>
                        <img src="images/food/store_wide_image.png" alt="" />
                    <?php } ?>

                <div id="load_data" class="clsFoodProds clsFoodProdsWrappr">
                    <?php 
                        $BannerImgArr = array();
                       
$BannerArr=callAPI('POST', WEBAPI_URL_NEW.'Food-Banner',array("zipcode"=>$_COOKIE["postalcode"],'storeid'=>$StoreData->storeid));
 
                        foreach($BannerArr->lstimg as $banner) {
                            if($banner->photo!='')
                                array_push($BannerImgArr, '/https://quicklly.com/upload_images/bigsquarebanner/'.$banner->photo);
                        }

                        
               ?>
                            
                        </div>
                        </div>
                    </div>
                </div>
                </div>
                <div id="load_data_message"></div>
                <div id="prod-loader" > <div  class="ajax-loader"></div>
               
            </div>

            <div class="clsDialog" id="dvDialog-Custom">
                <div class="clsDialog-Box clsFoodCustomDialog">
                    <a href="javascript:void(0);" class="clsClose" onClick="closeDialog('dvDialog-Custom');" title="Close"></a>

                    <div class="clsContent">
                        <img id="imgProdImg" src="/images/no-img-wide.jpg" alt="">

                        <div class="clsContentMain">
                            <h4 id="lblProdTitle">Paneer Katti Roll</h4>
                            <span id="lblProdPrice" class="clsPrice">$9.99</span>
                            <del class="strike-price" id="lblProdMRP" style="font-size:13px;"></del>
                            <p id="lblProdDesp" class="clsProdDesp">Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>

                            <span class="clsProdQty">
                                Qty:
                                <select id="ddlProdQty">
                                    <option value="1">1</option>
                                    <option value="2">2</option>
                                    <option value="3">3</option>
                                    <option value="4">4</option>
                                    <option value="5">5</option>
                                    <option value="6">6</option>
                                    <option value="7">7</option>
                                    <option value="8">8</option>
                                    <option value="9">9</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                </select>
                            </span>

                            <h5 class="jsCustomize-title">Customize:</h5>
                            <div class="clsCustomize"></div>

                            <h5 class="jsAddOns-title">Add Ons (Can choose multiple):</h5>
                            <div class="clsAddOns"></div>
                        </div>
                    </div>
                    <div class="clsFooter">
                        <a href="javascript:void(0);" onClick="addToCartPopUp();" class="clsBtn">Add to Cart</a>
                    </div>

                    <input type="hidden" id="hdnPID" value="0">
                    <input type="hidden" id="hdnPName" value="">
                    <input type="hidden" id="hdnPPrice" value="">
                    <input type="hidden" id="hdnPMRP" value="">
                    <input type="hidden" id="hdnPTax" value="">
                    <input type="hidden" id="hdnPPhoto" value="">
                    <input type="hidden" id="hdnAddOnJson" value="">
                </div>
            </div>

            <div class="clsDialog" id="dvDialog-DateTime" data-save="0">
                <div class="clsDialog-Box clsCateringDateTimeDialog">
                    <a href="javascript:void(0);" class="clsClose" onClick="closeDialog('dvDialog-DateTime');" title="Close"></a>

                    <div class="clsContent">
                        <h4>When you want your delivery?</h4>

                        <?php // if ($flgPreorder) { ?>
                            <h5 id="slectDt">Select Date:</h5>
                            <select id='ddlDeliveryDate' onchange='deliveryDateChange();'>
                                <?php
                                $date_available = date('Y-m-d');      
                                $chk_date = 0;                       
                                foreach($dateArr as $key=>$value)
                                {
																	if($value['available'] == 1 && $chk_date == 0){
																		$date_available = $value['date'];  
																		$chk_date = 1; 
                                    }
																	$disabled = ($value['available'] == 1 ? '' : 'disabled');
																	echo "<option class='optionsForDays' data-dayforTimecheck='" . strtolower(date("l", strtotime($value['date']))) . "-optChck' $disabled value='" . $value['date'] . "'>" . $value['date_display'] . "</option>";
                                }

                                ?>
                            </select>

                            <br><br>
                            <?php
                            
                            if ($flgPreorder) {
                            	$currentTime = new DateTime();
                            ?>
                            <input type="hidden" name="hdnDeliveryDate" id="hdnDeliveryDate" value="">
                        <?php  } else { 
                            $currentTime = new DateTime(); 
                            $currentTime->modify('+90 mins');
                            ?>
                             <input type="hidden" name="hdnCurrentTime" id="hdnCurrentTime" value="<?php echo $currentTime->format('Y-m-d H:i:s');?>">

                            <input type="hidden" name="hdnDeliveryDate" id="hdnDeliveryDate" value="<?php echo date("Y-m-d") ?>">
                        <?php }  /**/ ?>
                             <input type="hidden" name="hdnSelectionCurrentTime" id="hdnSelectionCurrentTime" value="<?php echo $currentTime->format('Y-m-d H:i:s');?>">
                        <?php

													$timeArr = $dateArr[$date_available]['DeliveryTimes'];
													$nextday = strtolower(date('l', strtotime($date_available)));
                        if ($StoreData->food_delivery_partner == 'MYVALUE365') {
                            echo "<h5>Select Slot:</h5>";
													} 
													else{
                            echo "<h5>Select Time:</h5>";
													}
                            echo "<select id='ddlDeliveryTime'>";
                           
															if($sixty_to_ninty_mints){
																echo "<option class='" . $nextday . "-optChck allDisplayTimeforAllDays' value='ASAP (60-90 mins)'>ASAP (60-90 mins)</option>";
                            }
															foreach($timeArr as $times)
															{
															    
															echo "<option class='" . $nextday . "-optChck allDisplayTimeforAllDays' value='" . $times->value . "'>" . $times->display . "</option>";
                            }
                            echo "</select>";

                        ?>
                    </div>
                    <div class="clsFooter">
                        <a href="javascript:void(0);" onClick="selectDelivery();" class="clsBtn">Submit</a>
                    </div>
                </div>
            </div>

            <div class="clsTemplate">
                <ul id="tempCustom">
                    <li><label><input type="radio" value="[VALUE]" name="[GROUP]"/>[NAME]</label></li>
                </ul>
                <div id="tempAddOn">
                    <div class="clsExtraProd">
                        <img src="images/quicly-logo-black.png" alt="[ALT_TITLE]" />
                        <div class="clsDetails">
                            <p class="clsProdTitle">[TITLE]</p>
                            <span class="clsSize">[SIZE]</span>
                            <span class="clsPrice">[PRICE][MRP]</span>
                            <a href="javascript:void(0);" onClick="addAddOn(this);" class="clsProdAdd"
                               data-pid="[ID]" data-name="[TITLE2]" data-price="[PRICE2]" data-mrp="[MRP2]"
                               data-tax="[TAX]" data-photo="[IMG2]">ADD</a>
                        </div>
                    </div>
                </div>
                <div id="tempQty">
                    <span class="clsQty">
                        Qty:
                        <select onChange="ddlAddOnQty_onChange(this);">
                            <option value="0">0</option>
                            <option value="1" selected>1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6">6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                            <option value="13">13</option>
                            <option value="14">14</option>
                            <option value="15">15</option>
                            <option value="16">16</option>
                            <option value="17">17</option>
                            <option value="18">18</option>
                            <option value="19">19</option>
                            <option value="20">20</option>
                        </select>
                    </span>
                </div>
                <?php
                /*if ($StoreData->food_delivery_partner == 'MYVALUE365') {
                    
                    if($food_delivery_slots != '')
                    {
										  $DeliverySlot = $obj->query("   SELECT  id, bookingslot, open_time, close_time, cut_off_time
                                                    FROM    tbl_bookingslot where id in ($food_delivery_slots)
                      ORDER BY open_time");
                      }
                    else{  
                    $DeliverySlot = $obj->query("   SELECT  id, bookingslot, open_time, close_time, cut_off_time
                                                    FROM    tbl_bookingslot 
                                                    ORDER BY open_time");
                    }

                    echo '<select id="tempCurrDayTimes">';
                    $CurrDttm = new DateTime();
                    while ($slot = $obj->fetchNextObject($DeliverySlot)) {
                        $SlotCloseDateTime = new DateTime();
                        $SlotCloseDateTime->setTimestamp(strtotime($slot->cut_off_time));

                        if ($SlotCloseDateTime > $CurrDttm) {
                            $disabled = "";
                            if( strtolower($zip_area) == 'suburb' && $slot->id != '4'){
                                $disabled = " disabled ";
                            }
                            echo "<option value='" . $slot->open_time . "-" .
                            $slot->close_time . "' $disabled >" . $slot->bookingslot . "</option>";
                        } else {
                            echo "<option value='" . $slot->open_time . "-" .
                            $slot->close_time . "' disabled>" . $slot->bookingslot . "</option>";
                        }
                    }
                    echo '</select>';

                    mysqli_data_seek($DeliverySlot, 0);

                    echo '<select id="tempFutureDayTimes">';
                    while ($slot = $obj->fetchNextObject($DeliverySlot)) {
                        $disabled = "";
                            if( strtolower($zip_area) == 'suburb' && $slot->id != '4'){
                                $disabled = " disabled ";
                            }
                        echo "<option value='" . $slot->open_time . "-" .
                        $slot->close_time . "' $disabled >" . $slot->bookingslot . "</option>";
                    }
                    echo '</select>';
                }*/
                ?>
            </div>                    
            <input type="hidden" name="cat_slug" id="cat_slug" value="" >
<style>
@media only screen  and (min-width: 768px) {	
.dynm-content{
    margin-top: 20px !important;	
}
}

</style>            
           
<div style="padding:25px 25px 25px 25px ;">
 
  </div>
            
 
            
            
            <?php
            include("footer.php");
            include("js.php");
            ?>
            
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js" type="text/javascript"></script>
    <!-- <script src="/plugin/jquery-3.1.0.min.js" type="text/javascript"></script> -->
    <!-- <script src="/plugin/slick_1.8.1/slick.min.js" type="text/javascript"></script> -->
<script>
     $(document).ready(function(){
            $('#cat-1').trigger('click'); 
            });
</script>
            <script type="text/javascript">
                $("#prod-loader").hide();
            lazyload();
                var show_loader = true;
                var action = 'inactive';
                var limit = 7;
                var start = 7;
                var image_limit = 1;
                var image_start = 1;
                var cat_slug = '';
                var show_loader = true;
                var cat_array = <?php echo json_encode($catgNameSlugArr );?>;
                var storeid = '<?php echo $storeid ?>';
                var sixty_to_ninty_mints = <?php echo ($sixty_to_ninty_mints)?'true':'false'; ?>;
                function changeState(url, cat_slug, store_id, obj , cat_id) {
                    
                       $('.lazyload').css("box-shadow", "none");
                    $('#'+cat_id+ '> img').css("box-shadow", "rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px");

                    if(cat_slug === ''){ 
                        $('#load_data').empty();
                        $("#prod-loader").show();
                        show_loader = true;
                        $.each(cat_array, function(key,catslug) {  
                            $('#cat_slug').val(catslug);
                            load_food_data(limit, start, storeid, image_limit, image_start);
                        });
                     
                     } else {
                        $("#cat_slug").val(cat_slug);
                        $("#prod-loader").show();

                        $('#load_data').empty();
                        //$('#product-area').append("<div id='load_data' ></div>");
                        limit = 7;
                        start = 0;
                        image_limit = 1;
                        image_start = 0;
                        action = 'active';
                        $("#prod-loader").show();
                        show_loader = true;
                        load_food_data(limit, start, store_id, image_limit, image_start);
                     }
                   
                    

                }
                function load_food_data(limit, start, store_id, image_limit, image_start)
                {
                    var cat_slug = $("#cat_slug").val();
                    // if (cat_slug == ''){
                    //     cat_slug = catSlug;
                    // }
                    // if($('.CatCntr').length){
                    //     var catCntrPos = $('.CatCntr').length;
                    //     var catCntrNxt = catCntrPos +1;
                    //     console.log(cat_array);
                    //     console.log(catCntrPos);
                    //     console.log(catCntrNxt);
                    //     console.log(cat_array[catCntrPos]);
                    //     if(cat_array[catCntrPos]){
                    //         $('#cat_slug').val(cat_array[catCntrPos]);
                    //         cat_slug = cat_array[catCntrPos];
                    //     }
                    // }
                    $.ajax({
                        url: "ajax-cat-food.php",
                        method: "POST",
                        data: {limit: limit, start: start, cat_slug: cat_slug, store_id: store_id, image_start: image_start, image_limit: image_limit},
                        cache: false,
                        success: function (data)
                        {
                            $("#prod-loader").hide();

                            if (data == 'false')
                            {
                                action = 'active';
                            } else
                            {
                                $('#load_data').append(data);
                                action = "inactive";
                                lazyload();
                            }
                        }
                    });
                }
                window.addEventListener('scroll', setPreOrderStrip);

                $('.clsGroceryCats .clsSliderCats').slick({
                    infinite: false,
                    slidesToShow: 6,
                    slidesToScroll: 1,
                    autoplay: false,
                    arrows: true,
                    prevArrow: '<i class="left">&#x2039;</i>',
                    nextArrow: '<i class="right">&#x203A;</i>',
                    centerMode: false,
                    dots: false,
                    responsive: [
                        {
                            breakpoint: 1050,
                            settings: {
                                slidesToShow: 5
                            }
                        },
                        {
                            breakpoint: 700,
                            settings: {
                                slidesToShow: 4
                            }
                        },
                        {
                            breakpoint: 550,
                            settings: {
                                slidesToShow: 3
                            }
                        },
                        {
                            breakpoint: 400,
                            settings: {
                                slidesToShow: 2
                            }
                        }
                    ]
                });

                function openDateTimeDialog() {
                    if ($('#hdnStoreDelvPartner').val() == 'MYVALUE365') {
                        var flgToday = true;

                        if ($('#ddlDeliveryDate').length > 0) {
                            if ($('#ddlDeliveryDate').val() != $('#hdnCurrSysDate').val())
                                flgToday = false;
                        }

                        if (flgToday)
                            $('#ddlDeliveryTime').html($('#tempCurrDayTimes').html());

                        else
                            $('#ddlDeliveryTime').html($('#tempFutureDayTimes').html());
                    }

                    openDialog('dvDialog-DateTime');
                    var food_store = window.localStorage.getItem('food_store');
                   
                    if (food_store != null && food_store != ''){
                        var store_info = JSON.parse(food_store);
                        
                        var store = searchStore(storeid, store_info);
                        if(store){
                            $('#ddlDeliveryDate').val(store.DeliveryDate);
                           $('#hdnDeliveryFromTime').val(store.DeliveryFromTime);
                           $('#hdnDeliveryToTime').val(store.DeliveryToTime);
                           //$('#ddlDeliveryTime').val(String(store.DeliveryFromTime+'-'+store.DeliveryToTime)).change();
                           var deliveryFromTo = String(store.DeliveryFromTime+'-'+store.DeliveryToTime);
                           deliveryFromTo = deliveryFromTo.toString()
                           $("#ddlDeliveryTime option[value='" + deliveryFromTo +"']").prop("selected", true);
                        }
                    }
                }


                function deliveryDateChange() {

										var storeid = $("#hdnStoreID").val();
										var storeData = $("#hdStoreDateTime").val();
										var selectedDate = $('#ddlDeliveryDate').val();
										var delvPartner = $('#hdnStoreDelvPartner').val();
										var preOrder = $('#hdnPreOrder').val();
										$('.clsPgLoader').show();
										$("#ddlDeliveryTime").html('');
																				
										$.ajax({
												url: "ajax-datetimes.php",
												data: {sid: storeid , cDate :selectedDate, storeData: storeData, delvPartner : delvPartner, preOrder : preOrder, section : 'food'},
												type: "POST",
												success: function (data) {
														$("#ddlDeliveryTime").html(data);		
														$('.clsPgLoader').hide();						
												},
												error: function (jqXHR, exception) {
														var msg = '';

														if (jqXHR.status === 0) {
																msg = 'Not connect.\n Verify Network.';
														} else if (jqXHR.status == 404) {
																msg = 'Requested page not found. [404]';
														} else if (jqXHR.status == 500) {
																msg = 'Internal Server Error [500].';
														} else if (exception === 'parsererror') {
																msg = 'Requested JSON parse failed.';
														} else if (exception === 'timeout') {
																msg = 'Time out error.';
														} else if (exception === 'abort') {
																msg = 'Ajax request aborted.';
														} else {
																msg = 'Uncaught Error.\n' + jqXHR.responseText;
														}
														console.log(msg);
														$('.clsPgLoader').hide();	
												}
										});                  
                }


                function deliveryDateChange_bk() {
                    if(sixty_to_ninty_mints){
                         if ($('#ddlDeliveryDate').val() == $('#hdnCurrSysDate').val()){
                        $('#ddlDeliveryTime').html($('#tempCurrDayTimes').html());
                            $("#ddlDeliveryTime option[value='ASAP (60-90 mins)']").prop("disabled", false);
                            $("#ddlDeliveryTime option").each(function()
                             { 
                                // Add $(this).val() to your list
                                var val = $(this).val();
                                var timeVal =val.split('-');
                                var selDateTime = $('#ddlDeliveryDate').val()+ " "+timeVal[0];
                                if (new Date(selDateTime) < new Date( $("#hdnCurrentTime").val())) {
                                     $(this).remove();
                                }
                             });
                        } else {
                             $('#ddlDeliveryTime').html($('#tempFutureDayTimes').html());                             
                        }
                       
                    }else{
                        if ($('#ddlDeliveryDate').val() == $('#hdnCurrSysDate').val()){
                            $('#ddlDeliveryTime').html($('#tempCurrDayTimes').html());
                         } else {
                        $('#ddlDeliveryTime').html($('#tempFutureDayTimes').html());
                }
                    }  
                       
                }

                function selectDelivery() {
                    if ($('#hdnPreOrder').val() == '1')
                        $('#hdnDeliveryDate').val($('#ddlDeliveryDate').val());

                    if ($('#ddlDeliveryTime').val().trim() != '' && $('#ddlDeliveryTime').val() != 'ASAP (60-90 mins)') {
                        $('#hdnDeliveryFromTime').val($('#ddlDeliveryTime').val().split('-')[0]);
                        $('#hdnDeliveryToTime').val($('#ddlDeliveryTime').val().split('-')[1]);
                    } else if ($('#ddlDeliveryTime').val().trim() != '' && $('#ddlDeliveryTime').val() == 'ASAP (60-90 mins)') {
                        $('#hdnDeliveryFromTime').val("");
                        $('#hdnDeliveryToTime').val("ASAP (60-90 mins)");
                    } else {
                        $('#hdnDeliveryFromTime').val('');
                        $('#hdnDeliveryToTime').val('');
                    }
                    var currentTime = $("#hdnSelectionCurrentTime").val();
                    
                    var food_store = window.localStorage.getItem('food_store');
                    var storeDetail = [];
                    if (food_store != null && food_store != ''){
                        food_store = JSON.parse(food_store);
                        var flgAdd = true;
                        if(food_store.length>0){
                            for (var i = 0; i < food_store.length; i++) {
                                 if(food_store[i].storeid == storeid){
                                   if($('#ddlDeliveryTime').val()=='ASAP (60-90 mins)'){
                                      var DeliveryToTime = $('#ddlDeliveryTime').val();
                                      var DeliveryFromTime = "";
                                    } else {
                                      var DeliveryToTime = $('#hdnDeliveryToTime').val();
                                      var DeliveryFromTime = $('#hdnDeliveryFromTime').val();
                                    }
                                    food_store[i].DeliveryDate = $('#ddlDeliveryDate').val();
                                    food_store[i].DeliveryFromTime =  DeliveryFromTime;
                                    food_store[i].DeliveryToTime =  DeliveryToTime;
                                    food_store[i].selectedCurrentTime =  currentTime;
                                    var dateFormated ="";
                                    if(sixty_to_ninty_mints){
                                        if($('#ddlDeliveryTime').val()=='ASAP (60-90 mins)'){
                                          $(".food-time-selection-asap").html("ASAP (60-90 mins) ");
                                        } else {
                                          var timeFormated =  moment($('#hdnDeliveryFromTime').val(), 'hh:mm:ss').format('hh:mm a');
                                          var dateFormated =  moment($('#ddlDeliveryDate').val(), 'YYYY-MM-DD').format("DD-MMM-YY (dddd)");
                                          $(".food-time-selection-asap").html(dateFormated+" "+timeFormated);
                                        }                                        
                                        
                                    }
                                    flgAdd = false;
                                    break;
                                }
                            }
                            if(flgAdd == true){
                                if($('#ddlDeliveryTime').val()=='ASAP (60-90 mins)'){
                                  var DeliveryToTime = $('#ddlDeliveryTime').val();
                                  var DeliveryFromTime = "";
                                 } else {
                                  var DeliveryToTime = $('#hdnDeliveryToTime').val();
                                  var DeliveryFromTime = $('#hdnDeliveryFromTime').val();
                                }
                                
                                var newStore = {selectedCurrentTime: currentTime, storeid:storeid ,'DeliveryDate':$('#ddlDeliveryDate').val(),'DeliveryFromTime': DeliveryFromTime,'DeliveryToTime': DeliveryToTime} 
                                 food_store.push(newStore);
                                 $("#selectDateTimeSlot").html("Change Slot")
                                 if(sixty_to_ninty_mints){
                                     var dateFormated ="";
                                     if($('#ddlDeliveryTime').val()=='ASAP (60-90 mins)'){
                                      $(".food-time-selection-asap").html("ASAP (60-90 mins) ");
                                     } else {
                                      var timeFormated =  moment($('#hdnDeliveryFromTime').val(), 'hh:mm:ss').format('hh:mm a');
                                      dateFormated =  moment($('#ddlDeliveryDate').val(), 'YYYY-MM-DD').format("DD-MMM-YY (dddd)");
                                      $(".food-time-selection-asap").html(dateFormated+" "+timeFormated);
                                    }
                                 }                            
                            }

                            window.localStorage.setItem('food_store', JSON.stringify(food_store));
                        } 
                    } else {
                        if(sixty_to_ninty_mints){
                            var dateFormated ="";
                            if($('#ddlDeliveryTime').val()=='ASAP (60-90 mins)'){
                                var DeliveryToTime = $('#ddlDeliveryTime').val();
                                var DeliveryFromTime = "";
                                $(".food-time-selection-asap").html("ASAP (60-90 mins) ");
                            } else {
                                var DeliveryToTime = $('#hdnDeliveryToTime').val();
                                var DeliveryFromTime = $('#hdnDeliveryFromTime').val();
                                var timeFormated =  moment($('#hdnDeliveryFromTime').val(), 'hh:mm:ss').format('hh:mm a');
                                dateFormated =  moment($('#ddlDeliveryDate').val(), 'YYYY-MM-DD').format("DD-MMM-YY (dddd)");
                                $(".food-time-selection-asap").html(dateFormated+" "+timeFormated);
                            }

                            var newStore = { selectedCurrentTime: currentTime, storeid:storeid,'DeliveryDate':$('#ddlDeliveryDate').val(),'DeliveryFromTime': DeliveryFromTime,'DeliveryToTime': DeliveryToTime} 
                            storeDetail.push(newStore);
                            window.localStorage.setItem('food_store', JSON.stringify(storeDetail));
                        } else {

                        var newStore = {selectedCurrentTime: currentTime, storeid:storeid,'DeliveryDate':$('#ddlDeliveryDate').val(),'DeliveryFromTime': $('#hdnDeliveryFromTime').val(),'DeliveryToTime': $('#hdnDeliveryToTime').val()} 
                        storeDetail.push(newStore);
                        window.localStorage.setItem('food_store', JSON.stringify(storeDetail));
                         $("#selectDateTimeSlot").html("Change Slot")
                    }
                        
                    }
                    var lstCart = [];
                    var cart = window.localStorage.getItem('cart_food');
                    if (cart != null && cart != ''){
                        lstCart = JSON.parse(cart);
                        if (lstCart.length > 0) {
                            for (var i = 0; i < lstCart.length; i++) {
                                if (lstCart[i].sid == storeid ) {
                                    lstCart[i].deliveryDate = $('#ddlDeliveryDate').val();
                                    lstCart[i].deliveryFromTime =  $('#hdnDeliveryFromTime').val();
                                    lstCart[i].deliveryToTime =  $('#hdnDeliveryToTime').val();
                                    lstCart[i].selectedCurrentTime =  currentTime;
                                }
                            }
                            window.localStorage.setItem("cart_food", JSON.stringify(lstCart));
                            updateMiniCart();
                            resetPhpCart();
                        }
                    }
                    if ($('#dvDialog-DateTime')[0].dataset.save == '1') {
                        if ($('#hdnDeliveryDate').val() != '') {
                            addToCart_Food();
                            closeDelivery();
                        } else
                            alert('Select delivery date!');
                    } else
                        closeDelivery();
                }

                function closeDelivery() {
                    $('#dvDialog-DateTime')[0].dataset.save = '0';
                    closeDialog('dvDialog-DateTime');
                }

                function openAddProdDialog(lnk) {
                    //Prod Details
                    var prod = $(lnk).parent();

                    $('#hdnPID').val(lnk.dataset.pid);
                    $('#hdnPName').val($(prod).find('h3')[0].innerText);
                    $('#hdnPPrice').val(parseFloat(lnk.dataset.cost).toFixed(2));
                    $('#hdnPMRP').val(parseFloat(lnk.dataset.mrp).toFixed(2));
                    $('#hdnPTax').val(lnk.dataset.tax);
                    $('#hdnPPhoto').val(lnk.dataset.photo.trim());
					 /* if (getnewCookie('searchid') != "" && getnewCookie('searchid')>0) {
	   if(getnewCookie('searchsectionid')==$("#hdnsectionid").val()){ 
         newsaveSearhProduct(getnewCookie('searchid'),$("#hdnPID").val(),'view');
	   } else {
		        var href="";
				var sectionid="";
				var ssid=0;
                document.cookie = "searchid" + "=" + ssid + ";" + "path=/";
				document.cookie = "searchpath" + "=" + href + ";" + "path=/";
	            document.cookie = "searchsectionid" + "=" + sectionid + ";" + "path=/" 
	   }
    } */

                    if (lnk.dataset.photowide.trim() != '')
                        $('#imgProdImg')[0].src = 'https://quicklly.com/upload_images/product/wide/' + lnk.dataset.photowide.trim();

                    $('#lblProdTitle')[0].innerText = $(prod).find('h3')[0].innerText;
                    $('#lblProdPrice')[0].innerText = '$' + parseFloat(lnk.dataset.cost).toFixed(2);

                    if(parseFloat(lnk.dataset.cost) < parseFloat(lnk.dataset.mrp)){
                        $('#lblProdMRP')[0].innerText = '$' + parseFloat(lnk.dataset.mrp).toFixed(2);
                        $('#lblProdMRP').show();
                    }
                    else
                        $('#lblProdMRP').hide();

                    $('#lblProdDesp')[0].innerText = $(prod).find('p.allProdDec')[0].innerText;
                    $('#ddlProdQty').val('1');
                    
                    //Customization
                    $('.clsCustomize').empty();
                    var lstCustom = JSON.parse(lnk.dataset.custom);
                    var dataPresent = false;

                    for (i = 0; i < lstCustom.length; i++) {
                        if (lstCustom[i].data.trim() != '') {
                            var arr = lstCustom[i].data.split(',');

                            for (j = 0; j < arr.length; j++) {
                                if (j == 0) {
                                    dataPresent = true;
                                    $('.clsCustomize').append('<p>' + lstCustom[i].cat + '</p>');
                                    $('.clsCustomize').append('<ul></ul>');
                                }

                                var template = $('#tempCustom').html();
                                template = template.replace('[GROUP]', lstCustom[i].cat);
                                template = template.replace('[NAME]', arr[j]);
                                template = template.replace('[VALUE]', arr[j]);
                                $('.clsCustomize ul:last-child').append(template);

                                if (j == 0)
                                    $('.clsCustomize ul:last-child li:last-child input[type=radio]')[0].checked = true;
                            }
                        }
                    }

                    if (!dataPresent) {
                        $('.jsCustomize-title').hide();
                        $('.clsCustomize').hide();
                    } else {
                        $('.jsCustomize-title').show();
                        $('.clsCustomize').show();
                    }

                    //Addons
                    $('#hdnAddOnJson').val('');

                    $('.clsAddOns').empty();
                    var lstAddOn = JSON.parse(lnk.dataset.addon);
                    dataPresent = false;

                    for (i = 0; i < lstAddOn.length; i++) {
                        if (i == 0)
                            dataPresent = true;

                        var template = $('#tempAddOn').html();
                        template = template.replace('images/quicly-logo-black.png', lstAddOn[i].photo);
                        template = template.replace('[IMG2]', lstAddOn[i].photo);
                        template = template.replace('[ALT_TITLE]', lstAddOn[i].name);
                        template = template.replace('[TITLE]', lstAddOn[i].name);
                        template = template.replace('[TITLE2]', lstAddOn[i].name);
                        template = template.replace('[SIZE]', lstAddOn[i].size);
                        template = template.replace('[PRICE]', '<?php echo $website_currency_symbol ?>' + parseFloat(lstAddOn[i].cost).toFixed(2));
                        template = template.replace('[PRICE2]', parseFloat(lstAddOn[i].cost).toFixed(2));
                        template = template.replace('[MRP2]', parseFloat(lstAddOn[i].mrp).toFixed(2));
                        template = template.replace('[TAX]', lstAddOn[i].tax);
                        template = template.replace('[ID]', lstAddOn[i].pid);

                        if(parseFloat(lstAddOn[i].cost) < parseFloat(lstAddOn[i].mrp))
                            template = template.replace('[MRP]', '<del class="strike-price"><?php echo $website_currency_symbol ?>' + parseFloat(lstAddOn[i].mrp).toFixed(2) + '</del>');
                        else
                            template = template.replace('[MRP]', '');

                        $('.clsAddOns').append(template);
                    }

                    if (!dataPresent) {
                        $('.jsAddOns-title').hide();
                        $('.clsAddOns').hide();
                    } else {
                        $('.jsAddOns-title').show();
                        $('.clsAddOns').show();
                    }

                    openDialog("dvDialog-Custom");
                }

                function addAddOn(lnk) {
                    $(lnk).hide();
                    var parent = $(lnk).parent();

                    var template = $('#tempQty').html();
                    $(parent).append(template);
                }

                function ddlAddOnQty_onChange(ddl) {
                    if (ddl.value == '0') {
                        var parent = $(ddl).parent();
                        var mainparent = $(ddl).parent().parent();
                        $(parent).remove();
                        $(mainparent).find('.clsProdAdd').show();
                    }
                }

                function addToCartPopUp() {
                    var showDialog = false;

                    if ($('#hdnPreOrder').val() == '1') {
                        if ($('#hdnDeliveryDate').val().trim() == '')
                            showDialog = true;
                    }
                    else if($('#hdnDeliveryToTime').val().trim() == '') {
											showDialog = true;
										}
                    else if ($('#hdnStoreDelvPartner').val() == 'MYVALUE365') {
                        if ($('#hdnDeliveryFromTime').val().trim() == '')
                            showDialog = true;
                    }

                    if (showDialog) {
                        $('#dvDialog-DateTime')[0].dataset.save = '1';
                        //openDialog('dvDialog-DateTime');
                        openDateTimeDialog();
                    } else
                        addToCart_Food();
                }

                function setPreOrderStrip() {
                    var ref = $('.clsFoodStoreCat')[0];
                    var dvPreOrderStrip = $('.clsFoodPreorder')[0];

                    //console.log("w=" + window.pageYOffset + ", h=" + $('header').height() + ", top=" + ref.offsetHeight);

                    if (window.pageYOffset + $('header').height() > ref.offsetTop + ref.offsetHeight)
                        dvPreOrderStrip.classList.add("sticky");
                    else
                        dvPreOrderStrip.classList.remove("sticky");
                }
                ;

                function openDialog(id) {
                    $('#' + id).fadeIn('fast', function () {
                        $(this).find('.clsDialog-Box').slideDown('normal');
                        $(this).find('.clsDialog-Box').css({'pointer-events': 'auto'});
                    });
                }

                function closeDialog(id) {
                    $('#' + id).find('.clsDialog-Box').slideUp('fast', function () {
                        $('#' + id).fadeOut('fast');
                        $('#' + id).find('.clsDialog-Box').css({'pointer-events': 'none'});
                    });
                }

                /*for select of Date show coresponding Time List for that Day Start*/
                var ddlDeliveryDateTimeCheckAtr = $('#ddlDeliveryDate').find(":selected").attr('data-dayforTimecheck');
                $('.' + ddlDeliveryDateTimeCheckAtr).addClass('selctedTimeforDay');
                $('body').on('change', '#ddlDeliveryDate', function () {
                    var droplit = $(this).find(':selected').attr('data-dayforTimecheck');
                    $('.allDisplayTimeforAllDays ').removeClass('selctedTimeforDay');
                    $('.' + droplit).addClass('selctedTimeforDay');
                    $('.allDisplayTimeforAllDays:first').prop('selected', false);
                    $('body .selctedTimeforDay:first').prop('selected', true);
                });

                /*for select of Date show coresponding Time List for that Day Ends*/

                $(document).ready(function () {
                    var reorderOpt = $('#ddlDeliveryTime').find('.selctedTimeforDay');
                    var reorderOpt2 = $('#ddlDeliveryTime').find('option:not(.selctedTimeforDay)');
                    $('#ddlDeliveryTime').empty();
                    $('#ddlDeliveryTime').append(reorderOpt);
                    $('#ddlDeliveryTime').append(reorderOpt2);
                    $("#ddlDeliveryTime option:eq(0)").attr("selected", "selected");
                    var food_store = window.localStorage.getItem('food_store');
                   
                    if (food_store != null && food_store != ''){
                        var store_info = JSON.parse(food_store);
                        
                        var store = searchStore(storeid, store_info);
                        if(store){
                            $('#ddlDeliveryDate').val(store.DeliveryDate);
                           $('#hdnDeliveryFromTime').val(store.DeliveryFromTime);
                           $('#hdnDeliveryToTime').val(store.DeliveryToTime);
                           //$('#ddlDeliveryTime').val(String(store.DeliveryFromTime+'-'+store.DeliveryToTime)).change();
                           var deliveryFromTo = String(store.DeliveryFromTime+'-'+store.DeliveryToTime);
                           deliveryFromTo = deliveryFromTo.toString()
                           $("#ddlDeliveryTime option[value='" + deliveryFromTo +"']").prop("selected", true);
                           if(sixty_to_ninty_mints){
                               var dateFormated = '';
                                if($('#hdnDeliveryToTime').val()=='ASAP (60-90 mins)'){
                                    $(".food-time-selection-asap").html("ASAP (60-90 mins) ");
                                } else {
                                  var timeFormated =  moment($('#hdnDeliveryFromTime').val(), 'hh:mm:ss').format('hh:mm a');
                                  var dateFormated =  moment(store.DeliveryDate, 'YYYY-MM-DD').format("DD-MMM-YY (dddd)");
                                  $(".food-time-selection-asap").html(dateFormated+" "+timeFormated);
                                } 

                           }
                          
                        }
                    }

                    if(sixty_to_ninty_mints){
                         if ($('#ddlDeliveryDate').val() == $('#hdnCurrSysDate').val()){
                            $('#ddlDeliveryTime').html($('#tempCurrDayTimes').html());
                            $("#ddlDeliveryTime option").each(function()
                             { 
                                var val = $(this).val();
                                var timeVal =val.split('-');
                                var selDateTime = $('#ddlDeliveryDate').val()+ " "+timeVal[0];
                                if (new Date(selDateTime) < new Date( $("#hdnCurrentTime").val())) {
                                     $(this).remove();
                                }
                             });
                        } else {
                             $('#ddlDeliveryTime').html($('#tempFutureDayTimes').html());                             
                        }
                       
                    }else{
                        if ($('#ddlDeliveryDate').val() == $('#hdnCurrSysDate').val()){
                            $('#ddlDeliveryTime').html($('#tempCurrDayTimes').html());
                         } else {
                            $('#ddlDeliveryTime').html($('#tempFutureDayTimes').html());
                         } 
                    } 
                    function loadMore()
                    {
                        action = 'active';

                        start = start + limit;
                        image_start = image_start + image_limit;

                        catid = $("#catid").val();
                        $("#prod-loader").show();
                        load_food_data(limit, start, <?php echo $storeid ?>, image_limit, image_start);
                        $(window).bind('scroll', bindScroll);
                    }
                    function bindScroll() {
                        if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && action == 'inactive' && show_loader == true) {
                            $(window).unbind('scroll');
                            loadMore();
                        }
                    }
                    var food_store = window.localStorage.getItem('food_store');
                    if (food_store != null && food_store != ''){
                        var store_info = JSON.parse(food_store);                   
                        var store = searchStore(storeid, store_info);
                        if(store){
                            $("#selectDateTimeSlot").html("Change Slot")
                        }
                   }
                    //$(window).scroll(bindScroll);
                });
            </script>
            <script type="text/javascript" src="<?php echo getFileVer('js/cart.js'); ?>" ></script>
            
            
            <script>

    

      function fetchallcat()
      {

        $('.lazyload').css("box-shadow", "none");
         $('#cat-0 > img').css("box-shadow", "rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px");
          $('#load_data').empty();
      var catcount  =  <?php echo count($CatArr->lstcat);?>;
      
      $("#prod-loader").hide();
                lazyload();
                var show_loader = true;
                var action = 'inactive';
                var limit = 7;
                var start = 7;
                var image_limit = 1;
                var image_start = 1;
                var cat_slug = '';
                var show_loader = true;
                var cat_array = <?php echo json_encode($catgNameSlugArr );?>;
                var storeid = '<?php echo $storeid ?>';
                var sixty_to_ninty_mints = <?php echo ($sixty_to_ninty_mints)?'true':'false'; ?>;
      
     <?php  foreach ($CatArr->lstcat as $key=> $cat) {?>
      
       setTimeout(function(){
           var key = <?php echo $key ?>;
           var cat_slug = '<?php echo $cat->slug  ?>' ;
           
           var store_id = '111151';
           var storeid = '111151';
           $('#cat-0').attr('onclick', 'fetchallcat()');
                    if(cat_slug === ''){ 
                        if(key == 0)
                        {
                        $("#prod-loader").show();
                        show_loader = true;
                        }

                        $.each(cat_array, function(key,catslug) {  
                            $('#cat_slug').val(catslug);
                            load_food_data(limit, start, storeid, image_limit, image_start);
                        });
                     
                     } else {
                        $("#cat_slug").val(cat_slug);
                        if(key == 0)
                        {
                            $("#prod-loader").show();
                        }
                        

                    
                        //$('#product-area').append("<div id='load_data' ></div>");
                        limit = 7;
                        start = 0;
                        image_limit = 1;
                        image_start = 0;
                        action = 'active';
                         if(key == 0)
                        {
                        $("#prod-loader").show();
                        show_loader = true;
                        }
                        load_food_data(limit, start, store_id, image_limit, image_start);
           
           
          }},1000*<?php echo $key +1;?>);
          
            <?php } ?>
          

       document.getElementById('cat-0').removeAttribute("onclick");
     
       }
     
     
     
   
</script>
           
    </body>
</html>

Directory Contents

Dirs: 12 × Files: 59

Name Size Perms Modified Actions
- drwxrwxr-x 2024-09-18 09:52:52
Edit Download
calender DIR
- drwxrwxr-x 2024-09-19 08:57:28
Edit Download
cgi-bin DIR
- drwxrwxr-x 2024-09-18 09:51:56
Edit Download
css DIR
- drwxrwxr-x 2024-09-19 16:17:08
Edit Download
fonts DIR
- drwxrwxr-x 2024-09-19 08:57:28
Edit Download
images DIR
- drwxrwxr-x 2024-10-07 11:07:14
Edit Download
include DIR
- drwxrwxr-x 2025-01-22 08:22:00
Edit Download
js DIR
- drwxrwxr-x 2025-01-14 16:18:39
Edit Download
nplogs DIR
- drwxrwxr-x 2025-01-17 14:38:11
Edit Download
plugin DIR
- drwxrwxr-x 2024-09-19 08:57:28
Edit Download
test DIR
- drwxrwxr-x 2025-01-17 13:33:24
Edit Download
vendor DIR
- drwxrwxr-x 2023-05-04 22:10:04
Edit Download
30.12 KB lrwxrwxr-x 2025-01-16 09:06:03
Edit Download
10.15 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
1.00 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
2.65 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
19.84 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
21.43 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
1.60 KB lrwxrwxr-x 2024-09-21 10:22:39
Edit Download
130.09 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
151.47 KB lrwxrwxr-x 2025-01-17 13:38:16
Edit Download
13.07 KB lrwxrwxr-x 2024-10-07 15:08:10
Edit Download
11.14 KB lrwxrwxr-x 2024-12-24 14:14:09
Edit Download
562 B lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
5.22 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
60.62 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
31.44 KB lrwxrwxr-x 2024-10-07 13:19:34
Edit Download
162.98 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
6.47 KB lrwxrwxr-x 2024-09-20 16:58:14
Edit Download
10.12 KB lrwxrwxr-x 2024-09-25 15:10:08
Edit Download
2.45 KB lrwxrwxr-x 2024-09-19 10:22:37
Edit Download
99.24 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
1.13 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
64.12 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
24.02 KB lrwxrwxr-x 2025-01-15 11:45:53
Edit Download
4.34 KB lrwxrwxr-x 2024-09-20 19:28:12
Edit Download
8.18 KB lrwxrwxr-x 2024-10-26 13:09:44
Edit Download
9.62 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
32.86 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
35.60 KB lrwxrwxr-x 2024-11-18 12:27:45
Edit Download
49.58 KB lrwxrwxr-x 2025-01-10 16:31:46
Edit Download
41.43 KB lrwxrwxr-x 2025-01-14 13:08:12
Edit Download
72.76 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
53.34 MB lrwxrwxr-x 2024-12-04 11:50:27
Edit Download
53.35 MB lrwxrwxr-x 2025-01-14 17:17:41
Edit Download
6.66 KB lrwxrwxr-x 2024-09-19 10:24:06
Edit Download
1.22 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
5.09 KB lrwxrwxr-x 2024-11-18 11:17:26
Edit Download
1.06 KB lrwxrwxr-x 2024-11-18 12:27:22
Edit Download
48.66 KB lrwxrwxr-x 2024-10-04 09:56:16
Edit Download
9.37 KB lrwxrwxr-x 2024-10-07 11:49:19
Edit Download
3.53 KB lrwxrwxr-x 2024-10-08 07:02:41
Edit Download
7.69 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
10.49 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
4.46 KB lrwxrwxr-x 2024-09-25 15:14:56
Edit Download
67.55 KB lrwxrwxr-x 2025-01-15 13:45:41
Edit Download
5.40 KB lrwxrwxr-x 2024-09-19 10:28:27
Edit Download
157.37 KB lrwxrwxr-x 2025-01-10 17:05:09
Edit Download
1.99 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
911 B lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
8.75 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
5.92 KB lrwxrwxr-x 2024-10-04 12:20:48
Edit Download
24.97 KB lrwxrwxr-x 2024-10-26 12:17:51
Edit Download
5.40 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
269.28 KB lrwxrwxr-x 2025-01-10 17:07:14
Edit Download
5.41 KB lrwxrwxr-x 2024-09-28 09:54:30
Edit Download
4.60 KB lrwxrwxr-x 2024-09-25 15:13:25
Edit Download
1.23 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download
3.13 KB lrwxrwxr-x 2025-01-16 03:44:46
Edit Download
29.56 KB lrwxrwxr-x 2024-10-08 06:26:39
Edit Download
1.31 KB lrwxrwxr-x 2024-09-19 08:57:28
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).