ok
Direktori : /home2/selectio/public_html/ramali.in/ |
Current File : /home2/selectio/public_html/ramali.in/product-details.php |
<?php include "header.php"; $product_id = $_GET['products']; $p_variant = $pdo->prepare("SELECT products.*,product_variant.id as product_variant_id,product_variant.catelogue_pieces, product_variant.price,product_variant.stock,product_variant.discounted_price,product_variant.measurement,product_variant.serve_for,product_variant.sku FROM products LEFT JOIN product_variant ON product_variant.product_id=products.id WHERE products.id=".$product_id." LIMIT 1"); $p_variant->execute(); $res_product = $p_variant->fetchAll(PDO::FETCH_ASSOC); $query = $pdo->prepare("SELECT products.*,product_variant.id as product_variant_id,product_variant.catelogue_pieces, product_variant.price,product_variant.stock,product_variant.discounted_price,product_variant.measurement,product_variant.serve_for,product_variant.sku FROM products LEFT JOIN product_variant ON product_variant.product_id=products.id WHERE products.id=".$product_id); $query->execute(); $resize = $query->fetchAll(PDO::FETCH_ASSOC); error_log("SELECT * FROM product_variant WHERE product_id=".$product_id); $product_variant = $pdo->prepare("SELECT * FROM product_variant WHERE product_id=".$product_id); $product_variant->execute(); $res_product_variant = $product_variant->fetchAll(PDO::FETCH_ASSOC); ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <meta property=og:url content= "https://phuleshahuambedkars.com/whatsapp_share_button_test.html" /> <!-- your url --> <meta property="og:type" content="article" /> <meta property="og:title" content=" Add here Youre Title " /> <!-- your Title --> <meta property="og:description" content="Add here Youre Description " /> <!-- your Description --> <meta property="og:image" content="https://phuleshahuambedkars.com/my_test_image.jpg" /> <!-- your Image url --> <style> table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #ffffff; text-align: left; text-align: center; padding-top: 4%; } tr:nth-child(odd) { background-color: #1b99d978; } </style> <style> .btn-dark{ border-color: #08c; background-color: #0088cc; } /*@media (min-width: 768px){ .product-single .product-details{ width: 160%; } }*/ .actives{ background: red; color: white !important; } .btn-white.btn-outline{ color: #ffffff; border-color: none; background: #ec1f24; border-radius: 20px; } .btn-white.btn-outline:hover, .btn-white.btn-outline:active, .btn-white.btn-outline:focus{ color: #ffffff; border-color: #94cfed; background: #94cfed; } .navget1{ display:block; } .navget{ display:none; } /*.navget img {*/ /*}*/ /*.navget1 img {*/ /* width: 50px;*/ /*}*/ .dropdown-box { display: none; } @media (min-width: 340px) and (max-width: 479px) { .navget1{ display:none; } .navget{ display:block; } /*.navget1 img {*/ /* width: 50px;*/ /*}*/ /*.navget img {*/ /*}*/ } </style> <!-- Start of Main --> <main class="main mb-10 pb-1"> <!-- Start of Breadcrumb --> <nav class="breadcrumb-nav container"> <ul class="breadcrumb bb-no"> <li><a href="demo1.html">Home</a></li> <li>Products</li> </ul> </nav> <!-- End of Breadcrumb --> <!-- Start of Page Content --> <div class="page-content"> <div class="container"> <div class="row gutter-lg"> <div class="main-content"> <div class="product product-single row"> <div class="col-md-6 mb-6" id="product_images"> <div class="product-gallery product-gallery-sticky"> <div class="swiper-container product-single-swiper swiper-theme nav-inner" data-swiper-options="{ 'navigation': { 'nextEl': '.swiper-button-next', 'prevEl': '.swiper-button-prev' } }"> <div class="swiper-wrapper row cols-1 gutter-no"> <?php foreach ($res_product as $row) { ?> <?php $images = $res_product[0]['other_images']; $rs=json_decode($images); foreach($rs as $img){ ?> <?php $url= "dashboard/".$img ?> <div class="swiper-slide"> <figure class="product-image"> <img src="dashboard/<?=$img?>" data-zoom-image="dashboard/<?=$img?>" alt="Ramali Textiles" width="800" height="900"> </figure> </div> <?php } ?> <?php } ?> </div> <button class="swiper-button-next"></button> <button class="swiper-button-prev"></button> <a href="#" class="product-gallery-btn product-image-full"><i class="w-icon-zoom"></i></a> </div> <div class="product-thumbs-wrap swiper-container" data-swiper-options="{ 'navigation': { 'nextEl': '.swiper-button-next', 'prevEl': '.swiper-button-prev' } }"> <div class="product-thumbs swiper-wrapper row cols-4 gutter-sm"> <?php $images = $res_product[0]['other_images']; $rs=json_decode($images); foreach($rs as $img){ ?> <?php $url= "dashboard/".$img ?> <div class="product-thumb swiper-slide" onclick="changed('<?=$url?>')"> <img id="dashboard/<?=$img?>" class="imgone" src="dashboard/<?=$img?>" alt="Product Thumb" width="800" height="900" style="height: 105px;"> </div> <?php } ?> </div> <button class="swiper-button-next"></button> <button class="swiper-button-prev"></button> </div> </div> </div> <div class="col-md-6 mb-4 mb-md-6"> <div class="product-details scrollable pl-0"> <h2 class="product-title"><?= $res_product[0]['name'] ?> </h2> <div class="product-bm-wrapper"> <div class="product-meta"> <div class="product-categories"> <p style="font-size: 13px;color: black;"> Full Catalogue Price </p> 1 Set - <span id="Catelogue_pieces" > <?= $res_product[0]['catelogue_pieces'] ?> </span> Pieces </div> </div> </div> <div class="product-price total-price"><?=number_format($res_product[0]['price'],2)?></div> <hr class="product-divider"> <div class="product-form product-variation-form product-size-swatch"> <label class="mb-1">Size:</label> <div class="flex-wrap d-flex align-items-center product-variations"> <?php $i=1; foreach($res_product_variant as $res_product_variants){ if($i==1){ $active = "actives"; }else{ $active = ""; } ?> <span class="size <?=$active?>" id="size_<?=$i?>" onClick="measurementSize(<?=$res_product_variants['id']?>, <?=$i?>)" style="padding: 11px 13px 10px 15px;cursor: pointer;"><?=$res_product_variants['measurement']?></span> <?php $i++; } ?> </div> </div> <?php $cart=$pdo->prepare("SELECT * FROM `cart` where product_id=? and user_id=?"); $cart->execute(array($product_id,$uid)); $cart_result=$cart->fetchAll(PDO::FETCH_ASSOC); $cart_total=$cart->rowCount(); if($cart_total==1){ ?> <button onClick="aleady_added()" class="btn btn-warning btn-rounded"> Added </button> <?php }else{ ?> <span class="add_to_card"> <button class="btn btn-dark btn-rounded"> <span id="items_" onclick="Quick_AddToCart(<?=$row['id']?>,<?=$row['product_variant_id']?>)"> Add To Cart </span> </button> <a style="margin-top: 11px;" href="whatsapp://send?text=http://ramali.in/product-details.php?products=<?=$product_id?>" class="navget1"> <!--<i class="bi bi-file-earmark-fill"></i> Share--> <!--class="btn btn-white btn-outline btn-rounded btn-icon-right mb-3 navget1"--> <img src="images/wa.png"> </a> <a style="margin-top: 11px;" href="whatsapp://send?text=http://ramali.in/product-details.php?products=<?=$product_id?>" class="navget"> <!--<i class="bi bi-file-earmark-fill"></i>--> <img src="images/wa.png"> </a> </span> <?php } ?> </div> <div class="product-details" data-sticky-options="{'minWidth': 767}"> <?php foreach ($res_product as $row_product) { ?> <hr class="product-divider"> <table> <tr> <td style="width: 30%;"> <h4>Price</h4> <div id="input_vlaue"> <input type="hidden" value="<?=$res_product_variant[0]['id'] ?>" id="product_variant_id" > </div> </td> <td> <div class="product-price" style="font-size: 20px;"> <ins class="new-price total-price" id=""><i class="bi bi-currency-rupee"></i> <?=number_format($row_product['discounted_price'],2)?></ins> </div> </td> </tr> <tr> <td> <h6>Availability</h6> </td> <td> <h6><?=$row_product['serve_for']?></h6> </td> </tr> <tr> <td> <h6>Product Code</h6> </td> <td> <h6> <?=$row_product['sku']?> </h6> </td> </tr> <tr> <td> <h6>Catelog pieces</h6> </td> <td> <h6><?=$row_product['stock']?></h6> </td> </tr> <tr> <td> <h6>Full Catelog Price</h6> </td> <td><h6 class="total-price"><i class="bi bi-currency-rupee"></i> <?=number_format($row_product['discounted_price'],2)?></h6></td> </tr> <tr> <td> <h6>Price Per piece</h6> </td> <td> <h6 class="size-price"><i class="bi bi-currency-rupee"></i><?=number_format($row_product['price'],2)?></h6> </td> </tr> <tr> <td> <h6>MOQ</h6> </td> <td> <h6>Full Catalog</h6> </td> </tr> <tr> <td> <h6>Shipping Chargers</h6> </td> <td> <h6><i class="bi bi-currency-rupee"></i> <?=$row_product['manufacturer']?></h6> </td> </tr> <tr> <td> <h6>Shipping Time</h6> </td> <td> <h6><?=$row_product['shipping_time']?></h6> </td> </tr> <tr> <td> <h6>Dispatch</h6> </td> <td> <h6><?=$row_product['dispatch']?></h6> </td> </tr> <tr> <td> <h6>Brand</h6> </td> <td> <h6><?=$row_product['made_in']?></h6> </td> </tr> </table> <?php } ?> <div class="fix-bottom product-sticky-content sticky-content"> <div class="product-form container" style=" margin-top: 3%;"> <!--<div class="product-qty-form"> <div class="input-group"> <input class="quantity form-control" type="number" min="1" max="10000000"> <button class="quantity-plus w-icon-plus"></button> <button class="quantity-minus w-icon-minus"></button> </div> </div>--> <?php $uid=""; if(isset($_SESSION['ramali_textiles']['id'])){ $uid = $_SESSION['ramali_textiles']['id']; } ?> </div> </div> <div class="fix-bottom product-sticky-content sticky-content"> <div class="product-form container" style=" margin-top: 3%;"> <a href="dashboard/<?=$res_product[0]['image']?>" download="dashboard/<?=$res_product[0]['image']?>" class="navget1 pr-2"> <img src="images/sh.png"> </a> <a href="dashboard/<?=$res_product[0]['image']?>" download="dashboard/<?=$res_product[0]['image']?>" class="navget1 pr-2"> <!--<i class="w-icon-download"></i>--> <img src="images/sh.png"> </a> <!--<a href="pdf-download.php?id=<?=$product_id?>" class="btn btn-white btn-outline btn-rounded btn-icon-right mb-3">--> <!-- <i class="bi bi-file-earmark-fill"></i> File--> <!--</a>--> </div> </div> <!--<div class="social-links-wrapper">--> <!-- <div class="social-links">--> <!-- <div class="social-icons social-no-color border-thin">--> <!-- <a href="#" class="social-icon social-facebook w-icon-facebook"></a>--> <!-- <a href="#" class="social-icon social-twitter w-icon-twitter"></a>--> <!-- <a href="#"--> <!-- class="social-icon social-pinterest fab fa-pinterest-p"></a>--> <!-- <a href="#" class="social-icon social-whatsapp fab fa-whatsapp"></a>--> <!-- <a href="#"--> <!-- class="social-icon social-youtube fab fa-linkedin-in"></a>--> <!-- </div>--> <!-- </div>--> <!-- <span class="divider d-xs-show"></span>--> <!--</div>--> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div id=""></div> </div> </div> <div class="tab tab-nav-boxed tab-nav-underline product-tabs"> <ul class="nav nav-tabs" role="tablist"> <li class="nav-item"> <a href="#product-tab-description" class="nav-link active">Description</a> </li> <li class="nav-item"> <a href="#product-tab-specification" class="nav-link">Specification</a> </li> </ul> <div class="tab-content"> <div class="tab-pane active" id="product-tab-description"> <div class="click"> <div class="copy"> <a class="btn btn-success btn-sm">Copy Content</a> <span> <div class="row mb-4"> <div class="col-md-12 mb-5"> <h4 class="title tab-pane-title font-weight-bold mb-2">Detail</h4> <p class="mb-4"> <?=$res_product[0]['description']?> </p> </div> </div> </span> </div> </div> </div> <div class="tab-pane" id="product-tab-specification"> <p> <?=$res_product[0]['shipping_delivery']?> </p> </div> </div> </div> <section class="vendor-product-section" style="margin-bottom: -5%;"> <div class="title-link-wrapper mb-4"> <h4 class="title text-left">RELATED PRODUCTS</h4> </div> <div class="swiper-container swiper-theme" data-swiper-options="{ 'spaceBetween': 20, 'slidesPerView': 2, 'breakpoints': { '576': { 'slidesPerView': 3 }, '768': { 'slidesPerView': 4 }, '992': { 'slidesPerView': 3 } } }"> <div class="swiper-wrapper row cols-lg-3 cols-md-4 cols-sm-3 cols-2"> <?php $statement = $pdo->prepare("SELECT * FROM `products` WHERE category_id=? and id!=? LIMIT=5"); $statement->execute($res_product[0]['category_id'],$product_id); $related = $statement->fetchAll(PDO::FETCH_ASSOC); foreach($related as $related_products){ ?> <div class="swiper-slide product-wrap"> <div class="product product-simple text-center"> <figure class="product-media"> <a href="product-details.php?product=<?=$related_products['id']?>"> <img src="<?=$related_products['image']?>" alt="Product" width="330" height="338" /> <img src="<?=$related_products['size_chart']?>" alt="Product" width="330" height="338" /> </a> <div class="product-action-vertical"> <a href="#" class="btn-product-icon btn-wishlist w-icon-heart" title="Add to wishlist"></a> <a href="#" class="btn-product-icon btn-compare w-icon-compare" title="Add to Compare"></a> </div> <div class="product-action"> <a href="product-details.php?product=<?=$res_product['id']?>" class="btn-product btn-quickview" title="Quick View">Quick View</a> </div> </figure> <div class="product-details"> <h4 class="product-name"> <?=$related_products['name']?> </h4> <div class="ratings-container"> <div class="ratings-full"> <span class="ratings" style="width: 100%;"></span> <span class="tooltiptext tooltip-top"></span> </div> <!--<a href="#" class="rating-reviews">(4.5 reviews)</a>--> </div> <div class="product-pa-wrapper"> <div class="product-price"> <ins class="new-price"><?=$res_product['price']?></ins> </div> <div class="product-action"> <span id="" onclick="Quick_AddToCart('<?=$row['id']?>')" class="btn-cart btn-product btn btn-icon-right btn-link btn-underline">Add To Cart </span> </div> </div> </div> </div> </div> <?php } ?> </div> </div> </section> </div> <!-- End of Main Content --> <aside class="sidebar product-sidebar sidebar-fixed right-sidebar"> <div class="sidebar-overlay"></div> <a class="sidebar-close" href="#"><i class="close-icon"></i></a> <a href="#" class="sidebar-toggle d-flex d-lg-none"><i class="fas fa-chevron-left"></i></a> <div class="sidebar-content scrollable"> <div class="pin-wrapper" style="height: 970.844px;"><div class="sticky-sidebar" style="border-bottom: 0px none rgb(102, 102, 102); width: 280px;"> <div class="widget widget-banner mb-9"> <div class="banner banner-fixed br-sm"> <figure> <img src="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://ramali.in/product-details.php?products=<?=$product_id?>" style="width:100%"> </figure> <figure> <img src="images/logo/original.png" style="width: 50%;margin-left: 25%;margin-top: 15%;rotate: 347deg;"> </figure> </div> </div> <!-- End of Widget Banner --> </div></div> </div> </aside> <!-- End of Sidebar --> </div> </div> </div> </main> <!-- End of Main --> <script> function changed(id){ //alert('working'); $("#parent").attr("src", id); $('#parent').attr('data-zoom-image', id); } function measurementSize(pro_id, random_id){ var size = $("#size_"+random_id).text(); console.log("yoor id is "+pro_id); if($("#size_"+random_id).hasClass('actives')) { var rowCount = $('.actives').length; $("#size_"+random_id).removeClass("actives"); console.log("Selected Active Size: "+rowCount); } else { $("#size_"+random_id).addClass("actives"); var rowCount = $('.actives').length; console.log("Selected Seats: "+rowCount); if(rowCount>1){ $(".size").removeClass("actives"); console.log("Selected Seats: "+rowCount); $("#size_"+random_id).addClass("actives"); }else{ $("#size_"+random_id).addClass("actives"); console.log("Selected Active: "+rowCount); } } $('#input_vlaue').empty(); $.ajax({ url: 'ui-api/size-api.php', type: 'post', data:{pro_id:pro_id,type:'add_size'}, dataType: 'json', success: function (response) { console.log(response); $("#Catelogue_pieces").html(response['catalogue_prices']); $('.size-price').html(response['price']); $('#input_vlaue').html(response['product_variant09']); /* $('#product_images').html(response['product_images']);*/ $('.total-price').html(response['discount_price']); } }); } </script> <?php include "footer.php"?> <style> #scroll-top.show { opacity: 1; bottom: 40px; } </style> <script> $(document).ready(function(){ $('.img-1').click(function(){ alert('helo') var imageid= $(this).attr('id'); alert(imageid) }) }); function measurementSiddze(pro_id,type){ var id=pro_id; console.log(id); /* $.ajax({ url: 'ui-api/size-api.php', type: 'post', data:{product_id:pro_id,type:'add_to_cart'}, dataType: 'json', success: function (response) { console.log(response); if(response['status']==200){ $('#items_'+pro_id).empty(); //$('#items_'+pro_id).append('<span class="btn btn-info btn-sm" style="background: green;"><i class="fi-rs-shopping-cart mr-5" style="color: white;"></i>Added</span>'); $('#items_'+pro_id).append(' <span class="btn-cart btn-product btn btn-icon-right btn-link btn-underline" style="color: green;">Added</span>'); $('#cart_items_count').text(response['cart_count']); success(response['message']); //alert(response['message']); //$('#addon_loader').hide(); }else{ warning(response['message']); //alert(response['message']); //$('#addon_loader').hide(); } } });*/ } //function </script> <script> $(document).ready(function(){ $(".click .copy").click(function(event){ alert("The Product Discription Coppied Successfully"); var $tempElement = $("<input>"); $("body").append($tempElement); $tempElement.val($(this).closest(".click").find("span").text()).select(); document.execCommand("Copy"); $tempElement.remove(); }); }); </script>