Preview: cart.php
Size: 40.00 KB
//home/justbyquicklly-old/public_html/test/cart.php
<style>
.setqty.cart_events a, .setqty.cart_events span,.setqty.cart_puja a,.setqty.cart_puja span {
display: none !important;
}
div#divoffer {
z-index: 99999999999999999;
}
.offerpop span.waitloading {
color: red;
margin: 5px 0px;
display: block;
}
.offerpop.popupright img.single-img {
padding: 0;
width: 100%;
}
.offerpop.popupleft {width: 450px !important; float:left;}
.offerpop.popupright {width: 400px !important;float:right;}
div#divoffer .clsContent.clsFoodStoreCard.exclude-calc { width:870px;}
.textmepopupmodel .poprightwrapper {
padding: 20px 50px 0px 50px !important;
}
div#divoffer .grooptextme {
margin-top: 7px;
margin-bottom: 7px;
border: 1px solid #ddd;
border-radius: 4px;
}
div#divoffer input {
width: 85%;
border: none;
outline: none;
padding: 10px 12px;
border-radius: 4px;
font-weight: 500;
transition: 0.2s ease-out;
}
div#divoffer .poprightwrapper h3 {
text-align: left;
/* letter-spacing: 0px; */
color: #000000;
text-transform: capitalize;
font-size: 40px;
font-weight: 700;
}
div#divoffer p.bolddesc {
text-align: left;
font: normal normal 600 20px/23px Montserrat;
letter-spacing: 0px;
color: #000000;
opacity: 1;
margin: 10px 0;
}
div#divoffer p.lightdesc {
text-align: left;
font: normal normal 500 14px/20px Montserrat;
letter-spacing: 0px;
color: #000000;
}
div#divoffer .textmepopupmodel .grooptextme {
margin-top: 7px;
margin-bottom: 7px;
border: 1px solid #ddd;
border-radius: 4px;
}
div#divoffer .grooptextme input {
width: 85%;
border: none;
outline: none;
padding: 10px 12px;
border-radius: 4px;
font-weight: 500;
transition: 0.2s ease-out;
}
div#divoffer button#submitmsg {
width: 170px;
height: 40px;
background: #000;
color: #fff;
display: block;
margin: 15px 0 0px 0;
border: none;
border-radius: 6px;
cursor: pointer;
background: #EC2044 0% 0% no-repeat padding-box;
border-radius: 4px;
}
div#divoffer .popup-bottom-content input[type=text]:focus {
border: none;
transition: 0.2s ease-in;
}
div#divoffer .grooptextme span {
/* width: 40px; */
/* height: 40px; */
background: #f1f0f0;
padding: 10px 10px;
}
div#divoffer .popup-bottom-content {
margin-top: 18px;
text-align: left;
}
div#divoffer .popup-bottom-content label {
font-weight: 500;
color: #000000;
}
div#divoffer .offerpop.popupright img.single-img {
padding:0;
}
div#divoffer .popup-bottom-content {
margin-top: 18px;
text-align: left;
}
.clsCompleteCartshef .clsHead.basket.tempcarthead p {
position: relative;
}
.clsCompleteCartshef .clsHead.basket.tempcarthead label {
position: absolute;
right: 10px;
top: -17px;
font-weight: 500;
color: #000;
}
.clsCompleteCartshef .clsHead.basket.tempcarthead label img {
position:relative;
top:8px;
width:25px;
}
.clsCompleteCartshef a.setqtyplus {background: #F5F5F5 0% 0% no-repeat padding-box;border: 1px solid #E4E4E4;border-radius: 4px 0px 0px 4px;width: 40px;height: 25px;text-align: center;color: #000000;line-height: 20px;font-size: 14px;font-weight: 500;}
.clsCompleteCartshef a.setqtyminus {background: #F5F5F5 0% 0% no-repeat padding-box;border: 1px solid #E4E4E4;border-radius: 0px 4px 4px 0px;width: 40px;height: 25px;text-align: center;color: #000000;font-size: 14px;line-height: 20px;font-weight: 500;}
.clsCompleteCartshef span.setqty{
width:100%;
display: flex;
}
.clsCompleteCartshef span.qty {
width: 100%;
text-align: center;
border: 1px solid #E4E4E4;
line-height: 22px;
color: #000000;
}
.clsCompleteCartshef .qtyDetails.flex-child {
margin-top: 5px;
}
.clsCompleteCartshef .clsHead.basket.tempcarthead p {
position: relative;
}
.clsHead.basket.tempcarthead label {
position: absolute;
right: 10px;
top: -17px;
font-weight: 500;
color: #000;
}
.clsHead.basket.tempcarthead label img {
position:relative;
top:8px;
width:25px;
}
.clsshefCartProdslist.clsProd {
width: 140px !important;
margin: 0px 8px 8px 8px;
border: 0;
}
.clsshefCartProdslist.clsProd img {
max-width: 100%;
}
.clsCompleteCartshef .clsInnerCart .clsContent .clsCartStore {
padding: 3px 0;
}
.clsCompleteCartshef .slick-arrow.right {
right: 3px;
}
.clsCompleteCartshef .slick-arrow.left {
left: 3px;
}
.clsshefCartProds {
padding: 0px 20px;
}
.clsshefCartProds span.price.priceVal {
font-size: 12px;
}
.clsshefCartProdslist.clsProd p.prodName {
text-align: left;
letter-spacing: 0px;
color: #000;
opacity: 1;
font-weight: 500;
font-size: 11px;
line-height: 14px;
height: 31px;
overflow:hidden;
}
.clsCompleteCartshef p.totalorderamountbystore {
padding: 5px 0 !important;
font-size:12px;
}
.clsCompleteCartshef .clsCartStores {
padding: 3px 0px !important;
}
.clsCompleteCartshef .clsCartStores img.storeimg { width:54px;}
.clsshefCartProdslist.clsProd .clsDetails {
display:block;
margin-top: 4px;
}
.allcartwrapper {
overflow-y: auto;
max-height: calc(100% - 107px);
}
.allcartwrapper.active {
max-height: calc(100% - 50px);
}
.clsInnerCart p {
margin-top: 0;
margin-bottom: 0;
line-height: 1;
}
.clsMinOrderAmt{
font-weight: 600;
color: #000;
font-size: 14px;
}
.border-bottom {
-webkit-box-shadow: 0 4px 6px -6px #222;
-moz-box-shadow: 0 4px 6px -6px #222;
box-shadow: 0 6px 6px -6px #A6A6A6;
padding-top:15px;
}
p.clsMinOrderAmt.minicart-min-delivery-msg {
color:#fff;
}
.clsCartStore .price{
float: right;
font-size: 14px;
font-weight: 600;
color: #000;
}
.clsInnerCart .clsContent{
padding: 0px 0px;
}
.clsInnerCart .clsContent #cartStoreProd{
background-color: #FFF;
border-top: 3px solid #F3F3F3;
margin-top: 5px;
border-bottom: 3px solid #F3F3F3;
}
.clsInnerCart .clsContent .clsCartProds{
padding: 10px 0px;
border-bottom: 1px solid #ddd;
}
.clsInnerCart .clsContent .clsCartStores {
/*display: flex;
align-items: flex-start;*/
padding: 7px 0px;
border-bottom: 2px solid #F3F3F3;
}
.clsInnerCart .clsContent .clsCartStore {
display: flex;
align-items: flex-start;
padding: 7px 0;
}
.clsInnerCart .clsContent .clsCartStore .clsStoreData {
margin-left: 10px;
flex: 1;
}
.clsInnerCart .clsContent .clsCartProd:not(:last-child) {
border-bottom: none;
}
.clsInnerCart .clsHead .clsCart3{
color: #000;
padding: 0 10px 10px 15px;
margin-bottom: 0px;
}
.clsInnerCart .clsHead{
background-color:#FFFFFF;
border-bottom: 2px solid #E6E6E6;
}
.clsInnerCart .clsCompleteCart{
background-color: #FAFAFA;
/* overflow-y: auto; */
/* max-height: calc(100% - 107px); */
}
.clsInnerCart .clsContent .clsCartProd .clsDetails .qtyDetails p:first-child .setqty a{
display: inline-block;
color: #000;
width: 26px;
text-align: center;
background-color: #F5F5F5;
border: 1px solid #EDEDED;
font-size: 20px;
}
.clsInnerCart .clsContent .clsCartProd .clsDetails .qtyDetails p:first-child .setqty span{
background-color: #fff;
width: 24px;
border-top: 1px solid #FFF;
border-bottom: 1px solid #FFF;
font-size: 14px;
text-align: center;
color: #000;
font-weight:500;
}
.clsInnerCart .clsContent .clsCartProd .clsDetails p:nth-child(3) {
font-size: 11px;
margin-top:10px;
}
.clsInnerCart .clsContent .clsCartProd .clsDetails p:nth-child(4), .clsInnerCart .clsContent .clsCartProd .clsDetails p:nth-child(5) {
font-size: 11px;
margin-top: 5px;
}
.btn-margin{
margin-left:15px;
margin-right:15px;
}
.clsInnerCart .clsContent .clsCartProd .clsDetails {
display: flex;
}
.flex-child {
flex: 1;
}
.flex-child:first-child {
margin-right:0px;
}
@media (max-width: 768px) {
div#divoffer .clsContent.clsFoodStoreCard.exclude-calc {width: 100%;
min-width: 100%;}
.offerpop.popupleft {
width: 100% !important;
float: none;
}
div#divoffer .poprightwrapper {
padding: 20px 30px 0px 30px !important;
}
.offerpop.popupright {
width: 100% !important;
float: none;
padding-top:20px;
}
}
@media only screen and (min-width: 800px) and (max-width: 900px) {
div#divoffer .clsContent.clsFoodStoreCard.exclude-calc {
width: 800px;
}
div#divoffer .clsContent.clsFoodStoreCard.exclude-calc .offerpop.popupleft {
width: 410px !important;
}
div#divoffer .clsContent.clsFoodStoreCard.exclude-calc .offerpop.popupright {
width: 389px !important;
float: right;
}
.clsCompleteCartshef p.totalorderamountbystore {
padding: 5px 0 !important;
font-size: 10px;
}
}
.clsMinOrderAmt-you-might{
font: normal normal 500 16px Poppins!important;
letter-spacing: 0px;
color: #000000;
opacity: 1;
text-shadow: 0 0 #000000;
}
.clsSearchPg-mini .clsContent-mini{
display: grid;
grid-template-columns: repeat(3,1fr);
grid-gap: 0;
padding-left: 28px;
padding-right:0px;
}
.clsProd-mini {
width: 130px!important;
display: inline-block;
outline: 0;
}
/*.clsProdImg{
width: 130px;
height: 130px;
}*/
.clsTitle_mini {
text-align: left;
font: normal normal 500 12.5px/17px Poppins!important;
letter-spacing: 0px;
color: #333333;
opacity: 1;
text-transform: capitalize;
}
.clsProdImg-mini {
width: 100px;
height:80px;
}
.clsPrice_mini{
text-align: left;
font: normal normal 500 12px/22px Poppins!important;
letter-spacing: 0px;
color: #333333;
opacity: 1;
text-shadow: 0 0 BLACK;
}
.img-mini{
padding-top: 15px;
padding-bottom:0px;
height: 113px;
}
.clsaddbtn {
background: #FFFFFF 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 6px #00000029;
opacity: 1;
border-radius: 100%;
width: 28px;
height: 28px;
color: #333333;
cursor: pointer;
z-index: 1!important;
position: relative;
top: -24px;
left: 78px;
}
</style>
<style>
@media only screen and (max-width: 550px) {
.clsSearchPg-mini .clsContent-mini {
display: grid;
grid-template-columns: repeat(2,1fr);
grid-gap: 0;
padding-left: 28px;
padding-right: 0px;
}
.clsProd-mini {
width:100%!important;
display: inline-block;
outline: 0;
}
}
</style>
<div class="clsMiniCart" id="minicart">
<div class="clsInnerCart">
<div class="clsHead basket">
<p class="clsCart3">
<carttype class="maincarthead">Subham Cart</carttype> <a href="javascript:void(0);" onClick="toggleInnerCart();"><span style="font-size: 20px; padding-right: 13px;color: #000;padding-bottom: 10px;">x</span></a>
</p>
<div class="clsSlider" style="display:none;">
<a href="#" class="active">Fresh Farms</a>
</div>
</div>
<div class="clsContent">
<div class="allcartwrapper">
<div class="clsCompleteCartshef" style="background-color:#FAFAFA">
</div>
<div class="btn-margin shefbtnproee">
<input type="hidden" id="netamtshef" value="0">
<a href="javascript:void(0)" class="clsBtn" id="lnkshefcheckout" style="display: none;" onclick="return proceedtoshefcheckout();">Checkout with Shef $[NETAMOUNTSHEF]</a></div>
<div class="clsHead basket tempcarthead" style="display:none">
<p class="clsCart3">
<carttype>Cart</carttype> <label><img src="https://dev.goquicklly.com/images/kimbala/delivery-icon.svg" width="27" alt="Delivery Van">
Free Delivery Over $30 </label>
</p>
<div class="clsSlider" style="display:none;">
<a href="#" class="active">Fresh Farms</a>
</div>
</div>
<div class="clsCompleteCart" style="background-color:#FAFAFA"></div>
<?php
$tokenData = callAPI('POST', WEBAPI_URL_NEW.'login',array("email"=>"[email protected]", "password"=>"cgcptcu97b"));
$apitoken = $tokenData->token;
$results = callAPI('POST', WEBAPI_URL_NEW.'common/prods-suggest',array("zipcode"=>$_COOKIE['postalcode'],"uid"=>$_SESSION['value_user_id'],"secID"=>1,"storeID"=>0,"display"=>'top',"token"=>$apitoken));
if (count($results->lstYouMayLike) > 0) { ?>
<div class="clsTemplate">
<div id="tempQtymini">
<!-- <span class="clsQty" style="position: relative;
bottom: 8px;">
<span class="cqty"> - </span>
<select onchange="ddlQty_onChange_mini(this);" id="val">
<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 onclick="getplus(1)"> + </span>
</span>-->
</div>
</div>
<!--start you might like-->
<div id="cartStoreProd">
<div class="clsCartStores" style="border-bottom: 0px solid #F3F3F3!important;">
<div class="clsCartStoreTemp">
<div class="clsCartStore" >
<div class="clsStoreData">
<div class="clsMinOrderAmt-you-might">You might also like...
</div>
</div>
</div>
</div>
</div>
<div class="clsCartProds clsSearchPg-mini">
<div class="clsContent-mini">
<?php foreach($results->lstYouMayLike as $row){
$sectionid=$row->section_id;
$sectionslug=$row->section_url;
if($sectionid==1){
$finalurl="grocery-store".'/' . buildURL($row->name).'/'.$row->pid;
$section='grocery';
} elseif($sectionid==3){
if ($url != '') {
$finalurl="order-food-online".'/' . $url.'/'.$row->store_slug;
} else {
$finalurl="order-food-online".'/'.$row->store_slug;
}
}
elseif($sectionid==4){
if ($url != '') {
$finalurl="indian-catering".'/' . $url.'/'.$row->store_slug;
} else {
$finalurl="indian-catering".'/'.$row->store_slug;
}
}
elseif($sectionid==5){
$finalurl='indian-meal-kit-delivery';
}
elseif($sectionid==6){
if ($url != '') {
$finalurl="indian-tiffin".'/' . $url.'/'.$row->store_slug;
} else {
$finalurl="indian-tiffin".'/'.$row->store_slug;
}
}
elseif($sectionid==7){
$finalurl='indian-meal-kit-delivery';
}
elseif($sectionid==8){
$finalurl=$sectionslug;
}
elseif($sectionid==9){
$finalurl=$sectionslug;
}
elseif($sectionid==10){
$finalurl=$sectionslug;
}
elseif($sectionid==11){
$finalurl='indian-seasoning-kit';
}
elseif($sectionid==12){
$finalurl=$sectionslug;
$section='mealkit';
}
elseif($sectionid==13){
$finalurl="liquor-store".'/'.buildURLAlcohol($row->name);
}
elseif($sectionid==14){
$finalurl=$sectionslug;
$section='mealkit';
}
elseif($sectionid==15){
$finalurl=$sectionslug;
$section='mealkit';
}
elseif($sectionid==16){
$finalurl=$sectionslug;
$section='mealkit';
}
elseif($sectionid==17){
$finalurl=$sectionslug;
$section='mealkit';
}
elseif($sectionid==19){
$finalurl=$sectionslug;
$section='mealkit';
}elseif($sectionid==20){
$finalurl='indian-mangoes-online';
$section='mealkit';
}elseif($sectionid==21){
$finalurl=$sectionslug;
$section='mealkit';
} elseif($sectionid==22){
$finalurl=$sectionslug;
$section='mealkit';
} elseif($sectionid==24){
$finalurl= $sectionslug;
$section='mealkit';
}
?>
<div class="clsProd-mini clsProd-mini-common clsFoodStoreCard1 include-calculation1">
<div class="img-mini">
<a href="<?=$finalurl?>">
<img class="clsProdImg-mini" src="<?=$row->photo;?>" data-src="<?php echo $row->photo ?>" id="img_<?=$row->pid?>" alt="<?=$row->name;?>">
</a>
<?php
if($row->section_id==1)
{
if ($row->in_stock ==1) {
?>
<div class="clsaddbtn" onClick="addToCart_mini(this); open_box('box<?=$row->pid?>')" data-sid="<?php echo $row->sid ?>" data-sname="<?php echo $row->store_name ?>"
data-tax="<?php echo $row->tax ?>" data-simg="<?php echo $row->store_icon ?>"
data-smin="<?php echo $row->mini_fee ?>"
data-minorder="<?php echo $row->mini_amt ?>"
data-pid="<?php echo $row->pid ?>"
data-name="<?php echo $row->name ?>"
data-price="<?php echo $row->cost; ?>"
<?php if (isset($row->photo)) { ?>
data-photo="<?php echo $row->photo; ?>"
<?php } else { ?>
data-photo="images/no-img.jpg"
<?php } ?> id="clsaddbtn<?=$row->pid?>"><img style="position: relative; top: 4px; left: 3px;"src="images/icons-img/plusicon.PNG"></div>
<div id="box<?=$row->pid?>" style="width: 71%;
box-shadow: rgba(0, 0, 0, 0.16) 0px 0px 6px;
position: relative;
top: -17px;
border-radius: 11px;
text-align: center;
background-color: rgb(255, 255, 255);
left: 8px;display:none;
">
<span class="clsQty" style="position: relative; top: -1px">
<span class="cqty" onclick="getminus('<?=$row->pid?>');" style="font-size:22px; cursor:pointer;font-weight: 500; color: #000;"> - </span>
<input onclick="ddlQty_onChange_mini(this);" id="val<?=$row->pid?>" readonly style="width: 27px; text-align: center; border: 0px; font-weight: 500; color: #000; font-size: 11px; position: relative; top: -3px;" value="1">
<span onclick="getplus('<?=$row->pid?>');" style="font-size:20px; cursor:pointer;font-weight: 500; color: #000;"> + </span>
</span>
</div>
<?php
}
else
{
echo "Out of stock";
}
}
?>
</div>
<div class="clsTitle_mini" ><?=strtolower($row->name);?> <?=$row->size?></div>
<div>
<?php
if($row->section_id==1)
{
?>
<div class="clsPrice_mini"><?=$website_currency_symbol . $row->cost;?></div>
<?php
}
else
{
?>
<div class="clsPrice_mini"><a href='<?=$finalurl?>' style='
background-color: #28a745; color: #fff; font-size: 11px; padding: 5px 10px 5px 10px; border-radius: 5px;'>View</a></div>
<?php
}
?>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<!--end you might also like-->
</div>
<p class="clsCartEmpty btn-margin" id="lblCartEmpty" style="display: none;">Your cart is empty </p>
<!--<p class="minicart-min-delivery-msg btn-margin" id="fdBtn">
<img src="https://dev.goquicklly.com/images/delivery_van.png" width="27" alt="Delivery Van" loading="lazy"/>
Free Delivery Over <?php if($_SESSION['value_free_delivery']==1){?>$0<?php } else {?>$30<?php } ?>
</p>-->
<div class="btn-margin">
<input type="hidden" id="netamt" value="0">
<?php
if($_SESSION['value_user_id']=='')
{
?>
<a href="checkout" class="clsBtn" id="lnkProceedToCheckout" style="display: none;" onclick="return checkFoodPopUp();">Checkout $[NETAMOUNT]</a></div>
<?php
}
else
{
?>
<a href="checkout" class="clsBtn" id="lnkProceedToCheckout" style="display: none;" onclick="return checkFoodPopUp();">Checkout $[NETAMOUNT]</a></div>
<?php
}
?>
</div>
</div>
</div>
<input type="hidden" id="browsername">
<div class="clsTemplate">
<div id="sheftmpChkOutBtn">Checkout with Shef $[NETAMOUNTSHEF]</div>
<div id="sheftempStoreProd">
<div id="shefcartStoreProd">
<div id="cartStoreProd" >
<div class="clsCartStores"></div>
<div class="clsshefCartProds clsSlider"></div>
</div>
</div>
</div>
<div id="sheftempMiniCart-Stores">
<div class="clsCartStoreTemp">
<div class="clsCartStore">
<img src="images/no-img.jpg" class="storeimg" loading="lazy"/>
<div class="clsStoreData">
<p class="clsMinOrderAmt"> Shef
</p>
<p class="totalorderamountbystore"> Minimum Order Value: $25</p>
<p class="totalorderamountbystore freedelaboveshef"> Delivery Charge: <strong>$4.25</strong> I Free Delivery Above <strong>$25</strong></p>
</div>
</div>
</div>
</div>
<div id="sheftempMiniCart-Prod">
<div class="clsshefCartProdslist clsProd">
<img src="images/quicly-logo-black.png" alt="[Name1]" />
<div class="clsDetails">
<div class="flex-child" style="flex:2.5">
<p class="prodName" > [Name2] </p>
<p>
<span class="price priceVal">$[UnitPrice]</span> </p>
</div>
<div class="qtyDetails flex-child">
<p>
<span class="setqty" id="qty_cart_[pid]">
<a class="setqtyplus" href="javascript:void(0)" onclick="removeQtyMiniCart([i1],'[Key1]','[pid2]')">-</a>
<span class="qty">[qty]</span>
<a class="setqtyminus" href="javascript:void(0)" onclick="addQtyMiniCart([i2],'[Key2]')">+</a>
</span>
</p>
</div>
</div>
</div>
</div>
<div id="tmpChkOutBtn">Checkout $[NETAMOUNT]</div>
<div id="tempStoreProd">
<div id="cartStoreProd" >
<div class="clsCartStores"></div>
<div class="clsCartProds"></div>
</div>
</div>
<div id="tempMiniCart-Store">
<a href="javascript:void(0);" onclick="selectMiniStore(this);" style="display:none;" data-sid="[SID]">[Name]</a>
</div>
<div id="tempMiniCart-Stores">
<div class="clsCartStoreTemp">
<div class="clsCartStore">
<img src="images/no-img.jpg" class="storeimg" loading="lazy"/>
<div class="clsStoreData">
<p class="clsMinOrderAmt">[TotalOrderAmount]
<span class="price">$[TotalPrice]</span>
</p>
<!--<p class="totalorderamountbystore"> Minimum Order Value: $[MinOrderAmt]</p> -->
</div>
</div>
</div>
</div>
<div id="tempMiniCart-Prod">
<div class="clsCartProd">
<img src="images/quicly-logo-black.png" alt="[Name1]" />
<div class="clsDetails">
<div class="flex-child" style="flex:2.5">
<p class="prodName" > [Name2] </p>
<p>
<span class="price priceVal">$[UnitPrice]</span> </p>
<p>
<a href="javascript:void(0)" id="lnk_cart_[pid]" onclick="removeMiniCartProd([i],'[Key]')" title="Remove">
<img src="images/trash_icon.png" title="Remove" style="width:16px;height:16px" />
</a>
<a href="javascript:void(0)" id="lnk_cart_[pid]" onclick="removeMiniCartProd([k],'[KeyR]')" title="Remove">Remove</a>
</p>
<p class="subs_type">[sub]</p>
<p>[Remarks]</p>
</div>
<div class="qtyDetails flex-child">
<p>
<span class="price priceVal1">$[Price]</span>
<span class="setqty [Key3]" id="qty_cart_[pid]">
<a href="javascript:void(0)" id="mi[pid]" onclick="removeQtyMiniCart([i1],'[Key1]','[pid2]')">-</a>
<span class="qty">[qty]</span>
<a href="javascript:void(0)" id="add[pid]" onclick="addQtyMiniCart([i2],'[Key2]')">+</a>
</span>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="clsDialog" id="dvFoodSuggestPopup">
<div class="clsDialog-Box clsFoodSuggestPopup">
<a href="javascript:void(0);" class="popup-close" style="z-index: 9999999;" onClick="closeFoodPopUp(false);" title="Close">X</a>
<div class="clsContent clsFSP">
<?php
// Get food popup discount data
// $discountArr=$obj->query("SELECT food_popup_discount, food_popup_title, food_popup_short_desp FROM tbl_setting Where id = 1");
// $discountData=$obj->fetchNextObject($discountArr);
?>
<h3><?php echo $discountData->food_popup_title ?></h3>
<p><?php echo $discountData->food_popup_short_desp ?></p>
<div class="clsFSP_StoreSlider">
<?php
if ($discountData->food_popup_discount != '0') {
/* if (trim($_COOKIE['url']) != '' && trim($_COOKIE['url']) != ',') {
$urlarr = explode(',', $_COOKIE['url']);
$url = $urlarr[0] . '-' . $urlarr[1] ;
} else {
$url = '';
}
if(!isset($_COOKIE['meal-kit-zone']) || $_COOKIE['meal-kit-zone']!=1){
// Get sections
if($sectionIdValue != null && count($sectionIdValue) > 0)
$sectionIdValueArr=implode(',',$sectionIdValue);
if($sectionIdValueArr != null && $sectionIdValueArr != '') {
//Check stores
$sqlStores=$obj->query("SELECT f.sectionid, s.storename, s.slug, f.img FROM tbl_food_popup f INNER JOIN stores s ON s.storeid = f.storeid WHERE f.sectionid IN ($sectionIdValueArr) AND f.storeid in (select distinct(z.storeid) from tbl_store_zip z left join stores s on s.storeid=z.storeid where s.status=1 and z.status=1 and (s.by_pass_zipcode = 1 OR z.zip='".$_COOKIE['postalcode']."')) ORDER by f.display_order");
while($store=$obj->fetchNextObject($sqlStores)){
?>
<div class="clsFSP_Store">
<img src="/upload_images/food-popup/<?php echo $store->img ?>" alt="<?php echo $store->storename ?>">
<h3><?php echo $store->storename ?></h3>
<?php
if($store->sectionid == '3')
echo '<a href="order-food-online/' . $url . '/'. $store->slug . '">View Menu</a>';
else if($store->sectionid == '4')
echo '<a href="indian-catering/' . $url . '/'. $store->slug . '">View Menu</a>';
else if($store->sectionid == '6')
echo '<a href="indian-tiffin/' . $url . '/'. $store->slug . '">View Menu</a>';
?>
</div>
<?php
}
}
}*/
}
?>
</div>
<a href="/checkout" onclick="closeFoodPopUp(true);">Proceed to Checkout</a>
<span class="popup-bg"></span>
</div>
</div>
</div>
<div class="clsDialog textmepopupmodel" id="divoffer">
<div class="clsDialog-Box clsFoodCustomDialog">
<a href="javascript:void(0);" class="clsClose" style="z-index: 9999999;" onClick="closeDialogoffer('divoffer');" title="Close"></a>
<div class="clsContent clsFoodStoreCard exclude-calc">
<div class="offerpop popupleft">
<div class="poprightwrapper">
<h3>Can't Miss This</h3>
<div class="popup-top-content">
<p class="bolddesc">Get $10 off $30 on your next 3 Shef orders</p>
<p class="lightdesc">Enter your email below to claim the coupon</p>
</div>
<div class="popup-bottom-content">
<span class="waitloading" style="display:none;"> Please wait...</span>
<form action="" method="post">
<label>Email Address*</label>
<div class="grooptextme"><input type="email" id="textmeemail" name="textmeemail" placeholder="Enter email address"></div>
<label>Phone Number(Optional)</label>
<div class="grooptextme"><span>+1</span><input type="number" id="textmephonenumer" name="textmephonenumer" placeholder="Enter phone number"></div>
<span class="displaymsg"></div>
<button type="button" id="submitmsg" onClick="finalproceedtoshefcheckout()">Proceed to Checkout</button>
</form>
</div>
</div>
<div class="offerpop popupright">
<img src="images/shef/shef-popup.jpg" class="single-img" loading="lazy">
</div>
</div>
</div>
</div>
<script>
function getplus(a)
{
var val= $("#val"+a).val();
var b = parseInt(val)+parseInt(1);
if(b<21)
{
console.log(b);
$("#val"+a).val(b);
$("#add"+a).click();
// $("#val"+a).click();
}
}
function getminus(a)
{
var val= $("#val"+a).val();
var b = parseInt(val)-parseInt(1);
console.log(b);
$("#mi"+a).click();
if(b>0)
{
console.log('if');
//$("#box"+a).hide();
//$("#clsaddbtn"+a).show();
$("#val"+a).val(b);
// $("#val"+a).click();
}
else
{
console.log('else');
$("#box"+a).hide();
$("#clsaddbtn"+a).show();
$("#val"+a).val(b);
//$("#val"+a).click();
$("#val"+a).val(1);
}
}
function open_box(boxid)
{
$("#"+boxid).show();
}
fnBrowserDetect();
function proceedtoshefcheckout(){
$("#prod-loader").show();
<?php if($_SESSION['value_user_id']!=='' && $_SESSION['value_user_id']!==null){?>
var zipcode='<?php echo $_COOKIE['postalcode'];?>';
var uid='<?php echo $_SESSION['value_user_id'];?>';
$.ajax({
url: '<?php echo API_URL;?>/shef/popup',
type: 'POST',
contentType: 'application/json',
dataType: 'json',
data: JSON.stringify({
"callFrom": '<?php echo callFrom;?>',
"apiKey": '<?php echo API_KEY;?>',
"zipcode": zipcode,
"uid": uid
}),
success: function (data) {
var parsed_data = JSON.parse(JSON.stringify(data));
console.log(parsed_data);
if(parsed_data.success==true || parsed_data.sendCoupon==true){
$("#prod-loader").hide();
$(".lightdesc").html('<span>Offer email send please check your inbox</span>');
$(".popup-bottom-content").hide();
openDialogoffer("divoffer");
} else if(parsed_data.success==true || parsed_data.sendCoupon==false) {
$("#prod-loader").hide();
$(".lightdesc").html('<span>Offer email already send please check your inbox</span>');
$(".popup-bottom-content").hide();
openDialogoffer("divoffer");
}
}
});
<?php } else {?>
$("#prod-loader").hide();
openDialogoffer("divoffer");
<?php } ?>
}
function finalproceedtoshefcheckout(){
$("#prod-loader").show();
var deliveryDate=$('.clsSliderSubCats li.active').data('deldate');
var lstCart = [];
var cart = window.localStorage.getItem('cart_shef');
if (cart != null && cart != '') {
var tmp = JSON.parse(cart);
for (var i = 0; i < tmp.length; i++){
lstCart.push(tmp[i]);
}
}
var lstProductArray = [];
var deliveryDate='';
var shefid='';
if (lstCart.length > 0) {
for (var i = 0; i < lstCart.length; i++) {
shefid=lstCart[i].sid;
deliveryDate=lstCart[i].deliveryDate;
var qty = lstCart[i].qty;
var pid = parseInt(lstCart[i].pid);
var a = {
foodItemId: pid,
quantity: qty
}
lstProductArray.push(a);
}
}
<?php if($_SESSION['value_user_id']!=='' && $_SESSION['value_user_id']!==null){?>
var zipcode='<?php echo $_COOKIE['postalcode'];?>';
var uid='<?php echo $_SESSION['value_user_id'];?>';
var chemail='<?php echo getFieldWhere('email', 'tbl_user', 'id', $_SESSION['value_user_id']);?>';
// var windowReference = window.open();
$.ajax({
url: '<?php echo API_URL;?>/shef/checkout',
type: 'POST',
contentType: 'application/json',
dataType: 'json',
data: JSON.stringify({
"callFrom": '<?php echo callFrom;?>',
"apiKey": '<?php echo API_KEY;?>',
"zipcode": zipcode,
"uid": uid,
"email":chemail,
"shefId":shefid,
"deliveryDate":deliveryDate,
"prods": lstProductArray
}),
success: function (data) {
var parsed_data = JSON.parse(JSON.stringify(data));
console.log(parsed_data);
if(parsed_data.success==true || parsed_data.url!='' || parsed_data.url!=null){
//window.location.href=parsed_data.url;
//window.open(parsed_data.url, "_blank");
//windowReference.location = parsed_data.url;
//location.reload();
if($("#browsername").val()=="safari"){
window.location.href=parsed_data.url;
} else {
window.open(parsed_data.url, "_blank");
}
closeDialogoffer('divoffer');
localStorage.removeItem('cart_shef');
updateMiniCart();
restoreshefQty();
}
$("#prod-loader").hide()
}
});
<?php } else {?>
var zipcode='<?php echo $_COOKIE['postalcode'];?>';
//var uid='<?php echo $_SESSION['value_user_id'];?>';
var uid='0';
var chemail=$("#textmeemail").val();
var chphone=$("#textmephonenumer").val();
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(chemail)){
$(".waitloading").hide();
$.ajax({
url: '<?php echo API_URL;?>/shef/popup',
type: 'POST',
contentType: 'application/json',
dataType: 'json',
data: JSON.stringify({
"callFrom": '<?php echo callFrom;?>',
"apiKey": '<?php echo API_KEY;?>',
"zipcode": zipcode,
"uid": uid,
"email":chemail,
"phone":chphone
}),
success: function (data) {
var parsed_data = JSON.parse(JSON.stringify(data));
if(parsed_data.success==true || parsed_data.sendCoupon==true){
$(".lightdesc").html('<span>Offer email send please check your inbox</span>');
$(".popup-bottom-content").hide();
} else if(parsed_data.success==true || parsed_data.sendCoupon==false) {
$(".lightdesc").html('<span>Offer email already send please check your inbox</span>');
$(".popup-bottom-content").hide();
}
$.ajax({
url: '<?php echo API_URL;?>/shef/checkout',
type: 'POST',
contentType: 'application/json',
dataType: 'json',
data: JSON.stringify({
"callFrom": '<?php echo callFrom;?>',
"apiKey": '<?php echo API_KEY;?>',
"zipcode": zipcode,
"uid": uid,
"email":chemail,
"shefId":shefid,
"deliveryDate":deliveryDate,
"prods": lstProductArray
}),
success: function (data) {
var parsed_data = JSON.parse(JSON.stringify(data));
console.log(parsed_data);
if(parsed_data.success==true || parsed_data.url!='' || parsed_data.url!=null){
if($("#browsername").val()=="safari"){
window.location.href=parsed_data.url;
} else {
window.open(parsed_data.url, "_blank");
}
closeDialogoffer('divoffer');
localStorage.removeItem('cart_shef');
updateMiniCart();
restoreshefQty();
}
$("#prod-loader").hide()
}
});
}
});
} else {
$(".waitloading").text('Please enter valid email id');
$(".waitloading").show();
$("#prod-loader").hide();
}
<?php } ?>
}
function openDialogoffer(id) {
$('#' + id).fadeIn('fast', function () {
$(this).find('.clsDialog-Box').slideDown('normal');
$(this).find('.clsDialog-Box').css({'pointer-events': 'auto'});
});
}
function closeDialogoffer(id) {
$('#' + id).find('.clsDialog-Box').slideUp('fast', function () {
$('#' + id).fadeOut('fast');
$('#' + id).find('.clsDialog-Box').css({'pointer-events': 'none'});
});
}
document.querySelector("#textmephonenumer").addEventListener("keypress", function (evt) {
if (evt.which != 8 && evt.which != 0 && evt.which < 48 || evt.which > 57)
{
evt.preventDefault();
}
});
function fnBrowserDetect(){
var userAgent = navigator.userAgent;
var browserName;
if(userAgent.match(/chrome|chromium|crios/i)){
browserName = "chrome";
}else if(userAgent.match(/firefox|fxios/i)){
browserName = "firefox";
} else if(userAgent.match(/safari/i)){
browserName = "safari";
}else if(userAgent.match(/opr\//i)){
browserName = "opera";
} else if(userAgent.match(/edg/i)){
browserName = "edge";
}else{
browserName="No browser detection";
}
// document.getElementById('browsername')
document.querySelector("#browsername").value=browserName;
}
</script>
Directory Contents
Dirs: 9 × Files: 57