File "cart-20260219054015.php"

Full Path: /home/magicrsz/public_html/Magik/cart-20260219054015.php
File size: 7.97 KB
MIME-type: text/x-php
Charset: utf-8

<?php

include("header.php");

$query="SELECT * from temp_cart  where user_id='$user_id'";
$rec=db::getRecords($query); 
$sub_total="0";

$query="SELECT * from amount";
$min_amount=db::getRecord($query);


?>


<!--Page Header Start-->
<section class="page-header">
    <div class="page-header-bg" style="background-image: url(assets/images/backgrounds/cleanse.jpg">
    </div>
    <div class="container">
        <div class="page-header__inner">
            <ul class="thm-breadcrumb list-unstyled">
                <li><a href="index.php">Home</a></li>
                <li><span>/</span></li>
                <li>Shop</li>
            </ul>
            <h2>Cart</h2>
        </div>
    </div>
</section>
<!--Page Header End-->
<!--Services One Start-->
<!--<section class="services-one">-->
<!--    <div class="services-one__bg" style="background-image: url(assets/images/shapes/services-one-shape-1.png);">-->
<!--    </div>-->
<br>
  <div class="container">
       <div class="section-title text-center">
         <!--  <span class="section-title__tagline">What We’re Doing</span>-->
            <h2>Minimum online order £<?php echo $min_amount['price'] ?>. Free deliver within London. Do not place order if you are outside of London. Contact us for special arrangments </h2>
            <div class="section-title__icon">
              <img src="assets/images/icon/section-title-icon-1.png" alt="">
           </div>

  </div>
<!--        <div class="unbeatable-one__btn-box text-center">-->
<!--            <a href="shop.php" class="thm-btn unbeatable-one__btn">Shop More <i-->
<!--                                                                                class="icon-right-arrow"></i> </a>-->
<!--        </div>-->
 </div>
<!--</section>-->
<!--Services One End-->


<!--Start Cart Page-->
<section class="cart-page">
    <div class="container">


        <div class="row">

            <div class="col-xl-8 col-lg-8">
                <div class="table-responsive">
                    <table class="table cart-table">
                        <thead>
                            <tr>
                                <th>Item</th>
                                <th>Size</th>
                                <th>Quantity</th>
                                <th>Total</th>
                                <th>Remove</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            if($rec!=NULL){
                                foreach($rec as $rec2)
                                {
                                    $product_id=$rec2['product_id'];
                                    $query="SELECT * from product where id='$product_id'";
                                    $product=db::getRecord($query);
                                    $sql="SELECT * FROM product_image where product_id='$product_id'";
                                    $image=db::getRecord($sql);
                                    $sub_total=$sub_total + $rec2['total'];
                            ?>
                            <tr>
                                <td>
                                    <div class="product-box">
                                        <div class="img-box">
                                            <img src="<?php echo "admin/product/images/".$image['image_name']; ?>" alt="">
                                        </div>
                                        <h3><a href="product-detail.php?id=<?php echo $product['id']; ?>"><?php echo $product['name']; ?></a></h3>
                                    </div>
                                </td>
                               
                                <td><?php echo $rec2['size']; ?></td>
                                
                               
                                <td>
                                    <div class="quantity-box">
                                        <input type="text" value="<?php echo $rec2['quantity']; ?>" disabled />
                                    </div>
                                </td>
                                <td>
                                    £<?php echo $rec2['total']; ?>
                                </td>
                                <td>
                                    <div class="cross-icon">
                                        <a href="admin/action.php?delete_item=<?php echo $rec2['id'] ?>"><i class="icon-close remove-icon"></i></a>
                                    </div>
                                </td>
                            </tr>
                            <?php
                                }
                            }else{
                            ?>
                            <tr>
                                <td><?php echo "No Record Found!"; ?></td>
                            </tr>
                            <?php
                            }
                            ?>
                        
                        </tbody>
                    </table>
                   
                </div>
                 <!--<a  class="w-50 thm-btn d-none d-lg-block text-center"  href="shop.php">Continue Shopping <i class="icon-right-arrow"></i></a>-->
                 
                  <a  class="thm-btn text-center"  href="checkout.php" style="padding-left:20px;font-size: 17px;margin-right: 10px;padding-top:10px;padding-bottom:10px;">Proceed To Checkout <i class="icon-right-arrow" style="margin-left: 5px;"></i></a>
            </div>
            <div class="col-xl-4 col-lg-4">
                <ul class="cart-total list-unstyled">
                    <li>
                        <span>Subtotal</span>
                        <span>£<?php echo $sub_total; ?> GBP</span>
                    </li>
                  <!--  <li>
                        <span>Shipping</span>
                        <span>$<?php echo $sub_total; ?> GBP</span>
                    </li>-->
                    <li>
                        <span>Total</span>
                        <span class="cart-total-amount">£<?php echo $sub_total; ?> GBP</span>
                    </li>
                </ul>
                <div class="cart-page__buttons">

                    <div class="cart-page__buttons-2"  style="display: flex;">
                        <?php
                        if($sub_total > 0){
                        ?> 
                        <a  class="thm-btn text-center"  href="checkout.php" style="padding-left:20px;font-size: 17px;margin-right: 10px;padding-top:10px;padding-bottom:10px;">Proceed To Checkout <i class="icon-right-arrow" style="margin-left: 5px;"></i></a>
                        <!--<a  class="thm-btn d-lg-none text-center" style="padding-left:20px;font-size: 15px;padding-top:10px;padding-bottom:10px;"  href="shop.php">Continue Shopping <?php echo $sub_total;?><i class="icon-right-arrow"  style="margin-left: 5px;"></i></a>-->
                        <?php    
                        }
                        else
                        {
                        ?> 
                        <a  class="thm-btn text-center"  href="shop.php" style="padding-left:20px;font-size: 17px;margin-right: 10px;padding-top:10px;padding-bottom:10px;">Go To Shop<i class="icon-right-arrow" style="margin-left: 5px;"></i></a>
                        <!--<a  class="thm-btn d-lg-none text-center"  href="shop.php" style="padding-left:20px;font-size: 15px;padding-top:10px;padding-bottom:10px;">Continue Shopping <i class="icon-right-arrow" style="margin-left: 5px;"></i></a>-->
                        <?php  
                        }
                        ?> 
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!--End Cart Page-->






























<?php

include("footer.php");

?>