MMCT TEAM
Server IP : 82.112.239.40  /  Your IP : 216.73.216.81
Web Server : LiteSpeed
System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
User : u641149403 ( 641149403)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0777) :  /home/u641149403/domains/uniformindia.co.in/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u641149403/domains/uniformindia.co.in/public_html/wishlist.php
<?php 
ob_start();
include('header.php');
include('connect.php');
$id=$_GET['id'];




?>

<style type="text/css">
.col,
.col-1,
.col-10,
.col-11,
.col-12,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9,
.col-auto,
.col-lg,
.col-lg-1,
.col-lg-10,
.col-lg-11,
.col-lg-12,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-auto,
.col-md,
.col-md-1,
.col-md-10,
.col-md-11,
.col-md-12,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-auto,
.col-sm,
.col-sm-1,
.col-sm-10,
.col-sm-11,
.col-sm-12,
.col-sm-2,
.col-sm-3,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-sm-8,
.col-sm-9,
.col-sm-auto,
.col-xl,
.col-xl-1,
.col-xl-10,
.col-xl-11,
.col-xl-12,
.col-xl-2,
.col-xl-3,
.col-xl-4,
.col-xl-5,
.col-xl-6,
.col-xl-7,
.col-xl-8,
.col-xl-9,
.col-xl-auto {
    position: unset;
}

.sidebar-box {

    padding: 8px;
}

.ftco-section {
    margin-top: 15px;
    padding: 0em 0;
}

.categories li a span,
.sidelink li a span {

    right: -29px;

}

.card.text-center:hover {
    background: #cccccc3d;
}

.icons i {
    color: #FD6A02;
    font-weight: bold;
    font-size: 30px;
    padding: 5px;
}

.othertab {
    background-color: #BEBEBE;
    padding: 10px;
    margin-bottom: 5px;
}

.data {
    margin-top: 10px;
    padding-top: 10px;




}

.non-veg-icon {
    background-image: url(images/nonvegicon.svg) !important;
}

.data1 {
    margin-left: 20px;

}

.card {
    /*height: 359px;*/
}

select.slc-pr {
    width: 88%;
}

.slc-dv {
    height: 40px;
}

.imgstyle {

    box-shadow: 5px 0px #d2d5d2;
    border-style: solid;
    border-width: 0.1px;
}

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

/*.data:hover
    {
        padding:20px;
            
    }*/

.heading a {
    font-weight: bold;
    color: #3c9fd9 !important;
    text-transform: uppercase;
    padding-top: 10px;

}

.prname {
    /*height: 46px;*/
    font-size: 19px;
}

.viewbtn a {

    border-radius: 8px;
    background-color: #FD6A02;
    color: white !important;
    padding: 8px;
    margin-right: 8px;
    text-transform: bold;

}

.viewbtn {
    margin: 30px;
}

.non-veg-icon,
.veg-icon {
    width: 13px;
    height: 13px;
    left: 5px;
}

.veg-icon {
    background-image: url(images/vegicon.svg) !important;
}

.bottmban a {
    background-color: #3c9fd9;
    color: white !important;
    /*font-size: 18px;*/
    word-wrap: normal;
    text-align: center;
    width: 100%;
    height: 40px;
    display: inline-block;
    white-space: nowrap;
    font-size-adjust: 1.0;
    box-shadow: 5px 0px #d2d5d2;
    padding: 5px;
}

.bottmban p {
    border-style: solid;
    border-width: 0.5px;

}

.ind-icon {
    margin-left: 9px;
}

.soon img {
    /*background-position: center;
        background-size: cover;*/
    height: 500px;
    width: 100%;
    margin: 50px;
}

.col-sm-7.dmd {
    margin-left: -17px;
}

.card img {
    width: 100%;
    text-align: center;
    height: 200px;
}

/*-------------------------my css--------*/

p.prname {
    text-align: initial;
}

.dsc_prcnt {
    text-align: initial;
    font-size: 18px;
}

.dsc_price {
    text-align: initial;
}

.dsc_prcnt {
    margin: 2px;
    text-align: center;
    font-size: 11px;
}

.act_price {
    text-align: initial;
}

del.cut-prc small {
    font-size: 16px;
}

.card label p {

    border-radius: 7px !important;

}

.dsc_prcnt {
    position: absolute;
    left: -26px;
    top: 7px;
    width: 39% !important;
    background: url(../images/discount.png) center no-repeat !important;
    margin: 2px;
    color: white;
}

span.veg-icon img {
    width: 9%;
    background: white;
    height: 0px;
}

.ind-icon {
    text-align: justify;
    /* margin-left: 9px; */
    float: left !important;
    width: 97% !important;
    margin-left: 15px !important;
    height: 24px;
}

