<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description"
          content="Cuba admin is super flexible, powerful, clean &amp; modern responsive bootstrap 5 admin template with unlimited possibilities.">
    <meta name="keywords"
          content="admin template, Cuba admin template, dashboard template, flat admin template, responsive admin template, web app">
    <meta name="author" content="pixelstrap">
    <link rel="icon" href="/RTL/superAdmin/images/favicon.png" type="image/x-icon">
    <link rel="shortcut icon" href="/RTL/superAdmin/images/favicon.png" type="image/x-icon">
    <title>آنسه تیم</title>
    <!-- Google font-->

    <script src="https://cdn.ckeditor.com/ckeditor5/35.0.1/classic/ckeditor.js"></script>

    <link href="https://fonts.googleapis.com/css?family=Rubik:400,400i,500,500i,700,700i&amp;display=swap"
          rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900&amp;display=swap"
          rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/font-awesome.css">
    <!-- ico-font-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/icofont.css">
    <!-- Themify icon-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/themify.css">
    <!-- Flag icon-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/flag-icon.css">
    <!-- Feather icon-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/feather-icon.css">
    <!-- Plugins css start-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/scrollbar.css">
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/prism.css">
    <!-- Plugins css Ends-->
    <!-- Bootstrap css-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/bootstrap.css">
    <!-- App css-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/style.css">
    <link id="color" rel="stylesheet" href="/RTL/superAdmin/css/color-1.css" media="screen">
    <!-- Responsive css-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/responsive.css">
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/select2.css">
</head>
<body class="rtl">
<!-- tap on top starts-->
<div class="tap-top"><i data-feather="chevrons-up"></i></div>
<!-- tap on tap ends-->
<!-- page-wrapper Start-->
<div class="page-wrapper compact-wrapper" id="pageWrapper">
    <!-- Page Header Start-->

    <%- include('../../partials/header') %>

    <!-- Page Sidebar Ends-->
    <div class="page-body">
        <div class="container-fluid">
            <div class="page-title">
                <div class="row">
                    <div class="col-12">
                        <ol class="breadcrumb" style="-webkit-box-pack: start!important;">
                            <li class="breadcrumb-item"><a href="/<%= lan.ShortName %>/dashboard"><i
                                            data-feather="home"></i></a></li>
                            <li class="breadcrumb-item">کاربر</li>
                            <li class="breadcrumb-item">سبد خرید</li>
                            <% if(factor.Type == 0){ %>
                                <li class="breadcrumb-item active">سبد خرید فعلی</li>
                            <% } else if(factor.Type == 1){ %>
                                <li class="breadcrumb-item active">سبد خرید بعدی</li>
                            <% } %>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <!-- Container-fluid starts-->
        <!-- Container-fluid starts-->
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12">
                    <div class="card">
                        <div class="card-header">
                            <h5>سبد خرید</h5>
                        </div>
                        <div class="card-body">
                            <div class="row">
                                <div class="order-history table-responsive wishlist">
                                    <table class="table table-bordered">
                                        <thead>
                                        <tr>
                                            <th>کالا</th>
                                            <th>نام کالا</th>
                                            <th>قیمت</th>
                                            <th>تعداد</th>
                                            <th>رنگ</th>
                                            <th>سایز</th>
                                            <th>گارانتی</th>
                                            <th>قابل پرداخت</th>
                                            <th>انتقال به سبد خرید دیگر</th>
                                            <th>حذف از سبد پرداخت</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <% for(var i=0; i < productItems.length; i++) { %>
                                            <tr>
                                                <td>
                                                    <% if(productItems[i].Files.length > 0 ){ %>
                                                        <img class="img-fluid img-40" src="https://ansedownload.ir/amarify.com/panel.amarify.com/album/<%= productItems[i].Files[0].Url %>/<%= productItems[i].Files[0].Name %>" alt="<%= productItems[i].Files[0].Alt %>">
                                                    <% } %>
                                                </td>
                                                <td>
                                                    <div class="product-name"><a href="#"><%= productItems[i].ProductDocument[0].Name %></a></div>
                                                </td>
                                                <td><%= productItems[i].LastPrices.Price %> <%= currency.ShortName %> </td>
                                                <td><%= productItems[i].Number %></td>
                                                <% if(productItems[i].ColorDetail) { %>
                                                    <td><%= productItems[i].ColorDocument[0].Name %></td>
                                                <% } else { %>
                                                    <td>ـ</td>
                                                <% } %>
                                                <% if(productItems[i].SizeDetail) { %>
                                                    <td><%= productItems[i].SizeDocument[0].Name %></td>
                                                <% } else { %>
                                                    <td>ـ</td>
                                                <% } %>
                                                <% if(productItems[i].GuaranteeDetail) { %>
                                                    <td><%= productItems[i].GuaranteeDocument[0].Name %></td>
                                                <% } else { %>
                                                    <td>ـ</td>
                                                <% } %>
                                                <td><%= productItems[i].LastPrices[0].Price * productItems[i].Number %> <%= currency.ShortName %> </td>
                                                <td><a href="/<%= lan.ShortName %>/factor/remove/move/<%= factor.Type %>/<%= productItems[i]._id %>" ><i data-feather="move"></i></a></td>
                                                <td><a href="/<%= lan.ShortName %>/factor/remove/remove/<%= factor.Type %>/<%= productItems[i]._id %>" ><i data-feather="x-circle"></i></a></td>
                                            </tr>
                                        <% } %>
                                        <% if(factor.Status == 0 && factor.Type == 0){ %>
                                            <tr>
<!--                                                <td colspan="4">-->
<!--                                                    <div class="input-group">-->
<!--                                                        <input class="form-control me-2" type="text" placeholder="کد تخفیف دارید؟"><a class="btn btn-primary" href="#">اعمال</a>-->
<!--                                                    </div>-->
<!--                                                </td>-->
                                                <td class="total-amount">
                                                    <h6 class="m-0 text-end"><span class="f-w-600">قیمت کل: </span></h6>
                                                </td>
                                                <td><span><%= totalPrice %> <%= currency.ShortName %> </span></td>
                                            </tr>
                                            <tr>
                                                <td><a class="btn btn-success cart-btn-transform" href="/<%= lan.ShortName %>/packet/get">پرداخت</a></td>
                                            </tr>
                                        <% } else if(factor.Status == 0 && factor.Type == 1) { %>
                                            <tr>
                                                <td><a class="btn btn-success cart-btn-transform" href="">پرداخت نشده</a></td>
                                            </tr>
                                        <% } else if(factor.Status == 1) { %>
                                            <tr>
                                                <td><a class="btn btn-success cart-btn-transform" href="">درحال پرداخت</a></td>
                                            </tr>
                                        <% } else if(factor.Status == 2) { %>
                                            <tr>
                                                <td><a class="btn btn-success cart-btn-transform" href="">پرداخت شده</a></td>
                                            </tr>
                                        <% } else if(factor.Status == -1) { %>
                                            <tr>
                                                <td><a class="btn btn-success cart-btn-transform" href="">مرجوعی</a></td>
                                            </tr>
                                        <% } else { %>
                                            <tr>
                                                <td><a class="btn btn-success cart-btn-transform" href="">نامشخص</a></td>
                                            </tr>
                                        <% } %>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <!-- Container-fluid Ends-->
                    </div>
                </div>
            </div>
        </div>
        <!-- Container-fluid Ends-->

        <!-- Container-fluid Ends-->
    </div>

    <%- include("../../partials/footer") %>
