<?php include 'includes/header.php';?>
<title><?=$seo['category_title'];?></title>
<meta name="description" content="<?=$seo['category_description'];?>">
<meta name="keywords" content="<?=$seo['category_keywords'];?>">
<meta name="author" content="ParsTech">
<?php 

$kat  =   $dbh->prepare("SELECT * FROM product_categories where seo_name=? ");
$kat  -> execute(array($_GET['id']));
$kat  =   $kat  -> fetch(PDO::FETCH_ASSOC);

$kat = cevir("product_categories",$kat,$_SESSION["dil"]);
$kat = (object) $kat;


?>

<body id="page_home" class=""> 
    <!-- Body Wrapper Start -->
    <div class="body_wrapper">

        <!-- Food Item Section Start -->
        <div class="item_section mt-4 mt-md-0">
            <div class="item_section_header">
                <a class="back-link" href="javascript:history.back(-1)"><i class="zmdi zmdi-arrow-left"></i><?php echo $dil['107'];?></a>
                

                <form class="search_box" action="menu">
                    <div class="form-group d-flex">
                        <div class="input-group-prepend">
                            <div class="input-group-text"><i class="zmdi zmdi-search"></i></div>
                        </div>
                        <input type="search" name="q" class="form-control" placeholder="<?php echo $dil['054'];?>">
                        <button type="submit" class="btn"><?php echo $dil['053'];?></button>
                    </div>
                </form>
            </div>
            <center>     
            	  <div class="product_detail_title"><?=$kat->categories_name?></div> 
           </center>

           <div class="tab-content" id="item_tabContent" >

            <div class="tab-pane fade active show" id="products<?=$y?>" role="tabpanel" aria-labelledby="nav-product<?=$y?>">

                <div class="row product_items">

                    <?

                    $urunler  =   $dbh->prepare("SELECT * FROM product where parent=? ");
                    $urunler  -> execute(array($kat->id));
                    $urunler  =   $urunler  -> fetchAll(PDO::FETCH_ASSOC);


                    foreach($urunler as $urun):

                       $urun = cevir("product",$urun,$_SESSION["dil"]);
                       $urun = (object) $urun;

                       ?>
                       <div class="col-12 col-lg-6 col-xl-3 col-md-12 col-sm-6 ">
                        <div class="item" data-id="1" data-qty="0" data-title="Veg Cheese Burger" data-price="12.00">
                         <a href="urun-<?=$urun->seo_name?>" >
                            <div class="item_img center_img">
                                <img src="img/<?=$urun->foto?>" class="crop_img">
                            </div>
                            <div class="text_box" (click)="item_detail()">
                                <h2><?=$urun->product_name?></h2>
                                <h3><?=$urun->product_price?> TL</h3>
                            </div>
                        </a>
                    </div>
                </div>
                <? $y++; endforeach; ?>

                <?php if(count($urunler)==0){echo $dil["126"];} ?>

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

<?php include 'includes/modal.php';?>
<?php include 'includes/footer.php';?>