element.style {}

.card label p {
    width: 100% !important;
    background-color: #3c9fd9;
    font-size: 15px;
    border-radius: 50px;

}

.quantity-left-minus {
    padding: 0px !important
}

.quantity-right-plus {
    padding: 0px;
}

/*-------------------------my css end-------------------------*/

.card {
    width: 250px;
    margin: 5px;
}

.card h4 p input {
    word-wrap: normal;
    display: inline-block;
    font-size: 15px;
}

.card label p {
    background-color: #3c9fd9;
    font-size: 15px;
    border-radius: 50px;
    width: 200px;
}

.sidebar1 {


    width: 310px;
    float: left;
    margin-bottom: : 20px;
}

.sidebar-box h3.heading {
    font-size: 18px;
    margin-left: 16px;
    width: 100%;
}

.sidebar1 a {
    text-align: center;
    margin-left: 20px;
    border-width: 0.5px;
}

.dsc_prcnt {
    margin: 2px;
}

.cut-prc {
    margin-right: 2px;
    font-size: 16px;
}

del.cut-prc small {
    margin-right: 2px;
}

/*.itemsp
    {
        float:right;
    }*/


@media only screen and (min-device-width: 1400px) {
    .sidebar1 {
        width: 399px;
    }
}




/*`````````````````````````````Media Query`````````````````````````````*/



@media only screen and (max-device-width: 560px) {
    .card img {
        object-fit:contain;
    }

    span.veg-icon img {
        width: 8%;
    }

    .viewbtn label {
        width: 100% !important;
    }

    ul.categories li a {
        margin: 0;
        width: 100%;
        padding: 0;
    }

    .smd {
        width: 40%;
    }

    .dmd {
        width: 29%;
    }

    ul.categories li {
        margin: 0;
        width: 80%;
        padding: 0;
    }

    .sidebar-box {
        padding: 0 !important;
        width: 100% !important;
        text-align: center;
    }

    .sidebar1 {
        margin: 0px;
        margin-bottom: 20px;
        padding: 0px;
        width: 100% !important;
    }

    .card {
        width: 100%;
        margin: 0px;
    }

    .sidebar-box h3.heading {
        width: 94%;
    }

    .card.text-center {
        margin-bottom: 12px;
    }

    .card {
        height: 354px;
    }

    .row.itemsp.text-center {
        padding: 20px;
        margin: 0px;
    }

}

input#quantity {
    height: 37px !important;
}

.form-control:focus,
.form-control:active {
    border-color: #3c9fd9;
}

.wishlist {
    position: absolute;
    left: 217px;
    top: 5px;
    font-size: 20px;
    cursor: pointer;
}
</style>