</div>
</div>
<!-- latest jquery-->
<script src="/RTL/superAdmin/js/jquery-3.5.1.min.js"></script>
<!-- Bootstrap js-->
<script src="/RTL/superAdmin/js/bootstrap/bootstrap.bundle.min.js"></script>
<!-- feather icon js-->
<script src="/RTL/superAdmin/js/icons/feather-icon/feather.min.js"></script>
<script src="/RTL/superAdmin/js/icons/feather-icon/feather-icon.js"></script>
<!-- scrollbar js-->
<script src="/RTL/superAdmin/js/scrollbar/simplebar.js"></script>
<script src="/RTL/superAdmin/js/scrollbar/custom.js"></script>
<!-- Sidebar jquery-->
<script src="/RTL/superAdmin/js/config.js"></script>
<!-- Plugins JS start-->
<script src="/RTL/superAdmin/js/sidebar-menu.js"></script>
<script src="/RTL/superAdmin/js/prism/prism.min.js"></script>
<script src="/RTL/superAdmin/js/clipboard/clipboard.min.js"></script>
<script src="/RTL/superAdmin/js/custom-card/custom-card.js"></script>
<script src="/RTL/superAdmin/js/tooltip-init.js"></script>
<!-- Plugins JS Ends-->
<!-- Theme js-->
<script src="/RTL/superAdmin/js/script.js"></script>
<!-- login js-->
<!--error message for inputs-->
<script src="/RTL/superAdmin/js/input-error.js"></script>
<script src="/RTL/superAdmin/js/tiny/tinymce.min.js"></script>
<!-- Plugin used-->
<script src="/RTL/superAdmin/js/select2/select2.full.min.js"></script>
<script src="/RTL/superAdmin/js/select2/select2-custom.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.0/axios.min.js"></script>
<!-- script pop up -->

</body>
</html>
