Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
squireless
/
actions
:
update_cart.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php session_start(); include "../admin/database.php" ; $user_id=NULL; if(isset($_SESSION['user_email'])){ $user_id=$_SESSION['user_email']; } else { $user_id=session_id(); } $query="SELECT * from temp_cart where user_id='$user_id'"; $rec=db::getRecords($query); 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); echo " <div class='cart_item'> <div class='cart_img'> <a href='product_detail.php?id=".$product['id']."''><img src='admin/product/images/".$image['image_name']."'></a> </div> <div class='cart_info'> <a href='product_detail.php?id=".$product['id']."'>".$product['name']." </a> <p>x ".$rec2['quantity']." <span> $".$product['price']."</span></p> </div> <div class='cart_remove'> <a href='admin/action.php?delete_item=".$rec2['id']."'><i class='ion-ios-close-outline'></i></a> </div> </div> "; }; } else{ echo"Your Cart is Empty"; } ?>