<section class="ftco-section ftco-category ftco-no-pt ">
    <div class="heading text-center">
        <h3><a href="#">My Wishlist</a></h3>
    </div>


    <div class="container-fluid col-sm-12">


        <div class="row  itemsp text-center">
            <?php

            $sql = "SELECT * FROM wishlist INNER JOIN products ON wishlist.product_id=products.id WHERE user_id='".$_SESSION['id']."'";

        // $sql = "SELECT * FROM wishlist WHERE user_id='".$_SESSION['userid']."'";

        $resp=mysqli_query($con,$sql);
        while($rowap=mysqli_fetch_array($resp))
        {   
            ?>
            <div class="col-md-3">
            <div class="card text-center">
                <?php 
                $prid=$rowap['id']; 
                $query="SELECT * FROM product_variant WHERE product_id='$prid'";
                $res=mysqli_query($con,$query);

                $query="SELECT * FROM product_variant WHERE product_id='$prid'";
                $new_res=mysqli_query($con,$query);
                $num=mysqli_num_rows($res);
                $rowjoin=mysqli_fetch_assoc($res);
                ?>

                <center>
                    <!-- <div class="dsc_prcnt">
                        <span class="tx-dsc"><?php $dis=intval($rowjoin['price'])-intval($rowjoin['discounted_price']);
                        if($dis>0){ echo floor($dis*100/$rowjoin['price']);} else{ echo '0';} ?>% <br>off</span>
                    </div> -->
                    <div id="ribbon">
  <span class="ribbon3"><?php $dis=intval($rowjoin['price'])-intval($rowjoin['discounted_price']);
                        if($dis>0){ echo floor($dis*100/$rowjoin['price']);} else{ echo '0';} ?>% off</span>
</div>
                    <div class="wishlist">
                        <?php 
                        $sql = "SELECT * FROM wishlist WHERE product_id='".$rowap['id']."' AND user_id='".$_SESSION['userid']."'";
                        // $val=$con->query($sql);
                        $wish=mysqli_query($con,$sql);
                        $num_rows=mysqli_num_rows($wish);
                        if($num_rows > 0){
                            $rows=mysqli_fetch_assoc($wish);
                            echo '<span onclick="wishlist_del('.$rows["id"].')"><i style="color:red;" class="fa fa-heart" data-toggle="tooltip" data-placement="top" title="Remove Wishlist"></i></span>';
                        }else{
                            echo '<span onclick="wishlist('.$rowap["id"].')"><i class="fa fa-heart"></i></span>';
                        }
                        ?>
                    </div>
                    <a class="fr-img" href="product-single.php?id=<?php echo $rowap['id'];?>&cat_id=<?php echo $id;?>">
                        <img src="admin/<?php echo $rowap['image']; ?>" alt="image">
                </center>
                <span class="ind-icon">
                    <?php if(intval($rowap['indicator'])==1){
                            echo '<span class=" veg-icon"><img src="images/vegicon.svg"></span>';
                        }
                        if(intval($rowap['indicator'])==2){
                            echo '<span class=" non-veg-icon"></span>';
                        } ?>
                </span>
                </a>
                <div class="container">


                    <h4>
                        <p class="prname" style="font-size:16px;"><?php if (strlen($rowap['name']) <=30) {
                        echo $rowap['name'];
                    } else {
                        echo substr($rowap['name'], 0, 30) . '...';
                    } ?></p>
                    </h4>
                   
                    <a class="fr-img" href="product-single.php?id=<?php echo $rowap['id'];?>&cat_id=<?php echo $id;?>">
                        <div class="row mb-2">
                                <div class="dsc_price col-md-6"><del class="cut-prc"><small>M.R.P</small><?php echo ' ₹'.$rowjoin['price'];?> </del></div>
                                <div class="col-md-6"><span class="no-cut" style="float:right;"><small>₹</small><?php echo $rowjoin['discounted_price'];?> </span></div>
                            </div>
                    </a>

                    <!-- <form method="POST" action="add_to_cart.php">
                        <input type="hidden" name="page_id" value="<?php echo $rowap['category_id'] ?>">
                        <div class="slc-dv">
                            <?php if($num>1) {?>
                            <select class="slc-pr" name="product_variant"> <?php while($rowslc=mysqli_fetch_array($new_res)){ 
                $unit_id=$rowslc['measurement_unit_id'];
                $r=mysqli_query($con,"SELECT * FROM unit WHERE id='$unit_id'");
                $unit=mysqli_fetch_array($r);
                ?>
                                <option value="<?php  echo $rowslc['id'];?>">
                                    <?php echo $rowslc['measurement']." ".$unit['name']." - ₹".$rowslc['discounted_price'];  ?>
                                </option>
                                <?php } ?>
                            </select>
                            <?php }else{?> <input type="hidden" name="product_variant"
                                value="<?php echo $rowjoin['id']; ?>"> <?php }?>
                        </div>
                        <input type="hidden" name="pr_id" value="<?php echo $rowjoin['id'];?>">
                        <div class="row">
                            <div class="col-sm-5 smd">
                                <div class="input-group mb-3">
                                    <span class="input-group-btn itm-minu mr-2">
                                        <button type="button" class="quantity-left-minus btn" data-type="minus"
                                            data-field="" onclick="redpro(<?php  echo $rowap['id']; ?>)">
                                            <i class="ion-ios-remove"></i>
                                        </button>
                                    </span>
                                    <input type="text" id="quantity" value="1" name="quantity"
                                        class="quantity<?php echo $rowap['id']; ?> form-control input-number" min="1"
                                        max="100" readonly>
                                    <span class="input-group-btn itm-add ml-2">
                                        <button type="button" class="quantity-right-plus btn " data-type="plus"
                                            data-field="" onclick="pluspro(<?php  echo $rowap['id']; ?>)">
                                            <i class="ion-ios-add"></i>
                                        </button>
                                    </span>
                                </div>
                            </div>
                            <div class="col-sm-7 dmd">
                                <label>
                                    <p><input type="submit" name="btncart" value="Add To Cart"
                                            class="buy-now btn text-white"></p>
                                </label>
                            </div>
                        </div>
                    </form> -->
                </div>
            </div>
        </div>
            <?php } ?>
        </div>
    </div>



</section>

<?php include('footer.php');?>


<script type="text/javascript">
function wishlist_del(e) {
    $.ajax({
        url: "add_wishlist.php",
        type: "POST",
        data: {
            delete_id: e,
        },
        success: function(response) {
            alert(response);
            location.reload();
        },
    })
}
</script>

MMCT - 2023