MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.147.62.99
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/rajwadahouse.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/rajwadahouse.com/index-offer.php
<div class="product-section section pt-45 pt-lg-25 pt-md-15 pt-sm-5 pt-xs-0">
    <div class="container">
        <div class="row">
            <div class="col">
                <div class="section-title text-start mb-30 pt-20">
                    <h2>Offer Products</h2>
                    <p>Browse the collection of our Offer products.</p>
                </div>
            </div>
        </div>
        <div class="product-slider tf-element-carousel" data-slick-options='{
                    "slidesToShow": 4,
                    "slidesToScroll": 1,
                    "infinite": true,
                    "arrows": true,
                    "prevArrow": {"buttonClass": "slick-btn slick-prev", "iconClass": "fa fa-angle-left" },
                    "nextArrow": {"buttonClass": "slick-btn slick-next", "iconClass": "fa fa-angle-right" }
                    }' data-slick-responsive='[
                    {"breakpoint":1199, "settings": {
                    "slidesToShow": 3
                    }},
                    {"breakpoint":992, "settings": {
                    "slidesToShow": 2
                    }},
                    {"breakpoint":768, "settings": {
                    "slidesToShow": 2
                    }},
                    {"breakpoint":576, "settings": {
                    "slidesToShow": 1,
                    "arrows": false,
                    "autoplay": true
                    }}
                    ]'>
            <?php
            $sqlprod = "SELECT * FROM `tbl_services` WHERE `offer`='Active' AND  `tour_status`='Active' ORDER BY tour_order ASC";
            $runprod = mysqli_query($db, $sqlprod) or die("Query Not run");
            while ($dataprod = mysqli_fetch_assoc($runprod)) {
                // $mrp = $dataprod['mrp'];
                // $actual_price = $dataprod['price'];
                // $discount_percentage = (($mrp - $actual_price) / $mrp) * 100;
                ?>
                <div class="col">

                    <!--  Single Grid product Start -->
                    <div class="single-grid-product mb-40">
                        <div class="product-image">
                            <div class="product-label">
                              <?php
                              $sale_price = $dataprod["mrp"];
                              $actual_price = isset($dataprod["price"]) ? $dataprod["price"] : null;

                              if ($actual_price && $sale_price > 0) {
                                  $discount_percentage = (($sale_price - $actual_price) / $sale_price) * 100;
                                  if ($discount_percentage < 0) {
                                      $discount_percentage = 0;
                                  }
                              } else {
                                  $discount_percentage = 0;
                              }
                              ?>
                              
                              <?php if ($discount_percentage > 0): ?>
                                  <span class="sale">Save <?php echo number_format($discount_percentage, 0); ?>%</span>
                              <?php endif; ?>
                              
                              <!--<span class="new">New</span>-->
                            </div>

                            <a href="<?php echo $wspath ?>product<?php echo $dataprod['slug_url']; ?>.html">
                                <img src="<?php echo $wspath; ?>admin/images/property-image/<?php echo $dataprod['image']; ?>"
                                    class="img-fluid" alt="<?php echo $dataprod["name"]; ?>"
                                    title="<?php echo $dataprod["name"]; ?>">
                                <img src="<?php echo $wspath; ?>admin/images/property-image/<?php echo $dataprod['image']; ?>"
                                    class="img-fluid" alt="<?php echo $dataprod["name"]; ?>"
                                    title="<?php echo $dataprod["name"]; ?>">
                            </a>
                        </div>
                        <div class="product-content">
                            <div class="new-add">
                                <form action="<?php echo $wspath; ?>add-cart.php" method="POST">
                                    <input name="sr_no" value="<?php echo $dataprod['id'] ?>" type="hidden">
                                    <input name="name" value="<?php echo $dataprod['name'] ?>" type="hidden">
                                    <input name="price" value="<?php echo $dataprod['price'] ?>" type="hidden">
                                    <input name="image" value="admin/images/property-image/<?php echo $dataprod['image'] ?>" type="hidden">
                                    <input name="quantity" value="1" type="hidden">
                                    <button type="submit" name="add_product"><i class="fa fa-shopping-bag" aria-hidden="true"></i> Add To Cart</button>
                                </form>
                                <form action="<?php echo $wspath; ?>add-cart.php" method="POST">
                                    <input name="sr_no" value="<?php echo $dataprod['id'] ?>" type="hidden">
                                    <input name="name" value="<?php echo $dataprod['name'] ?>" type="hidden">
                                    <input name="price" value="<?php echo $dataprod['price'] ?>" type="hidden">
                                    <input name="image" value="admin/images/property-image/<?php echo $dataprod['image'] ?>" type="hidden">
                                    <input name="quantity" value="1" type="hidden">
                                    <button type="submit" name="checkout_product"><i class="fa fa-shopping-bag" aria-hidden="true"></i> Buy Now</button>
                                </form>
                                <?php
                                session_start();
                                if (isset($_SESSION['user'])) {
                                    $user_id = $_SESSION['user']['cus_id'];
                                    $pro_id = $dataprod['id'];
                                    echo '
                                    <form action="' . $wspath . 'add-product-queries.php" method="POST">
                                        <input type="hidden" name="user_id" value="' . $user_id . '">
                                        <input type="hidden" name="product_id" value="' . $pro_id . '">
                                        <button type="submit" name="submit_wish" class="action_link " >
                                             <i class="fa fa-heart" aria-hidden="true"></i>
                                        </button>
                                    </form>';
                                } else {
                                    echo '
                                    <a href="login.html" class="action_link " >
                                         <i class="fa fa-heart" aria-hidden="true"></i>
                                    </a>';
                                }?>
                            </div>
                            
                            <h3 class="title pt-10">
                                <a href="<?php echo $wspath ?>product<?php echo $dataprod['slug_url']; ?>.html">
                                    <?php echo $dataprod["name"]; ?>
                                </a>
                            </h3>
                            <p class="product-price">
                                <span class="discounted-price">₹<?php echo $dataprod['price']; ?></span>
                                <?php if(!empty($dataprod['mrp'])): ?>
                                    <span class="main-price discounted">₹<?php echo $dataprod['mrp']; ?></span>
                                <?php endif; ?>

                            </p>
                        </div>
                    </div>

                    <!--  Single Grid product End -->
                </div>
            <?php } ?>
        </div>

    </div>
</div>

MMCT - 2023