Compare commits
28 Commits
0e1d96069a
...
28b88c1a61
Author | SHA1 | Date |
---|---|---|
raymart | 28b88c1a61 | |
MarkHipe | bb23ab4a1a | |
Jun Barroga | 10ccc1d7fe | |
MarkHipe | 0f4d180411 | |
Stacy | 1b4746336f | |
Stacy | 2a4f5a4755 | |
Stacy | a05bd1db37 | |
Stacy | ba7ef1d47d | |
MarkHipe | 424dfd8ca4 | |
gelonspr | 011ae8496e | |
gelonspr | 7f571bd37a | |
MarkHipe | ae80b26726 | |
jouls | ff0fb59674 | |
MarkHipe | 5e606c9199 | |
jouls | 844ef1ff6f | |
gelonspr | 64c5c756c0 | |
jouls | 41e64df669 | |
gelonspr | 85d8f31847 | |
jouls | c3523bfddc | |
jouls | 957b1f2249 | |
jouls | d941237b30 | |
jouls | 00bcc4441f | |
jouls | ecf89b070f | |
jouls | 1067ee2efd | |
jouls | 8eb07ad94f | |
jouls | 947f491a23 | |
jouls | ce9edf6593 | |
jouls | 9d3c301ab5 |
|
@ -55,814 +55,14 @@ $allorders = json_encode($orders, true);
|
|||
<div class="wrapper">
|
||||
|
||||
<!-- LEFT MAIN SIDEBAR -->
|
||||
<div class="ec-left-sidebar ec-bg-sidebar">
|
||||
<div id="sidebar" class="sidebar ec-sidebar-footer">
|
||||
|
||||
<div class="ec-brand">
|
||||
<a href="index.php" title="Ekka">
|
||||
<img class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
|
||||
<span class="ec-brand-name text-truncate">Ekka</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- begin sidebar scrollbar -->
|
||||
<div class="ec-navigation" data-simplebar>
|
||||
<!-- sidebar menu -->
|
||||
<ul class="nav sidebar-inner" id="sidebar-menu">
|
||||
<!-- Dashboard -->
|
||||
<li>
|
||||
<a class="sidenav-item-link" href="index.php">
|
||||
<i class="mdi mdi-view-dashboard-outline"></i>
|
||||
<span class="nav-text">Dashboard</span>
|
||||
</a>
|
||||
<hr>
|
||||
</li>
|
||||
|
||||
<!-- Vendors -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-account-group-outline"></i>
|
||||
<span class="nav-text">Vendors</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<ul class="sub-menu" id="vendors" data-parent="#sidebar-menu">
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="vendor-card.html">
|
||||
<span class="nav-text">Vendor Grid</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="vendor-list.html">
|
||||
<span class="nav-text">Vendor List</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="vendor-profile.html">
|
||||
<span class="nav-text">Vendors Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Users -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-account-group"></i>
|
||||
<span class="nav-text">Users</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<ul class="sub-menu" id="users" data-parent="#sidebar-menu">
|
||||
<li>
|
||||
<a class="sidenav-item-link" href="user-card.html">
|
||||
<span class="nav-text">User Grid</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="user-list.html">
|
||||
<span class="nav-text">User List</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="user-profile.html">
|
||||
<span class="nav-text">Users Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
</li>
|
||||
|
||||
<!-- Category -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-dns-outline"></i>
|
||||
<span class="nav-text">Categories</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<ul class="sub-menu" id="categorys" data-parent="#sidebar-menu">
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="main-category.html">
|
||||
<span class="nav-text">Main Category</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="sub-category.html">
|
||||
<span class="nav-text">Sub Category</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Products -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-palette-advanced"></i>
|
||||
<span class="nav-text">Products</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<ul class="sub-menu" id="products" data-parent="#sidebar-menu">
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="product-add.html">
|
||||
<span class="nav-text">Add Product</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="product-list.html">
|
||||
<span class="nav-text">List Product</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="product-grid.html">
|
||||
<span class="nav-text">Grid Product</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="product-detail.html">
|
||||
<span class="nav-text">Product Detail</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Orders -->
|
||||
<li class="has-sub active expand">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-cart"></i>
|
||||
<span class="nav-text">Orders</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse show">
|
||||
<ul class="sub-menu" id="orders" data-parent="#sidebar-menu">
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="new-order.html">
|
||||
<span class="nav-text">New Order</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<a class="sidenav-item-link" href="order-history.html">
|
||||
<span class="nav-text">Order History</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="order-detail.html">
|
||||
<span class="nav-text">Order Detail</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="invoice.html">
|
||||
<span class="nav-text">Invoice</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Reviews -->
|
||||
<li>
|
||||
<a class="sidenav-item-link" href="review-list.html">
|
||||
<i class="mdi mdi-star-half"></i>
|
||||
<span class="nav-text">Reviews</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Brands -->
|
||||
<li>
|
||||
<a class="sidenav-item-link" href="brand-list.html">
|
||||
<i class="mdi mdi-tag-faces"></i>
|
||||
<span class="nav-text">Brands</span>
|
||||
</a>
|
||||
<hr>
|
||||
</li>
|
||||
|
||||
<!-- Authentication -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-login"></i>
|
||||
<span class="nav-text">Authentication</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<ul class="sub-menu" id="authentication" data-parent="#sidebar-menu">
|
||||
<li class="">
|
||||
<a href="sign-in.html">
|
||||
<span class="nav-text">Sign In</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="sign-up.html">
|
||||
<span class="nav-text">Sign Up</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Icons -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-diamond-stone"></i>
|
||||
<span class="nav-text">Icons</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<ul class="sub-menu" id="icons" data-parent="#sidebar-menu">
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="material-icon.html">
|
||||
<span class="nav-text">Material Icon</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="font-awsome-icons.html">
|
||||
<span class="nav-text">Font Awsome Icon</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="flag-icon.html">
|
||||
<span class="nav-text">Flag Icon</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Other Pages -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-image-filter-none"></i>
|
||||
<span class="nav-text">Other Pages</span> <b class="caret"></b>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<ul class="sub-menu" id="otherpages" data-parent="#sidebar-menu">
|
||||
<li class="has-sub">
|
||||
<a href="404.html">404 Page</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include 'left-main-sidebar.php' ?>
|
||||
|
||||
<!-- PAGE WRAPPER -->
|
||||
<div class="ec-page-wrapper">
|
||||
|
||||
<!-- Header -->
|
||||
<header class="ec-main-header" id="header">
|
||||
<nav class="navbar navbar-static-top navbar-expand-lg">
|
||||
<!-- Sidebar toggle button -->
|
||||
<button id="sidebar-toggler" class="sidebar-toggle"></button>
|
||||
<!-- search form -->
|
||||
<div class="search-form d-lg-inline-block">
|
||||
<div class="input-group">
|
||||
<input type="text" name="query" id="search-input" class="form-control" placeholder="search.." autofocus autocomplete="off" />
|
||||
<button type="button" name="search" id="search-btn" class="btn btn-flat">
|
||||
<i class="mdi mdi-magnify"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="search-results-container">
|
||||
<ul id="search-results"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- navbar right -->
|
||||
<div class="navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- User Account -->
|
||||
<li class="dropdown user-menu">
|
||||
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="dropdown-header">
|
||||
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
|
||||
<div class="d-inline-block">
|
||||
John Deo <small class="pt-1">john.example@gmail.com</small>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="user-profile.html">
|
||||
<i class="mdi mdi-account"></i> My Profile
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="mdi mdi-email"></i> Message
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"> <i class="mdi mdi-diamond-stone"></i> Projects </a>
|
||||
</li>
|
||||
<li class="right-sidebar-in">
|
||||
<a href="javascript:0"> <i class="mdi mdi-settings-outline"></i> Setting </a>
|
||||
</li>
|
||||
<li class="dropdown-footer">
|
||||
<a href="index.php"> <i class="mdi mdi-logout"></i> Log Out </a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown notifications-menu custom-dropdown">
|
||||
<button class="dropdown-toggle notify-toggler custom-dropdown-toggler">
|
||||
<i class="mdi mdi-bell-outline"></i>
|
||||
</button>
|
||||
|
||||
<div class="card card-default dropdown-notify dropdown-menu-right mb-0">
|
||||
<div class="card-header card-header-border-bottom px-3">
|
||||
<h2>Notifications</h2>
|
||||
</div>
|
||||
|
||||
<div class="card-body px-0 py-0">
|
||||
<ul class="nav nav-tabs nav-style-border p-0 justify-content-between" id="myTab" role="tablist">
|
||||
<li class="nav-item mx-3 my-0 py-0">
|
||||
<a href="#" class="nav-link active pb-3" id="home2-tab" data-bs-toggle="tab" data-bs-target="#home2" role="tab" aria-controls="home2" aria-selected="true">All (10)</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mx-3 my-0 py-0">
|
||||
<a href="#" class="nav-link pb-3" id="profile2-tab" data-bs-toggle="tab" data-bs-target="#profile2" role="tab" aria-controls="profile2" aria-selected="false">Msgs (5)</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mx-3 my-0 py-0">
|
||||
<a href="#" class="nav-link pb-3" id="contact2-tab" data-bs-toggle="tab" data-bs-target="#contact2" role="tab" aria-controls="contact2" aria-selected="false">Others (5)</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="myTabContent3">
|
||||
<div class="tab-pane fade show active" id="home2" role="tabpanel" aria-labelledby="home2-tab">
|
||||
<ul class="list-unstyled" data-simplebar style="height: 360px">
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
|
||||
<span class="status away"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Nitin</h4>
|
||||
<p class="last-msg">Lorem ipsum dolor sit, amet
|
||||
consectetur adipisicing elit. Nam itaque
|
||||
doloremque odio, eligendi delectus vitae.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 30 min
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification media-active">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
|
||||
<span class="status active"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Lovina</h4>
|
||||
<p class="last-msg">Donec mattis augue a nisl
|
||||
consequat, nec imperdiet ex rutrum. Fusce et
|
||||
vehicula enim. Sed in enim eu odio vehic.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-white">
|
||||
<i class="mdi mdi-clock-outline"></i> Just
|
||||
now...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
|
||||
<span class="status away"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Crinali</h4>
|
||||
<p class="last-msg">Lorem ipsum dolor sit, amet
|
||||
consectetur adipisicing elit. Nam itaque
|
||||
doloremque odio, eligendi delectus vitae.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 1 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification event-active">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-info text-white">
|
||||
<i class="mdi mdi-calendar-check font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Upcomming event added</h4>
|
||||
<p class="last-msg font-size-14">03/Jan/2020 (1pm -
|
||||
2pm)</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 10 min
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-warning text-white">
|
||||
<i class="mdi mdi-chart-areaspline font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Yearly Sales report</h4>
|
||||
<p class="last-msg font-size-14">Lorem ipsum dolor
|
||||
sit, amet consectetur adipisicing elit. Nam
|
||||
itaque doloremque odio, eligendi delectus vitae.
|
||||
</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 1 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-primary text-white">
|
||||
<i class="mdi mdi-account-multiple-check font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">New request</h4>
|
||||
<p class="last-msg font-size-14">Add Dany Jones as
|
||||
your contact consequat nec imperdiet ex rutrum.
|
||||
Fusce et vehicula enim. Sed in enim.</p>
|
||||
|
||||
<span class="my-1 btn btn-sm btn-success">Accept</span>
|
||||
<span class="my-1 btn btn-sm btn-secondary">Delete</span>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary d-block">
|
||||
<i class="mdi mdi-clock-outline"></i> 5 min
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-danger text-white">
|
||||
<i class="mdi mdi-server-network-off font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Server overloaded</h4>
|
||||
<p class="last-msg font-size-14">Donec mattis augue
|
||||
a nisl consequat, nec imperdiet ex rutrum. Fusce
|
||||
et vehicula enim. Sed in enim eu odio vehic.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 30 min
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-purple text-white">
|
||||
<i class="mdi mdi-playlist-check font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Task complete</h4>
|
||||
<p class="last-msg font-size-14">Nam ut nisi erat.
|
||||
Ut quis tortor varius, hendrerit arcu quis,
|
||||
congue nisl. In scelerisque, sem ut ve.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 2 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="profile2" role="tabpanel" aria-labelledby="profile2-tab">
|
||||
<ul class="list-unstyled" data-simplebar style="height: 360px">
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
|
||||
<span class="status away"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Hardiko</h4>
|
||||
<p class="last-msg">Donec mattis augue a nisl
|
||||
consequat, nec imperdiet ex rutrum. Fusce et
|
||||
vehicula enim. Sed in enim eu odio vehic.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 1 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
|
||||
<span class="status away"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Browin</h4>
|
||||
<p class="last-msg">Nam ut nisi erat. Ut quis tortor
|
||||
varius, hendrerit arcu quis, congue nisl. In
|
||||
scelerisque, sem ut ve.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 1 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification media-active">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
|
||||
<span class="status active"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">jenelia</h4>
|
||||
<p class="last-msg">Donec mattis augue a nisl
|
||||
consequat, nec imperdiet ex rutrum. Fusce et
|
||||
vehicula enim. Sed in enim eu odio vehic.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-white">
|
||||
<i class="mdi mdi-clock-outline"></i> Just
|
||||
now...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
|
||||
<span class="status away"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Bhavlio</h4>
|
||||
<p class="last-msg">Lorem ipsum dolor sit, amet
|
||||
consectetur adipisicing elit. Nam itaque
|
||||
doloremque odio, eligendi delectus vitae.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 1 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
<div class="position-relative mr-3">
|
||||
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
|
||||
<span class="status away"></span>
|
||||
</div>
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Browini</h4>
|
||||
<p class="last-msg">Lorem ipsum dolor sit, amet
|
||||
consectetur adipisicing elit. Nam itaque
|
||||
doloremque odio, eligendi delectus vitae.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 1 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="contact2" role="tabpanel" aria-labelledby="contact2-tab">
|
||||
<ul class="list-unstyled" data-simplebar style="height: 360px">
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification event-active">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-info text-white">
|
||||
<i class="mdi mdi-calendar-check font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Upcomming event added</h4>
|
||||
<p class="last-msg font-size-14">03/Jan/2020 (1pm -
|
||||
2pm)</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 10 min
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-warning text-white">
|
||||
<i class="mdi mdi-chart-areaspline font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">New Sales report</h4>
|
||||
<p class="last-msg font-size-14">Lorem ipsum dolor
|
||||
sit, amet consectetur adipisicing elit. Nam
|
||||
itaque doloremque odio, eligendi delectus vitae.
|
||||
</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 1 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-primary text-white">
|
||||
<i class="mdi mdi-account-multiple-check font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">New Request</h4>
|
||||
<p class="last-msg font-size-14">Add Dany Jones as
|
||||
your contact consequat nec imperdiet ex rutrum.
|
||||
Fusce et vehicula enim. Sed in enim.</p>
|
||||
|
||||
<span class="my-1 btn btn-sm btn-success">Accept</span>
|
||||
<span class="my-1 btn btn-sm btn-secondary">Delete</span>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary d-block">
|
||||
<i class="mdi mdi-clock-outline"></i> 5 min
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-danger text-white">
|
||||
<i class="mdi mdi-server-network-off font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">Server overloaded</h4>
|
||||
<p class="last-msg font-size-14">Donec mattis augue
|
||||
a nisl consequat, nec imperdiet ex rutrum. Fusce
|
||||
et vehicula enim. Sed in enim eu odio vehic.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 30 min
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javscript:void(0)" class="media media-message media-notification">
|
||||
|
||||
<div class="d-flex rounded-circle align-items-center justify-content-center mr-3 media-icon iconbox-45 bg-purple text-white">
|
||||
<i class="mdi mdi-playlist-check font-size-20"></i>
|
||||
</div>
|
||||
|
||||
<div class="media-body d-flex justify-content-between">
|
||||
<div class="message-contents">
|
||||
<h4 class="title">New Task complete</h4>
|
||||
<p class="last-msg font-size-14">Nam ut nisi erat.
|
||||
Ut quis tortor varius, hendrerit arcu quis,
|
||||
congue nisl. In scelerisque, sem ut ve.</p>
|
||||
|
||||
<span class="font-size-12 font-weight-medium text-secondary">
|
||||
<i class="mdi mdi-clock-outline"></i> 2 hrs
|
||||
ago...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right d-none">
|
||||
<li class="dropdown-header">You have 5 notifications</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="mdi mdi-account-plus"></i> New user registered
|
||||
<span class=" font-size-12 d-inline-block float-right"><i class="mdi mdi-clock-outline"></i> 10 AM</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="mdi mdi-account-remove"></i> User deleted
|
||||
<span class=" font-size-12 d-inline-block float-right"><i class="mdi mdi-clock-outline"></i> 07 AM</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="mdi mdi-chart-areaspline"></i> Sales report is ready
|
||||
<span class=" font-size-12 d-inline-block float-right"><i class="mdi mdi-clock-outline"></i> 12 PM</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="mdi mdi-account-supervisor"></i> New client
|
||||
<span class=" font-size-12 d-inline-block float-right"><i class="mdi mdi-clock-outline"></i> 10 AM</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="mdi mdi-server-network-off"></i> Server overloaded
|
||||
<span class=" font-size-12 d-inline-block float-right"><i class="mdi mdi-clock-outline"></i> 05 AM</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown-footer">
|
||||
<a class="text-center" href="#"> View All </a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="right-sidebar-in right-sidebar-2-menu">
|
||||
<i class="mdi mdi-settings-outline mdi-spin"></i>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<?php include 'header.php' ?>
|
||||
|
||||
|
||||
<!-- CONTENT WRAPPER -->
|
||||
<div class="ec-content-wrapper">
|
||||
|
|
|
@ -5,6 +5,7 @@ $_SESSION["url"] = $_SERVER['REQUEST_URI'];
|
|||
if ($_SESSION["userId"] <> "") {
|
||||
$_SESSION["isLoggedIn"] = true;
|
||||
//$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
} else {
|
||||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
|
@ -14,6 +15,8 @@ if ($_SESSION["user_type"] != "admin") {
|
|||
header("location: login.php?alert=Only admins allowed here!");
|
||||
}
|
||||
$products = productList();
|
||||
|
||||
$vendorSearchResult = $_SESSION["vendorSearchResult"];
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
|
@ -64,7 +67,8 @@ $products = productList();
|
|||
<link id="ekka-css" rel="stylesheet" href="assets/css/ekka.css" />
|
||||
|
||||
<!-- FAVICON -->
|
||||
<link href="assets/img/favicon.png" rel="shortcut icon" />
|
||||
<!-- <link href="assets/img/favicon.png" rel="shortcut icon" /> -->
|
||||
<link href="assets/img/favicon/favicon.png" rel="shortcut icon" />
|
||||
|
||||
<!-- FONTAWESOME -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
@ -128,7 +132,7 @@ $products = productList();
|
|||
foreach ($vendorsCopy as $result) {
|
||||
$vendorName = strtolower($result['user_login']);
|
||||
if (
|
||||
strpos($vendorName,$_GET['search'])!==false
|
||||
strpos($vendorName,strtolower($_GET['search']))!==false
|
||||
) {
|
||||
$filteredProducts[] = $result;
|
||||
} else{
|
||||
|
@ -806,10 +810,17 @@ function validateEmail(vendorId) {
|
|||
<!-- Ec Pagination Start -->
|
||||
<div class="pagination mt-3">
|
||||
<?php
|
||||
for ($i = 1; $i <= $totalPages; $i++) {
|
||||
echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
|
||||
// for ($i = 1; $i <= $totalPages; $i++) {
|
||||
// echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
|
||||
// }
|
||||
|
||||
if ($totalVendors >= $vendorsPerPage) {
|
||||
for ($i = 1; $i <= $totalPages; $i++) {
|
||||
echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<!-- Ec Pagination End -->
|
||||
|
||||
|
|
7
cart.php
7
cart.php
|
@ -229,7 +229,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
?>
|
||||
|
||||
<tr id="cart_order_<?php echo $order['_id'] ?>">
|
||||
<td data-label="Product" class="ec-cart-pro-name"><a href="shop-left-sidebar-col-4.php"><img class="ec-cart-pro-img mr-4" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="" /><?php echo $order['items'][0]['product']['name']; ?></a></td>
|
||||
<td data-label="Product" class="ec-cart-pro-name"><a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>"><img class="ec-cart-pro-img mr-4" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="" /><?php echo $order['items'][0]['product']['name']; ?></a></td>
|
||||
<td data-label="Price" class="ec-cart-pro-price"><span class="amount"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-label="Quantity" class="ec-cart-pro-qty" style="text-align: center;">
|
||||
<div class="cart-qty-plus-minus2" style="width:100px; margin:auto;">
|
||||
|
@ -291,6 +291,11 @@ if ($_SESSION["userId"] <> "") {
|
|||
|
||||
} else {
|
||||
console.log('herreeeee')
|
||||
|
||||
var newQuantity = parseInt(qtyInputCart.value) + 1;
|
||||
qtyInput.value = newQuantity;
|
||||
qtyInputCart.value = newQuantity;
|
||||
|
||||
updateQuantityCart(orderId, itemId, newQuantity, isFloat);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -346,8 +346,8 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
|
|||
<div class="ec-page-description p-30">
|
||||
<h5 class="ec-desc-title">About Our Firm</h5>
|
||||
<!-- raymart replace the vendor descript march 8 2024 -->
|
||||
<?php if (!empty($vendorData['vendor_description'])): ?>
|
||||
<p><?php echo $vendorData['vendor_description']; ?></p>
|
||||
<?php if (!empty($vendor['vendor_description'])): ?>
|
||||
<p><?php echo $vendor['vendor_description']; ?></p>
|
||||
<?php else: ?>
|
||||
<p>No description available.</p>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -1151,11 +1151,9 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
|
|||
$freeShipping = true;
|
||||
}
|
||||
|
||||
// Set the shipping fee based on the condition
|
||||
$shippingFee = $freeShipping ? 0 : $checkout['shipping_fee'];
|
||||
|
||||
// Calculate total amount for each item
|
||||
$totalAmount += ($item['price'] + $shippingFee) * $item['quantity'];
|
||||
$totalAmount += ($item['price'] * $item['quantity']) + $shippingFee ;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -1288,6 +1286,30 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
|
|||
}
|
||||
} else if (pay2RadioButton.checked) {
|
||||
try {
|
||||
const selectedFName = document.getElementById('selectedFName').innerText;
|
||||
const selectedLName = document.getElementById('selectedLName').innerText;
|
||||
const selectedContact = document.getElementById('selectedContact').innerText;
|
||||
const sBuilding = document.getElementById('sBuilding').innerText;
|
||||
const sStreet = document.getElementById('sStreet').innerText;
|
||||
const sCity = document.getElementById('sCity').innerText;
|
||||
const sBarangay = document.getElementById('sBarangay').innerText;
|
||||
const sProvince = document.getElementById('sProvince').innerText;
|
||||
const sCountry = document.getElementById('sCountry').innerText;
|
||||
if (
|
||||
selectedFName.trim() === "" ||
|
||||
selectedLName.trim() === "" ||
|
||||
selectedContact.trim() === "" ||
|
||||
sBuilding.trim() === "" ||
|
||||
sStreet.trim() === "" ||
|
||||
sCity.trim() === "" ||
|
||||
sBarangay.trim() === "" ||
|
||||
sProvince.trim() === "" ||
|
||||
sCountry.trim() === ""
|
||||
) {
|
||||
alert("Please select address.");
|
||||
return;
|
||||
}
|
||||
|
||||
<?php foreach ($cartItems as $checkout) { ?>
|
||||
<?php foreach ($checkout['items'] as $item) { ?>
|
||||
itemNames.push("<?php echo str_replace('"', "\\'", $item['product']['name']) . ' (' . $item['quantity'] . ')'; ?>");
|
||||
|
@ -1335,15 +1357,15 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
|
|||
method: "PATCH",
|
||||
body: JSON.stringify({
|
||||
shipping_address: {
|
||||
shipping_first_name: document.getElementById('selectedFName').innerText,
|
||||
shipping_last_name: document.getElementById('selectedLName').innerText,
|
||||
shipping_phone: document.getElementById('selectedContact').innerText,
|
||||
shipping_address_1: document.getElementById('sBuilding').innerText,
|
||||
shipping_address_2: document.getElementById('sStreet').innerText,
|
||||
shipping_city: document.getElementById('sCity').innerText,
|
||||
shipping_barangay: document.getElementById('sBarangay').innerText,
|
||||
shipping_state: document.getElementById('sProvince').innerText,
|
||||
shipping_country: document.getElementById('sCountry').innerText,
|
||||
shipping_first_name: selectedFName,
|
||||
shipping_last_name: selectedLName,
|
||||
shipping_phone: selectedContact,
|
||||
shipping_address_1: sBuilding,
|
||||
shipping_address_2: sStreet,
|
||||
shipping_city: sCity,
|
||||
shipping_barangay: sBarangay,
|
||||
shipping_state: sProvince,
|
||||
shipping_country: sCountry,
|
||||
},
|
||||
billing_address: {
|
||||
billing_first_name: billingFName,
|
||||
|
@ -1367,8 +1389,6 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
|
|||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': "Bearer " + token,
|
||||
|
||||
// Add any additional headers as needed
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -1376,25 +1396,14 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
|
|||
throw new Error(`Error updating payment status: ${patchResponse.status} ${patchResponse.statusText}`);
|
||||
}
|
||||
})
|
||||
// Handle the result of the original POST request as needed
|
||||
console.log("COD Successfull")
|
||||
console.log("Payment Successfull")
|
||||
window.location.href = 'user-history.php';
|
||||
// console.log( <?php echo $filteredIdsJSON; ?>);
|
||||
|
||||
|
||||
// const patchResult = await patchResponse.json();
|
||||
// console.log(patchResult);
|
||||
|
||||
// Handle the result of the PATCH request as needed
|
||||
}
|
||||
|
||||
// Handle the result of the original POST request as needed
|
||||
// window.open(result.attributes.checkout_url);
|
||||
window.location.href = result.attributes.checkout_url;
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
// Handle errors
|
||||
}
|
||||
|
||||
} else if (pay3RadioButton.checked) {
|
||||
|
@ -1432,7 +1441,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
|
|||
sCountry.trim() === ""
|
||||
) {
|
||||
alert("Please select address.");
|
||||
return; // Stop further execution
|
||||
return;
|
||||
}
|
||||
newArray.forEach(async (orderId) => {
|
||||
console.log(orderId)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
|
||||
include "functions.php";
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
|
|
@ -162,10 +162,15 @@
|
|||
<div class="ec-login-form">
|
||||
<?php
|
||||
if (isset($_SESSION["forgotPasswordError"])) {
|
||||
echo '<div class="alert alert-danger" role="alert">';
|
||||
echo '<div class="alert alert-danger" id="alertDanger" style="background:#FFCCCB; role="alert">';
|
||||
echo $_SESSION["forgotPasswordError"];
|
||||
echo '</div>';
|
||||
unset($_SESSION["forgotPasswordError"]);
|
||||
echo " <script>
|
||||
setTimeout(function() {
|
||||
document.getElementById('alertDanger').style.display = 'none';
|
||||
}, 10000);
|
||||
</script>";
|
||||
}
|
||||
?>
|
||||
<form action="forgot_password_action.php" method="post">
|
||||
|
|
|
@ -51,7 +51,7 @@ function sddProducts()
|
|||
curl_close($curl);
|
||||
$json = json_decode($response, true);
|
||||
$products = array_filter($json, function ($var) {
|
||||
return ($var['promo'][0]['same-day-delivery'] === "Yes" && $var['product_type'] == '' || $var['promo'][0]['same-day-delivery'] === "Yes" && $var['product_type'] == 'simple' || $var['promo'][0]['same-day-delivery'] === "Yes" && $var['product_type'] == 'variable');
|
||||
return ($var['promo'][0]['next-day-delivery'] === "Yes" && $var['product_type'] == '' || $var['promo'][0]['next-day-delivery'] === "Yes" && $var['product_type'] == 'simple' || $var['promo'][0]['next-day-delivery'] === "Yes" && $var['product_type'] == 'variable');
|
||||
});
|
||||
$products = array_values($products);
|
||||
return $products;
|
||||
|
@ -1980,3 +1980,4 @@ function updatePayout($token, $payoutId)
|
|||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
|
64
header.php
64
header.php
|
@ -1,3 +1,15 @@
|
|||
<?php
|
||||
$_SESSION["url"] = $_SERVER['REQUEST_URI'];
|
||||
if ($_SESSION["userId"] <> "") {
|
||||
$_SESSION["isLoggedIn"] = true;
|
||||
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
// $customerData = json_decode($customer_data, true);
|
||||
|
||||
} else {
|
||||
$_SESSION["isLoggedIn"] = false;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php ?>
|
||||
<header class="ec-header">
|
||||
<style>
|
||||
|
@ -136,18 +148,25 @@
|
|||
</div>
|
||||
<!-- Header Top social End -->
|
||||
<!-- Header Top Message Start -->
|
||||
<div class="col text-center header-top-center">
|
||||
<!-- <div class="col text-center header-top-center">
|
||||
<div class="header-top-message text-upper">
|
||||
<span>Free Shipping</span>This Week Order Over - $75
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Header Top Message End -->
|
||||
<!-- Header Top Language Currency -->
|
||||
<div class="col header-top-right d-none d-lg-block">
|
||||
<div class="header-top-lan-curr d-flex justify-content-end">
|
||||
<!-- Download Modal -->
|
||||
<div class="header-top-download">
|
||||
<button class="text-upper" onclick="displayPopup()">Download App <i aria-hidden="true"></i></button>
|
||||
<!-- 04-01-2024 Stacy modified this block of code -->
|
||||
<!-- <button class="text-upper" onclick="displayPopup()">Download App <i aria-hidden="true"></i></button> -->
|
||||
<?php if(isset($customer_data)) { ?>
|
||||
<button style="cursor:default;">Hi <span class="text-upper"><?php echo $customer_data[0]['first_name'] ?>!</span></button>
|
||||
<?php } else { ?>
|
||||
<button class="text-upper"><a href="login.php">Login</a></button>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function displayPopup() {
|
||||
|
@ -242,7 +261,7 @@
|
|||
} else {
|
||||
?>
|
||||
<li><a class="dropdown-item" href="register.php">Register</a></li>
|
||||
<li><a class="dropdown-item" href="checkout.html">Checkout</a></li>
|
||||
<!-- <li><a class="dropdown-item" href="checkout.html">Checkout</a></li> -->
|
||||
<li><a class="dropdown-item" href="login.php">Login</a></li>
|
||||
<?php
|
||||
}
|
||||
|
@ -479,10 +498,25 @@
|
|||
function handleQtyInput(input, orderId, itemId, isFloat) {
|
||||
login(email, password, function(token) {
|
||||
var newQuantity = parseInt(input.value);
|
||||
updateQuantity(orderId, itemId, newQuantity, isFloat, token);
|
||||
if (newQuantity >= 1) {
|
||||
updateQuantity(orderId, itemId, newQuantity, isFloat, token);
|
||||
} else {
|
||||
input.value = 0;
|
||||
deleteOrder(orderId, itemId, 0, isFloat, token);
|
||||
// input.value = 1;
|
||||
// updateQuantity(orderId, itemId, 1, isFloat, token);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// function handleQtyInput(input, orderId, itemId, isFloat) {
|
||||
// login(email, password, function(token) {
|
||||
// var newQuantity = parseInt(input.value);
|
||||
// updateQuantity(orderId, itemId, newQuantity, isFloat, token);
|
||||
// })
|
||||
// }
|
||||
|
||||
function qtyIncrement(orderId, itemId, isFloat) {
|
||||
login(email, password, function(token) {
|
||||
var qtyInput = document.getElementById('qty-input-' + itemId);
|
||||
|
@ -497,13 +531,29 @@
|
|||
login(email, password, function(token) {
|
||||
var qtyInput = document.getElementById('qty-input-' + itemId);
|
||||
var newQuantity = parseInt(qtyInput.value) - 1;
|
||||
qtyInput.value = newQuantity;
|
||||
if (newQuantity >= 1) {
|
||||
qtyInput.value = newQuantity;
|
||||
updateQuantity(orderId, itemId, newQuantity, isFloat, token);
|
||||
} else {
|
||||
qtyInput.value = 0;
|
||||
deleteOrder(orderId, itemId, 0, isFloat, token);
|
||||
// qtyInput.value = 1;
|
||||
// updateQuantity(orderId, itemId, 1, isFloat, token);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// function qtyDecrement(orderId, itemId, isFloat) {
|
||||
// login(email, password, function(token) {
|
||||
// var qtyInput = document.getElementById('qty-input-' + itemId);
|
||||
// var newQuantity = parseInt(qtyInput.value) - 1;
|
||||
// qtyInput.value = newQuantity;
|
||||
// if (newQuantity >= 1) {
|
||||
// updateQuantity(orderId, itemId, newQuantity, isFloat, token);
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
function updateQuantity(orderId, itemId, newQuantity, isFloat, token) {
|
||||
console.log(isFloat)
|
||||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
|
@ -878,7 +928,7 @@
|
|||
<li><a href="privacy-policy.html">Privacy Policy</a></li>
|
||||
</ul> -->
|
||||
</li>
|
||||
<li class="dropdown"><span class="main-label-note-new" data-toggle="tooltip" title="NEW"></span><a href="same_day_delivery.php">Next-Day-Delivery</a>
|
||||
<li class="dropdown"><span class="main-label-note-new" data-toggle="tooltip" title="NEW"></span><a href="next_day_delivery.php">Next-Day-Delivery</a>
|
||||
<!-- <ul class="sub-menu">
|
||||
<li class="dropdown position-static"><a href="javascript:void(0)">Mail
|
||||
Confirmation
|
||||
|
|
32
index.php
32
index.php
|
@ -242,7 +242,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
} else {
|
||||
?>
|
||||
<img class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
|
||||
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -362,7 +362,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
} else {
|
||||
?>
|
||||
<img class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
|
||||
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -484,7 +484,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
} else {
|
||||
?>
|
||||
<img class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
|
||||
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -604,7 +604,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
} else {
|
||||
?>
|
||||
<img class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
|
||||
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -1054,7 +1054,25 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div class="ec-vendor-card">
|
||||
<div class="ec-vendor-detail">
|
||||
<div class="ec-vendor-avtar" style="width: 75px; height: 75px; overflow: hidden;">
|
||||
<img src="<?php echo $vendor['vendor_image']; ?>" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;">
|
||||
<?php
|
||||
if (isset($vendor['vendor_image'])) {
|
||||
$image_urls = explode(',', $vendor['vendor_image']);
|
||||
if (!empty($image_urls)) {
|
||||
$first_image_url = trim($image_urls[0]);
|
||||
?>
|
||||
<img src="<?php echo $vendor['vendor_image']; ?>" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" />
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<img alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!-- <img src="<?php echo $vendor['vendor_image']; ?>" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;"> -->
|
||||
|
||||
<!-- <img alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" /> -->
|
||||
|
||||
</div>
|
||||
<div class="ec-vendor-info">
|
||||
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>" class="name"><?php echo $vendor['user_login'] ?></a>
|
||||
|
@ -1229,7 +1247,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
} else {
|
||||
?>
|
||||
<img class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
|
||||
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -1244,7 +1262,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<?php if (isset($newArrival[$pid]["sale_price"]) && $newArrival[$pid]["sale_price"] > 0) : ?>
|
||||
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($newArrival[$pid]), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($newArrival[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
|
||||
|
||||
|
||||
<?php elseif (isset($newArrival[$pid]["regular_price"]) && $newArrival[$pid]["regular_price"] != "") : ?>
|
||||
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($newArrival[$pid]), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($newArrival[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
|
||||
|
|
14
login.php
14
login.php
|
@ -162,12 +162,16 @@
|
|||
<div class="ec-login-wrapper">
|
||||
<div class="ec-login-container">
|
||||
<div class="ec-login-form">
|
||||
|
||||
<?php
|
||||
if (isset($_SESSION["loginError"])) {
|
||||
echo '<div class="alert alert-danger" role="alert">';
|
||||
echo $_SESSION["loginError"];
|
||||
echo '</div>';
|
||||
unset($_SESSION["loginError"]);
|
||||
session_start();
|
||||
if(isset($_GET["error"]) && $_GET["error"] == 1) {
|
||||
echo "<div class='alert alert-danger' style='background:#FFCCCB;' id='alertDanger' role='alert'>Login failed. Please try again.</div>";
|
||||
echo " <script>
|
||||
setTimeout(function() {
|
||||
document.getElementById('alertDanger').style.display = 'none';
|
||||
}, 10000);
|
||||
</script>";
|
||||
}
|
||||
?>
|
||||
<form action="login_action.php" method="post">
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
}
|
||||
header("location: $url");
|
||||
} else {
|
||||
$_SESSION["loginError"] = "Invalid email or password. Please try again.";
|
||||
header("location: login.php");
|
||||
// $_SESSION["loginError"] = "Invalid email or password. Please try again.";
|
||||
header("location: login.php?error=1");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -211,17 +211,17 @@ if ($_SESSION["userId"] <> "") {
|
|||
$vendorOfProduct = getVendorbyId($simpleProducts[$pid]['vendor_api_id']);
|
||||
?>
|
||||
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 pro-gl-content">
|
||||
<div class="ec-product-inner">
|
||||
<div class="ec-product-inner" style="width: 260px;">
|
||||
<div class="ec-pro-image-outer">
|
||||
<div class="ec-pro-image">
|
||||
<a href="shop-left-sidebar-col-4.php" class="image">
|
||||
<a href="product-left-sidebar.php?id=<?php echo $simpleProducts[$pid]["_id"]; ?>" >
|
||||
<?php
|
||||
if (isset($simpleProducts[$pid]['images'])) {
|
||||
$image_urls = explode(',', $simpleProducts[$pid]['images']);
|
||||
if (!empty($image_urls)) {
|
||||
$first_image_url = trim($image_urls[0]);
|
||||
?>
|
||||
<img class="ec-image-preview" src="<?php echo $first_image_url; ?>" alt="edit" />
|
||||
<img class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px; width: 100%;"/>
|
||||
<?php
|
||||
}
|
||||
} else {
|
|
@ -44,12 +44,12 @@
|
|||
list-style-type: square;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .table-of-cotents ol {
|
||||
.ec-common-wrapper .table-of-contents ol {
|
||||
list-style-type: square;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .table-of-cotents li {
|
||||
.ec-common-wrapper .table-of-contents li {
|
||||
margin-bottom: 0.5rem;
|
||||
list-style-type: square;
|
||||
}
|
||||
|
@ -66,13 +66,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header start -->
|
||||
<?php include "header.php" ?>
|
||||
<!-- Header End -->
|
||||
<!-- Header start -->
|
||||
<?php include "header.php" ?>
|
||||
<!-- Header End -->
|
||||
|
||||
<!-- ekka Cart Start -->
|
||||
<!-- ekka Cart Start -->
|
||||
|
||||
<!-- ekka Cart End -->
|
||||
<!-- ekka Cart End -->
|
||||
|
||||
<!-- Ec breadcrumb start -->
|
||||
<div class="sticky-header-next-sec ec-breadcrumb section-space-mb">
|
||||
|
@ -104,8 +104,8 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<div class="section-title">
|
||||
<h2 class="ec-bg-title">Privacy & Policy</h2>
|
||||
<h2 class="ec-title">Privacy & Policy</h2>
|
||||
<h2 class="ec-bg-title">PRIVACY & POLICY</h2>
|
||||
<h2 class="ec-title">PRIVACY & POLICY</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
@ -149,7 +149,7 @@
|
|||
<p>Want to learn more about what we do with any information we collect? Review the privacy notice in full.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 ec-cms-block table-of-cotents">
|
||||
<div class="col-sm-12 ec-cms-block table-of-contents">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">TABLE OF CONTENTS</h3>
|
||||
<ol>
|
||||
|
|
|
@ -374,15 +374,14 @@ if (isset($_GET['id'])) {
|
|||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="ec-single-price-stoke">
|
||||
<div class="ec-single-price">
|
||||
<span class="ec-single-ps-title">As low as</span>
|
||||
<?php
|
||||
// 02-13-24 Jun Jihad Removed Logic to DIsplay Price Range of Variable Products
|
||||
if (isset($product_details['sale_price']) && $product_details['sale_price'] > 0) {
|
||||
echo '<s><span id="productPrice" class="old-price">₱' . $product_details['regular_price'] . '</span></s>';
|
||||
echo '<span id="productNewPrice" class="new-price">₱' . $product_details['sale_price'] . '</span>';
|
||||
echo '<s><span id="productPrice" class="old-price">' . $product_details['regular_price'] . '</span></s>';
|
||||
echo '<span id="productNewPrice" class="new-price">' . $product_details['sale_price'] . '</span>';
|
||||
} elseif (!isset($product_details['regular_price']) || $product_details['regular_price'] <= 0) {
|
||||
echo '<span id="productPrice" class="new-price">Contact Seller for Price</span>';
|
||||
} else {
|
||||
|
@ -763,6 +762,7 @@ if (isset($_GET['id'])) {
|
|||
console.log("Button clicked");
|
||||
|
||||
login(email, password, function(token) {
|
||||
var priceMatrix = <?php echo (!empty($product_details['price_matrix'])) ? json_encode($product_details['price_matrix']) : "[]"; ?>;
|
||||
var quantityValue = document.getElementById("qty-input").value;
|
||||
var minimumOrder = <?php echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1"; ?>;
|
||||
var shippingFee = "<?php echo isset($product_details['shipping_fee']) && $product_details['shipping_fee'] !== '' ? $product_details['shipping_fee'] : '50'; ?>";
|
||||
|
@ -771,19 +771,42 @@ if (isset($_GET['id'])) {
|
|||
alert("The minimum order quantity is " + minimumOrder);
|
||||
}
|
||||
|
||||
// April 3, 2024 Jun Jihad Apply Matrix
|
||||
var productPrice;
|
||||
var foundPrice = false;
|
||||
|
||||
if (priceMatrix.length > 0) {
|
||||
for (var i = 0; i < priceMatrix.length; i++) {
|
||||
for (var j = 0; j < priceMatrix[i].length; j++) {
|
||||
if (quantityValue <= parseInt(priceMatrix[i][j].quantity)) {
|
||||
productPrice = parseFloat(priceMatrix[i][j].price);
|
||||
foundPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundPrice) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundPrice) {
|
||||
productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice").innerText);
|
||||
}
|
||||
var productData = {
|
||||
product: {
|
||||
product_image: document.getElementById("mainProductImage").getAttribute('src'),
|
||||
product_id: document.getElementById("product_Id").value,
|
||||
name: document.getElementById("productTitle").innerText,
|
||||
},
|
||||
price: document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice").innerText,
|
||||
price: productPrice,
|
||||
quantity: quantityValue,
|
||||
vendor_id: "<?php echo $vendor_details['_id'] ?>",
|
||||
vendor_name: "<?php echo $vendor_details['user_login'] ?>",
|
||||
};
|
||||
// April 3, 2024 Jun Jihad Apply Matrix
|
||||
|
||||
console.log("Product data:", productData); // Debugging statement
|
||||
console.log("Product data:", productData);
|
||||
|
||||
var totalAmount = productData.price * productData.quantity;
|
||||
|
||||
|
@ -793,7 +816,7 @@ if (isset($_GET['id'])) {
|
|||
name: "<?php echo $customer['first_name']; ?> <?php echo $customer['last_name']; ?>",
|
||||
};
|
||||
|
||||
console.log("Customer data:", customerData); // Debugging statement
|
||||
console.log("Customer data:", customerData);
|
||||
|
||||
// Check if the product is already in the order API
|
||||
var existingOrder;
|
||||
|
@ -842,7 +865,7 @@ if (isset($_GET['id'])) {
|
|||
shipping_fee: shippingFee,
|
||||
};
|
||||
|
||||
console.log("Request data:", requestData); // Debugging statement
|
||||
console.log("Request data:", requestData);
|
||||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
xhr.open("POST", "https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders", true);
|
||||
xhr.setRequestHeader("Content-Type", "application/json", );
|
||||
|
@ -852,7 +875,7 @@ if (isset($_GET['id'])) {
|
|||
if (xhr.status === 201) {
|
||||
var response = JSON.parse(xhr.responseText);
|
||||
|
||||
console.log("Response:", response); // Debugging statement
|
||||
console.log("Response:", response);
|
||||
|
||||
// Update the cart dynamically
|
||||
var cartList = document.querySelector(".eccart-pro-items");
|
||||
|
@ -922,24 +945,24 @@ if (isset($_GET['id'])) {
|
|||
}
|
||||
|
||||
function updateOrder(orderId, existingItemId) {
|
||||
var updateOrderXhr = new XMLHttpRequest();
|
||||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
updateOrderXhr.open("PUT", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}/items/${existingItemId}`, true);
|
||||
updateOrderXhr.setRequestHeader("Content-Type", "application/json");
|
||||
updateOrderXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
updateOrderXhr.onreadystatechange = function() {
|
||||
if (updateOrderXhr.readyState === 4) {
|
||||
if (updateOrderXhr.status === 200) {
|
||||
var response = JSON.parse(updateOrderXhr.responseText);
|
||||
console.log("Order updated:", response);
|
||||
var updateOrderXhr = new XMLHttpRequest();
|
||||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
updateOrderXhr.open("PUT", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}/items/${existingItemId}`, true);
|
||||
updateOrderXhr.setRequestHeader("Content-Type", "application/json");
|
||||
updateOrderXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
updateOrderXhr.onreadystatechange = function() {
|
||||
if (updateOrderXhr.readyState === 4) {
|
||||
if (updateOrderXhr.status === 200) {
|
||||
var response = JSON.parse(updateOrderXhr.responseText);
|
||||
console.log("Order updated:", response);
|
||||
|
||||
var cartItem = document.getElementById(`order_${response._id}`);
|
||||
var cartItem = document.getElementById(`order_${response._id}`);
|
||||
|
||||
if (cartItem) {
|
||||
var updatedQuantity = response.items[0].quantity; // Use the correct quantity from the updated order
|
||||
var totalAmount = response.items[0].price * updatedQuantity;
|
||||
// If the cart item already exists, update its content using innerHTML
|
||||
cartItem.innerHTML = `
|
||||
if (cartItem) {
|
||||
var updatedQuantity = response.items[0].quantity;
|
||||
var totalAmount = response.items[0].price * updatedQuantity;
|
||||
// If the cart item already exists, update its content using innerHTML
|
||||
cartItem.innerHTML = `
|
||||
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img">
|
||||
<img src="${response.items[0].product.product_image}" alt="product">
|
||||
</a>
|
||||
|
@ -957,50 +980,74 @@ if (isset($_GET['id'])) {
|
|||
<a href="#" class="removeCart" onclick="deleteOrder('${response._id}')">x</a>
|
||||
</div>
|
||||
`;
|
||||
document.getElementById(`qty-input-${response.items[0]._id}`).value = updatedQuantity;
|
||||
} else {
|
||||
// If the cart item doesn't exist, create a new one
|
||||
console.log("Error updating order:", updateOrderXhr.responseText);
|
||||
}
|
||||
document.getElementById(`qty-input-${response.items[0]._id}`).value = updatedQuantity;
|
||||
} else {
|
||||
// If the cart item doesn't exist, create a new one
|
||||
console.log("Error updating order:", updateOrderXhr.responseText);
|
||||
}
|
||||
|
||||
getLatestOrders();
|
||||
updateCartItemCount();
|
||||
document.getElementById("addToCartMessage").innerText = "Product added to cart!";
|
||||
setTimeout(function() {
|
||||
document.getElementById("addToCartMessage").innerText = "";
|
||||
}, 1000);
|
||||
} else {
|
||||
// Handle error response from the server
|
||||
console.log("Error response from the server");
|
||||
console.log(xhr.responseText); // Log the server's response
|
||||
}
|
||||
}
|
||||
};
|
||||
var existingQuantity = parseInt(existingOrder.items[0].quantity, 10);
|
||||
var newQuantity = parseInt(quantityValue, 10);
|
||||
var updatedQuantity = existingQuantity + newQuantity;
|
||||
getLatestOrders();
|
||||
updateCartItemCount();
|
||||
document.getElementById("addToCartMessage").innerText = "Product added to cart!";
|
||||
setTimeout(function() {
|
||||
document.getElementById("addToCartMessage").innerText = "";
|
||||
}, 1000);
|
||||
} else {
|
||||
// Handle error response from the server
|
||||
console.log("Error response from the server");
|
||||
console.log(xhr.responseText); // Log the server's response
|
||||
}
|
||||
}
|
||||
};
|
||||
var existingQuantity = parseInt(existingOrder.items[0].quantity, 10);
|
||||
var newQuantity = parseInt(quantityValue, 10);
|
||||
var updatedQuantity = existingQuantity + newQuantity;
|
||||
|
||||
var updateData = {
|
||||
quantity: updatedQuantity,
|
||||
};
|
||||
// Check if the updated quantity exceeds the previous price matrix
|
||||
var newProductPrice = productPrice; // Assume the initial productPrice
|
||||
var foundNewPrice = false;
|
||||
if (priceMatrix.length > 0) {
|
||||
for (var i = 0; i < priceMatrix.length; i++) {
|
||||
for (var j = 0; j < priceMatrix[i].length; j++) {
|
||||
if (updatedQuantity <= parseInt(priceMatrix[i][j].quantity)) {
|
||||
newProductPrice = parseFloat(priceMatrix[i][j].price);
|
||||
foundNewPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundNewPrice) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateOrderXhr.send(JSON.stringify(updateData));
|
||||
// Update product price if a new price is found in the price matrix
|
||||
if (foundNewPrice) {
|
||||
productPrice = newProductPrice;
|
||||
}
|
||||
|
||||
var patchTotalAmountXhr = new XMLHttpRequest();
|
||||
patchTotalAmountXhr.open("PATCH", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, true);
|
||||
patchTotalAmountXhr.setRequestHeader("Content-Type", "application/json");
|
||||
patchTotalAmountXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
var updateData = {
|
||||
quantity: updatedQuantity,
|
||||
price: productPrice // Update the price for the item
|
||||
};
|
||||
|
||||
var originalPrice = document.getElementById("productPrice").innerText;
|
||||
var totalAmount = originalPrice * updatedQuantity;
|
||||
console.log(originalPrice);
|
||||
console.log(totalAmount);
|
||||
var patchData = {
|
||||
total_amount: totalAmount
|
||||
};
|
||||
updateOrderXhr.send(JSON.stringify(updateData));
|
||||
|
||||
patchTotalAmountXhr.send(JSON.stringify(patchData));
|
||||
}
|
||||
var patchTotalAmountXhr = new XMLHttpRequest();
|
||||
patchTotalAmountXhr.open("PATCH", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, true);
|
||||
patchTotalAmountXhr.setRequestHeader("Content-Type", "application/json");
|
||||
patchTotalAmountXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
|
||||
var originalPrice = document.getElementById("productPrice").innerText;
|
||||
var totalAmount = originalPrice * updatedQuantity;
|
||||
console.log(originalPrice);
|
||||
console.log(totalAmount);
|
||||
var patchData = {
|
||||
total_amount: totalAmount
|
||||
};
|
||||
|
||||
patchTotalAmountXhr.send(JSON.stringify(patchData));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
|
||||
<style>
|
||||
ol {
|
||||
/* ol {
|
||||
padding-left: 2rem;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
|
@ -44,7 +44,27 @@
|
|||
li a {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
} */
|
||||
|
||||
.ec-common-wrapper .ec-cms-block-inner ul {
|
||||
list-style-type: square;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .ec-cms-block-inner li {
|
||||
margin-bottom: 0.5rem;
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .table-of-contents ol {
|
||||
list-style-type: square;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .table-of-contents li {
|
||||
margin-bottom: 0.5rem;
|
||||
list-style-type: square;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -109,27 +129,27 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 ec-cms-block">
|
||||
<div class="col-sm-12 ec-cms-block table-of-contents">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Content</h3>
|
||||
<h3 class="ec-cms-block-title">TABLE OF CONTENTS</h3>
|
||||
<ol>
|
||||
<li><a href="#prescription">Prescription Drugs and Pharmaceuticals</a></li>
|
||||
<li><a href="#firearms">Firearms and Ammunition</a></li>
|
||||
<li><a href="#tobacco">Tobacco and Tobacco Products</a></li>
|
||||
<li><a href="#alcohol">Alcoholic Beverages</a></li>
|
||||
<li><a href="#counterfeit">Counterfeit Goods</a></li>
|
||||
<li><a href="#explosives">Explosives and Hazardous Materials</a></li>
|
||||
<li><a href="#narcotics">Illegal Drugs and Narcotics</a></li>
|
||||
<li><a href="#wildlife">Endangered Species and Wildlife Products</a></li>
|
||||
<li><a href="#fire">Pyrotechnic Devices</a></li>
|
||||
<li><a href="#gambling">Gambling Services</a></li>
|
||||
<li><a href="#prescription">PRESCRIPTION DRUGS AND PHARMACEUTICALS</a></li>
|
||||
<li><a href="#firearms">FIREARMS AND AMMUNITION</a></li>
|
||||
<li><a href="#tobacco">TOBACCO AND TOBACCO PRODUCTS</a></li>
|
||||
<li><a href="#alcohol">ALCOHOLIC BEVERAGES</a></li>
|
||||
<li><a href="#counterfeit">COUNTERFEIT GOODS</a></li>
|
||||
<li><a href="#explosives">EXPLOSIVES AND HAZARDOUS MATERIALS</a></li>
|
||||
<li><a href="#narcotics">ILLEGAL DRUGS AND NARCOTICS</a></li>
|
||||
<li><a href="#wildlife">ENDANGERED SPECIES AND WILDLIFE PRODUCTS</a></li>
|
||||
<li><a href="#fire">PYROTECHNIC DEVICES</a></li>
|
||||
<li><a href="#gambling">GAMBLING SERVICES</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="col-sm-12 ec-cms-block" id="prescription">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Prescription Drugs and Pharmaceuticals:</h3>
|
||||
<h3 class="ec-cms-block-title">PRESCRIPTION DRUGS AND PHARMACEUTICALS:</h3>
|
||||
<p>Prohibited to be sold online without proper authorization.</p>
|
||||
<p><b>Penalties:</b> Permanent ban, fines, imprisonment, and revocation of licenses for sellers found violating
|
||||
regulations set by the Food and Drug Administration (FDA).</p>
|
||||
|
@ -137,7 +157,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="firearms">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Firearms and Ammunition:</h3>
|
||||
<h3 class="ec-cms-block-title">FIREARMS AND AMMUNITION:</h3>
|
||||
<p>Strict regulations govern the sale of firearms and ammunition. <br>
|
||||
Prohibited to be sold online without proper permits and licenses.
|
||||
</p>
|
||||
|
@ -147,7 +167,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="tobacco">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Tobacco and Tobacco Products:</h3>
|
||||
<h3 class="ec-cms-block-title">TOBACCO AND TOBACCO PRODUCTS:</h3>
|
||||
<p>Sale of tobacco products to minors is strictly prohibited. <br>
|
||||
Prohibited to be sold online to minors and without proper health warnings and taxation.
|
||||
</p>
|
||||
|
@ -157,7 +177,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="alcohol">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Alcoholic Beverages:</h3>
|
||||
<h3 class="ec-cms-block-title">ALCOHOLIC BEVERAGES:</h3>
|
||||
<p>Sale of alcoholic beverages to minors is strictly prohibited. <br>
|
||||
Prohibited to be sold online without proper permits and age verification mechanisms.
|
||||
</p>
|
||||
|
@ -167,7 +187,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="counterfeit">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Counterfeit Goods:</h3>
|
||||
<h3 class="ec-cms-block-title">COUNTERFEIT GOODS:</h3>
|
||||
<p>Sale of counterfeit products, including branded goods, is illegal. <br>
|
||||
Prohibited to be sold online to prevent intellectual property infringement
|
||||
</p>
|
||||
|
@ -177,7 +197,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="explosives">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Explosives and Hazardous Materials:</h3>
|
||||
<h3 class="ec-cms-block-title">EXPLOSIVES AND HAZARDOUS MATERIALS:</h3>
|
||||
<p>Strict regulations govern the sale and transportation of explosives and hazardous materials. <br>
|
||||
Prohibited to be sold online without proper permits and safety protocols.
|
||||
</p>
|
||||
|
@ -187,7 +207,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="narcotics">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Illegal Drugs and Narcotics:</h3>
|
||||
<h3 class="ec-cms-block-title">ILLEGAL DRUGS AND NARCOTICS:</h3>
|
||||
<p>Sale of illegal drugs and narcotics is strictly prohibited. <br>
|
||||
Prohibited to be sold online under any circumstances.
|
||||
</p>
|
||||
|
@ -196,7 +216,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="wildlife">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Endangered Species and Wildlife Products:</h3>
|
||||
<h3 class="ec-cms-block-title">ENDANGERED SPECIES AND WILDLIFE PRODUCTS:</h3>
|
||||
<p>Sale of products derived from endangered species and wildlife is illegal. <br>
|
||||
Prohibited to be sold online to prevent wildlife trafficking and protect biodiversity.
|
||||
</p>
|
||||
|
@ -206,7 +226,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="fire">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Pyrotechnic Devices:</h3>
|
||||
<h3 class="ec-cms-block-title">PYROTECHNIC DEVICES:</h3>
|
||||
<p>Sale and use of pyrotechnic devices are regulated, especially during festivities. <br>
|
||||
Prohibited to be sold online without proper permits and safety measures.
|
||||
</p>
|
||||
|
@ -216,7 +236,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="gambling">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Gambling Services:</h3>
|
||||
<h3 class="ec-cms-block-title">GAMBLING SERVICES:</h3>
|
||||
<p>Sale of unauthorized gambling services and products is illegal. <br>
|
||||
Prohibited to be sold online without proper licenses and permits. <br>
|
||||
</p>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
|
||||
<style>
|
||||
ol {
|
||||
/* ol {
|
||||
padding-left: 2rem;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
|
@ -44,7 +44,27 @@
|
|||
li a {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
} */
|
||||
|
||||
.ec-common-wrapper .ec-cms-block-inner ul {
|
||||
list-style-type: square;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .ec-cms-block-inner li {
|
||||
margin-bottom: 0.5rem;
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .table-of-contents ol {
|
||||
list-style-type: square;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.ec-common-wrapper .table-of-contents li {
|
||||
margin-bottom: 0.5rem;
|
||||
list-style-type: square;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -111,31 +131,31 @@
|
|||
not agree with these Terms of Use please do not use the Website.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 ec-cms-block">
|
||||
<div class="col-sm-12 ec-cms-block table-of-contents">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Content</h3>
|
||||
<h3 class="ec-cms-block-title">TABLE OF CONTENTS</h3>
|
||||
<ol>
|
||||
<li><a href="#right-to-use-site-content">Right to Use Site Content</a></li>
|
||||
<li><a href="#changes-to-the-website">Changes to the Website and Terms of Use</a></li>
|
||||
<li><a href="#intellectual-property-rights">Intellectual Property Rights</a></li>
|
||||
<li><a href="#copyright-complaints">Copyright Complaints</a></li>
|
||||
<li><a href="#interactive-forums">Interactive Forums and Groups and Feedback</a></li>
|
||||
<li><a href="#merchants-and-merchant-offers">Merchants and Merchant Offers</a></li>
|
||||
<li><a href="#sweepstakes">Sweepstakes</a></li>
|
||||
<li><a href="#third-party-content">Third Party Content and Links to Other Web Sites</a></li>
|
||||
<li><a href="#privacy-policy">Privacy Policy</a></li>
|
||||
<li><a href="#indemnification">Indemnification</a></li>
|
||||
<li><a href="#disclaimer-of-warranties">Disclaimer of Warranties</a></li>
|
||||
<li><a href="#disclaimer-of-damages">Disclaimer of Damages and Limitation of Liability</a></li>
|
||||
<li><a href="#miscellaneous">Miscellaneous</a></li>
|
||||
<li><a href="#customer-service">Customer Service and Contact information</a></li>
|
||||
<li><a href="#right-to-use-site-content">RIGHT TO USE SITE CONTENT</a></li>
|
||||
<li><a href="#changes-to-the-website">CHANGES TO THE WEBSITE AND TERMS OF USE</a></li>
|
||||
<li><a href="#intellectual-property-rights">INTELLECTUAL PROPERTY RIGHTS</a></li>
|
||||
<li><a href="#copyright-complaints">COPYRIGHT COMPLAINTS</a></li>
|
||||
<li><a href="#interactive-forums">INTERACTIVE FORUMS AND GROUPS AND FEEDBACK</a></li>
|
||||
<li><a href="#merchants-and-merchant-offers">MERCHANTS AND MERCHANT OFFERS</a></li>
|
||||
<li><a href="#sweepstakes">SWEEPSTAKES</a></li>
|
||||
<li><a href="#third-party-content">THIRD PARTY CONTENT AND LINKS TO OTHER WEB SITES</a></li>
|
||||
<li><a href="#privacy-policy">PRIVACY POLICY</a></li>
|
||||
<li><a href="#indemnification">INDEMNIFICATION</a></li>
|
||||
<li><a href="#disclaimer-of-warranties">DISCLAIMER OF WARRANTIES</a></li>
|
||||
<li><a href="#disclaimer-of-damages">DISCLAIMER OF DAMAGES AND LIMITATION OF LIABILITY</a></li>
|
||||
<li><a href="#miscellaneous">MISCELLANEOUS</a></li>
|
||||
<li><a href="#customer-service">CUSTOMER SERVICE AND CONTACT INFORMATION</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="col-sm-12 ec-cms-block" id="right-to-use-site-content">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Right to Use Site Content</h3>
|
||||
<h3 class="ec-cms-block-title">RIGHT TO USE SITE CONTENT</h3>
|
||||
<p>The Company grants you a limited, nonexclusive, revocable license for you to view, share, print, or download any Content,
|
||||
as defined below, from the Website for your own personal use. You are not granted the right to license, republish, distribute,
|
||||
copy, assign, sublicense, transfer, sell, prepare derivative works or other non-personal use of any Content on the Website. No
|
||||
|
@ -155,7 +175,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="changes-to-the-website">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Changes to the Website and Terms of Use</h3>
|
||||
<h3 class="ec-cms-block-title">CHANGES TO THE WEBSITE AND TERMS OF USE</h3>
|
||||
<p>The Company reserves the right to change or modify Content, materials, or information appearing on or in connection with the
|
||||
Website, including the Terms of Use, at any time without notice to you. The Company may at any time revise these Terms of Use
|
||||
by updating this posting. You are bound by such revisions and should therefore visit these pages to review the current Terms of
|
||||
|
@ -164,7 +184,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="intellectual-property-rights">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Intellectual Property Rights</h3>
|
||||
<h3 class="ec-cms-block-title">INTELLECTUAL PROPERTY RIGHTS</h3>
|
||||
<p>The Website Content is protected by applicable intellectual property laws and all Content is owned by the Company or used by the
|
||||
Company under a license or with permission. All text, formatting (including without limitation the selection, coordination and
|
||||
arrangement of materials on the Website), images, graphics, animation, tools, widgets, applications, commercials, videos, music,
|
||||
|
@ -185,7 +205,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="copyright-complaints">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Copyright Complaints</h3>
|
||||
<h3 class="ec-cms-block-title">COPYRIGHT COMPLAINTS</h3>
|
||||
<p>In operating the Website the Company may act as a services provider and offer services as online provider of materials and links to
|
||||
third party web sites. As a result, third party materials that the Company does not own or control may be transmitted, stored, accessed
|
||||
or otherwise made available using the Website. The Company has in place procedures regarding allegations of copyright infringement occurring
|
||||
|
@ -222,7 +242,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="interactive-forums">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Interactive Forums and Groups and Feedback</h3>
|
||||
<h3 class="ec-cms-block-title">INTERACTIVE FORUMS AND GROUPS AND FEEDBACK</h3>
|
||||
<b>User Submissions and Conduct</b>
|
||||
<p>As a user of the Website you may submit your comments, which may consist of textual content and potentially photos, videos, images audio files, other types of
|
||||
content and links to such content if allowed by the Website (collectively referred to as “User Submissions”). You will be solely responsible for your own User
|
||||
|
@ -275,7 +295,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="merchants-and-merchant-offers">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Merchant and Merchants Offers</h3>
|
||||
<h3 class="ec-cms-block-title">MERCHANTS AND MERCHANT OFFERS</h3>
|
||||
<p>Merchants may provide to the Company certain discounts, rebates, or other benefits (e.g. free shipping) on the purchases of goods and services (“Offers”) that may be available on the
|
||||
Website. Such Offers are subject to certain terms and conditions and may change at any time without notice to you. The Company will not be liable for any loss or damage incurred as
|
||||
a result of any interaction between you and a merchant with respect to such Offers. Except as set forth herein all matters, including but not limited to delivery of goods and services,
|
||||
|
@ -285,14 +305,14 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="sweepstakes">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Sweepstakes</h3>
|
||||
<h3 class="ec-cms-block-title">SWEEPSTAKES</h3>
|
||||
<p>From time to time, We make you aware of certain Company related sweepstakes or other promotions. All such sweepstakes and promotions are subject to the official rules for such sweepstakes
|
||||
and promotions and all related applicable laws, regulations, and statutes.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="third-party-content">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Third-Party Content and Links to Other Web Sites</h3>
|
||||
<h3 class="ec-cms-block-title">THIRD PARTY CONTENT AND LINKS TO OTHER WEB SITES</h3>
|
||||
<p>The Website may contain third-party content and links to other websites that are completely independent of this Website. Third-party content and links are included solely for the convenience
|
||||
of users and do not constitute any approval, endorsement, or warranty by the Company. Moreover, the Company is not responsible for the accuracy, completeness, or reliability of third-party
|
||||
information, or the products or services offered or sold through any linked website and you assume sole responsibility for the use of third-party information. Any agreements, transactions,
|
||||
|
@ -303,14 +323,14 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="privacy-policy">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Privacy Policy</h3>
|
||||
<h3 class="ec-cms-block-title">PRIVACY POLICY</h3>
|
||||
<p>The Company recognizes the importance of respecting the privacy of those who visit and choose to take advantage of the programs and information offered on the Website. The Company’s Privacy Policy
|
||||
(available here: <a href="privacy-policy.php"><b>Privacy & Policy</b></a>) provides an overview of what you can expect when you enroll in one of our programs or simply browse the Website.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="indemnification">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Indemnification</h3>
|
||||
<h3 class="ec-cms-block-title">INDEMNIFICATION</h3>
|
||||
<p>You agree to indemnify, defend and hold the Company and its business partners, staff, and affiliates harmless from any liability, loss, claim, and expense, including reasonable attorneys’ fees and
|
||||
expenses, related to either your violation of these Terms of Use or your use of the Website. You will indemnify and hold the Company harmless from and against any claim, suit, or proceeding brought
|
||||
against the Company arising from or in connection with violations of copyright or other intellectual property or other rights of third parties contained in your User Submissions and/or any other
|
||||
|
@ -320,7 +340,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="disclaimer-of-warranties">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Disclaimer of Warranties</h3>
|
||||
<h3 class="ec-cms-block-title">DISCLAIMER OF WARRANTIES</h3>
|
||||
<p>While the Company will use reasonable efforts to ensure that all material on the Website is correct; however, accuracy cannot be guaranteed and the Company does not assume any responsibility or liability
|
||||
for the accuracy, completeness, or authenticity of any information contained in the Website.</p>
|
||||
<p>The Website and all content contained herein are provided to you “As is” and “As available” and all warranties, express or implied, are hereby disclaimed, including any warranty of merchantability,
|
||||
|
@ -334,7 +354,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="disclaimer-of-damages">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Disclaimer of Damages and Limitation of Liability</h3>
|
||||
<h3 class="ec-cms-block-title">DISCLAIMER OF DAMAGES AND LIMITATION OF LIABILITY</h3>
|
||||
<p>In no event will the Company or its affiliates be liable for any direct, indirect, special, punitive, exemplary, consequential, or other damages whatsoever, including but not limited to property damage, loss of
|
||||
use, loss of business, economic loss, loss of data or loss of profits, without regard to the form of action (including but not limited to contract, negligence, or other tortious actions) arising out of or in
|
||||
connection with your use or access of the Website or its content, even if the Company or its business partners, employees, representatives or affiliates have been advised of the possibility of such damage or
|
||||
|
@ -345,7 +365,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="miscellaneous">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Miscellaneous</h3>
|
||||
<h3 class="ec-cms-block-title">MISCELLANEOUS</h3>
|
||||
<p>These Terms of Use will be construed, interpreted, and performed exclusively according to the laws of the Philippines, without giving effect to any principles of conflicts of law. You expressly agree that any action
|
||||
at law or in equity arising out of or directly or indirectly relating to these Terms of Use or the Website will be filed only in Philippine courts. You hereby consent and submit to the personal jurisdiction of such
|
||||
courts for the purposes of any action related to the Website, your access or use thereof, or these Terms of Use, and to extra-territorial service of process.</p>
|
||||
|
@ -361,7 +381,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12 ec-cms-block" id="customer-service">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">Customer Service and Contact Information</h3>
|
||||
<h3 class="ec-cms-block-title">CUSTOMER SERVICE AND CONTACT INFORMATION</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="border-bottom: 1px solid black;">Company Name</td>
|
||||
|
|
|
@ -597,13 +597,22 @@ if ($_SESSION["userId"] <> "") {
|
|||
<td><span><?php echo $order['courier_name']; ?></span></td> -->
|
||||
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
|
||||
<td>
|
||||
<?php
|
||||
<?php
|
||||
$currentDate = time(); // Current Unix timestamp
|
||||
|
||||
if ($order['return_order']['status'] === 'To Approve') {
|
||||
echo '<span class="tbl-btn">Refund Requested</span>';
|
||||
} elseif ($order['return_order']['status'] === 'To Ship') {
|
||||
echo '<span class="tbl-btn">For Refund</span>';
|
||||
}else {
|
||||
echo '<a class="btn btn-lg btn-primary" data-bs-toggle="modal" data-bs-target="#modal-refund-' . $order['_id'] . '">Return/Refund</a>';
|
||||
} else {
|
||||
$orderDate = strtotime($order['updatedAt']);
|
||||
$sevenDaysAfterOrder = strtotime('+7 days', $orderDate); // Seven days after the order date
|
||||
|
||||
if ($currentDate >= $sevenDaysAfterOrder) {
|
||||
echo '<span class="tbl-btn" disabled></span>';
|
||||
} else {
|
||||
echo '<a class="btn btn-lg btn-primary" data-bs-toggle="modal" data-bs-target="#modal-refund-' . $order['_id'] . '">Return/Refund</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -181,7 +181,7 @@ $products = productList();
|
|||
|
||||
<a class="btn btn-lg btn-primary" onclick="deleteSelectedProduct('<?php echo $product['_id'] ?>');">Delete Selected</a>
|
||||
|
||||
<a class="btn btn-lg btn-primary" href="vendor-uploads-add-product-action.php" onclick="addProduct('<?php echo $product['_id'] ?>');">Add</a>
|
||||
<a class="btn btn-lg btn-primary" onclick="addProduct('<?php echo $product['_id'] ?>');">Add</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ec-vendor-card-body">
|
||||
|
@ -362,7 +362,8 @@ $products = productList();
|
|||
console.log("Session Token:", sessionToken);
|
||||
login(email, password, function() {
|
||||
// Removed the call to updateSessionToken
|
||||
window.open("vendor-uploads-add-product-action.php" + productId, "_self");
|
||||
// window.open("vendor-uploads-add-product-action.php" + productId, "_self");
|
||||
window.location.href = "vendor-uploads-add-product-action.php?productId=" + productId;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -116,6 +116,9 @@ $array = json_decode($result, true);
|
|||
<li><a href="vendor-dashboard.php">Dashboard</a></li>
|
||||
<li><a href="vendor-uploads-add-product-action.php">Upload Product</a></li>
|
||||
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
|
||||
<li><a href="vendor-refund-history.php">Vendor Refund History</a></li>
|
||||
<li><a href="vendor-payments.php">Payments</a></li>
|
||||
<li><a href="vendor-payouts.php">Payouts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -268,7 +268,7 @@ if (is_array($vendorOrderss)) {
|
|||
<td><span><?php echo $item['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $orderItems['status']; ?></span></td>
|
||||
<td><span><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span></td>
|
||||
<td><span><?php echo $item['price']; ?></span></td>
|
||||
<td><span><?php echo $orderItems['total_amount']; ?></span></td>
|
||||
<td style="display:flex; justify-content:center; margin-top:-4px;">
|
||||
<span onclick="editVendorOrder('<?php echo $orderItems['_id'] ?>');">
|
||||
<a class="mdi mdi-circle-edit-outline" style="font-size: 20px;"></a>
|
||||
|
|
|
@ -10,18 +10,22 @@ if ($_SESSION["userId"] <> "") {
|
|||
$vendorData = $vendorLoginIdjson['results'][0];
|
||||
$vendorId = $vendorData['_id'];
|
||||
$_SESSION["LoggedInVendorId"] = $vendorId;
|
||||
}
|
||||
|
||||
}
|
||||
$authtoken = $_SESSION['token'];
|
||||
|
||||
} else {
|
||||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
}
|
||||
$products = productList();
|
||||
$shopOrders = getOrderbyVendorId($vendorId);
|
||||
$vendorOrderss = json_decode($shopOrders);
|
||||
|
||||
if (is_array($vendorOrderss)) {
|
||||
$vendorOrders = json_decode($shopOrders);
|
||||
} elseif (is_object($vendorOrderss) && property_exists($vendorOrderss, 'message')) {
|
||||
$response = getOrderbyVendorId($vendorId);
|
||||
$vendorDecode = json_decode($response);
|
||||
|
||||
// var_dump($vendorDecode);
|
||||
if (is_array($vendorDecode)) {
|
||||
$vendorOrders = json_decode($response);
|
||||
} elseif (is_object($vendorDecode) && property_exists($vendorDecode, 'message')) {
|
||||
$vendorOrders = [];
|
||||
} else {
|
||||
echo "Unknown type or no 'message' property found.";
|
||||
|
@ -39,7 +43,7 @@ if (is_array($vendorOrderss)) {
|
|||
<meta name="keywords" content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
|
||||
<meta name="description" content="Best ecommerce html template for single and multi vendor store.">
|
||||
<meta name="author" content="ashishmaraviya">
|
||||
|
||||
|
||||
<!-- site Favicon -->
|
||||
<link rel="icon" href="assets/images/favicon/favicon.png" sizes="32x32" />
|
||||
<link rel="apple-touch-icon" href="assets/images/favicon/favicon.png" />
|
||||
|
@ -71,7 +75,23 @@ if (is_array($vendorOrderss)) {
|
|||
/* Set your desired text color for the active tab */
|
||||
|
||||
}
|
||||
#pagination {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#pagination a {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script>
|
||||
function updateCartItemCount() {
|
||||
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
|
||||
|
@ -153,7 +173,7 @@ if (is_array($vendorOrderss)) {
|
|||
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
|
||||
</div>
|
||||
<!-- <div class="ec-vendor-block-items">
|
||||
<!-- <ul>
|
||||
<ul>
|
||||
<li><a href="vendor-dashboard.php">Dashboard</a></li>
|
||||
<li><a href="vendor-uploads.php">Upload Product</a></li>
|
||||
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
|
||||
|
@ -191,25 +211,92 @@ if (is_array($vendorOrderss)) {
|
|||
<th scope="col">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
<tbody id="paymentsTableBody">
|
||||
<?php
|
||||
$totalPayments = 0;
|
||||
foreach ($vendorOrders as $order) {
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
if(strtolower($orderItems['payment']['status']) == 'paid'){
|
||||
|
||||
$rawDate = $orderItems['payment']['details'][0]['attributes']['data']['attributes']['payments'][0]['createdAt'];
|
||||
if ($rawDate) {
|
||||
$createdAt = new DateTime($rawDate);
|
||||
$formattedDate = $createdAt->format('m/d/Y');
|
||||
}
|
||||
$totalPayments++;
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $orderItems['status']; ?></span></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><button type="button" class="btn btn-primary" id="vendorPaymentsModalBtn" data-bs-toggle="modal" data-bs-target="#vendorPaymentsModal">View</button></td>
|
||||
<tr>
|
||||
<td><?php echo $orderItems['payment_method']; ?></td>
|
||||
<td>₱ <?php echo $orderItems['total_amount']; ?></td>
|
||||
<td><?php echo $orderItems['payment']['status']; ?></td>
|
||||
<td><?php echo $orderItems['items'][0]['product']['name']; ?></td>
|
||||
<td><?php echo $formattedDate?></td>
|
||||
<td><button type="button" class="btn btn-primary showSinglePaymentBtn" data-order-id="<?php echo $orderItems['_id']; ?>" data-bs-toggle="modal" data-bs-target="#vendorPaymentsModal">View</button></td>
|
||||
|
||||
</tr> </tr>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
// }
|
||||
}
|
||||
}
|
||||
// }
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="pagination"></div>
|
||||
|
||||
|
||||
<script>
|
||||
const itemsPerPage = 5;
|
||||
const totalItems = <?php echo $totalPayments; ?>;
|
||||
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
||||
|
||||
|
||||
function showPage(page) {
|
||||
const startIndex = (page - 1) * itemsPerPage;
|
||||
const endIndex = startIndex + itemsPerPage;
|
||||
const tableRows = document.querySelectorAll('#paymentsTableBody tr');
|
||||
|
||||
// for pagination button
|
||||
const pager = document.querySelectorAll('.page-btn')
|
||||
pager.forEach((row, index) => {
|
||||
if (index!==page-1) {
|
||||
row.style.backgroundColor="white";
|
||||
row.style.color="black";
|
||||
} else {
|
||||
row.style.backgroundColor="#007bff";
|
||||
row.style.color="white";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
tableRows.forEach((row, index) => {
|
||||
if (index >= startIndex && index < endIndex) {
|
||||
row.style.display = 'table-row';
|
||||
} else {
|
||||
row.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createPagination() {
|
||||
const paginationContainer = document.getElementById('pagination');
|
||||
|
||||
for (let i = 1; i <= totalPages; i++) {
|
||||
// created a tag
|
||||
const pageButton = document.createElement('a');
|
||||
// created class for a tag
|
||||
pageButton.className = "page-btn page-" + i
|
||||
pageButton.textContent = i;
|
||||
pageButton.addEventListener('click', () => showPage(i));
|
||||
paginationContainer.appendChild(pageButton);
|
||||
}
|
||||
}
|
||||
|
||||
createPagination();
|
||||
showPage(1); // Show the first page by default
|
||||
</script>
|
||||
<script>
|
||||
|
||||
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
|
||||
|
@ -356,88 +443,200 @@ if (is_array($vendorOrderss)) {
|
|||
<!--Gelo added payment details modal-->
|
||||
<div class="modal fade" id="vendorPaymentsModal" tabindex="-1" aria-labelledby="vendorPaymentsModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" style="min-width: 90%;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title fs-5" id="vendorPaymentsModalLabel">Payment ID: 123456</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title fs-5" id="vendorPaymentsModalLabel">Payment ID: <span id="paymentIdSpan"></span></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid" id="orderDetailsContainer">
|
||||
<!-- Dynamic content will be inserted here -->
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-4 ">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<h6><strong>Payment Details</strong></h6>
|
||||
<button disabled class=" border border-success border-2 text-sm btn-outline-success">PAID</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- GELO ADDED AJAX FUNCTION FOR MODAL BOX QUERY -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.showSinglePaymentBtn').click(function() {
|
||||
var orderId = $(this).data('order-id');
|
||||
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Gross Amount</div>
|
||||
<div>₱ 150.00</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2" style="border-bottom: 1px solid #000;">
|
||||
<div class="fw-bold"> Fees <span data-bs-toggle="tooltip" data-bs-placement="top"
|
||||
data-bs-custom-class="custom-tooltip"
|
||||
data-bs-title="Insert fee information here"><i class="fi fi-rr-info"></i></span></div>
|
||||
<div>- ₱ 4.35</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold"> Net Amount</div>
|
||||
<div>- ₱ 145.65</div>
|
||||
</div>
|
||||
<div class="d-flex p-2">
|
||||
<div class="fw-bold"> Payment Description </div>
|
||||
</div>
|
||||
<div class="d-flex pl-2">
|
||||
Cesar Ryan - 175
|
||||
</div>
|
||||
var token = "<?php echo $authtoken;?>";
|
||||
<?php
|
||||
?>
|
||||
|
||||
$.ajax({
|
||||
|
||||
// url: 'https://api.obanana.shop/api/v1/orders/' + orderId,
|
||||
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/' + orderId,
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + token
|
||||
},
|
||||
success: function(response) {
|
||||
// Handle successful response
|
||||
var paymentId = response.payment.reference_number;
|
||||
$('#paymentIdSpan').text(paymentId);
|
||||
var gross_price = response.payment.details[0]?.attributes.data.attributes.amount;
|
||||
var payment_status = response.payment.status;
|
||||
var fee = response.payment.details[0]?.attributes.data.attributes.fee;
|
||||
var net_amount = response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.net_amount;
|
||||
var desc = response.items[0].product.name;
|
||||
var method = response.payment_method;
|
||||
var name = response.billing_address.billing_first_name + " " + response.billing_address.billing_last_name;
|
||||
var email = response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.billing?.email;
|
||||
var phone = response.billing_address.billing_phone;
|
||||
var rawDate = response.payment.details[0]?.attributes.data.attributes.payments[0]?.createdAt;
|
||||
var payoutStatus = response.payout_status[0]?.status;
|
||||
if (rawDate){
|
||||
var createdAtDate = new Date(rawDate);
|
||||
var month = String(createdAtDate.getMonth() + 1).padStart(2, '0');
|
||||
var day = String(createdAtDate.getDate()).padStart(2, '0');
|
||||
var year = createdAtDate.getFullYear();
|
||||
var date = month + '/' + day + '/' + year;
|
||||
}
|
||||
|
||||
if(payoutStatus === 'Deposited'){
|
||||
var orderDetailsHtml = `
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-4 ">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<h6><strong>Payment Details</strong></h6>
|
||||
<button disabled class=" border border-success border-2 text-sm btn-outline-success">PAID</button>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Gross Amount</div>
|
||||
<div>₱ ${net_amount}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2" style="border-bottom: 1px solid #000;">
|
||||
<div class="fw-bold"> Fees <span data-bs-toggle="tooltip" data-bs-placement="top"
|
||||
data-bs-custom-class="custom-tooltip"
|
||||
data-bs-title="Insert fee information here"><i class="fi fi-rr-info"></i></span></div>
|
||||
<div>- ₱ ${fee}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold"> Net Amount</div>
|
||||
<div>₱ ${gross_price} </div>
|
||||
</div>
|
||||
<div class="d-flex p-2">
|
||||
<div class="fw-bold"> Payment Description </div>
|
||||
</div>
|
||||
<div class="d-flex pl-2">
|
||||
${desc}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="fw-bold">Payment Method</div>
|
||||
<div class="text-end">GCash<br> Paid on 11/15/2001</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="fw-bold">Payment Method</div>
|
||||
<div class="text-end">${method}<br> Paid on ${date}</div>
|
||||
</div>
|
||||
<p class="py-2 text-success mt-3 border border-success rounded text-center" style="font-size: 0.975em"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" class="bi bi-check-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
|
||||
</svg>
|
||||
This payment is now on your bank account.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="fw-bold">Billing Details</div>
|
||||
<div >${name}</div>
|
||||
<div> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-at-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 2A2 2 0 0 0 .05 3.555L8 8.414l7.95-4.859A2 2 0 0 0 14 2zm-2 9.8V4.698l5.803 3.546zm6.761-2.97-6.57 4.026A2 2 0 0 0 2 14h6.256A4.5 4.5 0 0 1 8 12.5a4.49 4.49 0 0 1 1.606-3.446l-.367-.225L8 9.586zM16 9.671V4.697l-5.803 3.546.338.208A4.5 4.5 0 0 1 12.5 8c1.414 0 2.675.652 3.5 1.671"/>
|
||||
<path d="M15.834 12.244c0 1.168-.577 2.025-1.587 2.025-.503 0-1.002-.228-1.12-.648h-.043c-.118.416-.543.643-1.015.643-.77 0-1.259-.542-1.259-1.434v-.529c0-.844.481-1.4 1.26-1.4.585 0 .87.333.953.63h.03v-.568h.905v2.19c0 .272.18.42.411.42.315 0 .639-.415.639-1.39v-.118c0-1.277-.95-2.326-2.484-2.326h-.04c-1.582 0-2.64 1.067-2.64 2.724v.157c0 1.867 1.237 2.654 2.57 2.654h.045c.507 0 .935-.07 1.18-.18v.731c-.219.1-.643.175-1.237.175h-.044C10.438 16 9 14.82 9 12.646v-.214C9 10.36 10.421 9 12.485 9h.035c2.12 0 3.314 1.43 3.314 3.034zm-4.04.21v.227c0 .586.227.8.581.8.31 0 .564-.17.564-.743v-.367c0-.516-.275-.708-.572-.708-.346 0-.573.245-.573.791"/>
|
||||
</svg>
|
||||
${email}
|
||||
|
||||
</div>
|
||||
<div> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-telephone-fill" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.75 1.75 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877z"/>
|
||||
</svg>
|
||||
${phone}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="py-2" style="font-size: 0.975em"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
|
||||
</svg>
|
||||
This payment is now on your bank account.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="fw-bold">Billing Details</div>
|
||||
<div >Cesar Ryan</div>
|
||||
<div> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-at-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 2A2 2 0 0 0 .05 3.555L8 8.414l7.95-4.859A2 2 0 0 0 14 2zm-2 9.8V4.698l5.803 3.546zm6.761-2.97-6.57 4.026A2 2 0 0 0 2 14h6.256A4.5 4.5 0 0 1 8 12.5a4.49 4.49 0 0 1 1.606-3.446l-.367-.225L8 9.586zM16 9.671V4.697l-5.803 3.546.338.208A4.5 4.5 0 0 1 12.5 8c1.414 0 2.675.652 3.5 1.671"/>
|
||||
<path d="M15.834 12.244c0 1.168-.577 2.025-1.587 2.025-.503 0-1.002-.228-1.12-.648h-.043c-.118.416-.543.643-1.015.643-.77 0-1.259-.542-1.259-1.434v-.529c0-.844.481-1.4 1.26-1.4.585 0 .87.333.953.63h.03v-.568h.905v2.19c0 .272.18.42.411.42.315 0 .639-.415.639-1.39v-.118c0-1.277-.95-2.326-2.484-2.326h-.04c-1.582 0-2.64 1.067-2.64 2.724v.157c0 1.867 1.237 2.654 2.57 2.654h.045c.507 0 .935-.07 1.18-.18v.731c-.219.1-.643.175-1.237.175h-.044C10.438 16 9 14.82 9 12.646v-.214C9 10.36 10.421 9 12.485 9h.035c2.12 0 3.314 1.43 3.314 3.034zm-4.04.21v.227c0 .586.227.8.581.8.31 0 .564-.17.564-.743v-.367c0-.516-.275-.708-.572-.708-.346 0-.573.245-.573.791"/>
|
||||
</svg>
|
||||
cr.ecom@gmail.com
|
||||
</div>
|
||||
<div> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-telephone-fill" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.75 1.75 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877z"/>
|
||||
</svg>
|
||||
09876543210
|
||||
</div>
|
||||
`;
|
||||
}else{
|
||||
var orderDetailsHtml = `
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-4 ">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<h6><strong>Payment Details</strong></h6>
|
||||
<button disabled class=" border border-success border-2 text-sm btn-outline-success">PAID</button>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Gross Amount</div>
|
||||
<div>₱ ${net_amount}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2" style="border-bottom: 1px solid #000;">
|
||||
<div class="fw-bold"> Fees </div>
|
||||
<div>- ₱ ${fee}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold"> Net Amount</div>
|
||||
<div>₱ ${gross_price} </div>
|
||||
</div>
|
||||
<div class="d-flex p-2">
|
||||
<div class="fw-bold"> Payment Description </div>
|
||||
</div>
|
||||
<div class="d-flex pl-2">
|
||||
${desc}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="fw-bold">Payment Method</div>
|
||||
<div class="text-end">${method}<br> Paid on ${date}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="fw-bold">Billing Details</div>
|
||||
<div >${name}</div>
|
||||
<div> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-at-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 2A2 2 0 0 0 .05 3.555L8 8.414l7.95-4.859A2 2 0 0 0 14 2zm-2 9.8V4.698l5.803 3.546zm6.761-2.97-6.57 4.026A2 2 0 0 0 2 14h6.256A4.5 4.5 0 0 1 8 12.5a4.49 4.49 0 0 1 1.606-3.446l-.367-.225L8 9.586zM16 9.671V4.697l-5.803 3.546.338.208A4.5 4.5 0 0 1 12.5 8c1.414 0 2.675.652 3.5 1.671"/>
|
||||
<path d="M15.834 12.244c0 1.168-.577 2.025-1.587 2.025-.503 0-1.002-.228-1.12-.648h-.043c-.118.416-.543.643-1.015.643-.77 0-1.259-.542-1.259-1.434v-.529c0-.844.481-1.4 1.26-1.4.585 0 .87.333.953.63h.03v-.568h.905v2.19c0 .272.18.42.411.42.315 0 .639-.415.639-1.39v-.118c0-1.277-.95-2.326-2.484-2.326h-.04c-1.582 0-2.64 1.067-2.64 2.724v.157c0 1.867 1.237 2.654 2.57 2.654h.045c.507 0 .935-.07 1.18-.18v.731c-.219.1-.643.175-1.237.175h-.044C10.438 16 9 14.82 9 12.646v-.214C9 10.36 10.421 9 12.485 9h.035c2.12 0 3.314 1.43 3.314 3.034zm-4.04.21v.227c0 .586.227.8.581.8.31 0 .564-.17.564-.743v-.367c0-.516-.275-.708-.572-.708-.346 0-.573.245-.573.791"/>
|
||||
</svg>
|
||||
${email}
|
||||
|
||||
</div>
|
||||
<div> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-telephone-fill" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.75 1.75 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877z"/>
|
||||
</svg>
|
||||
${phone}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
`;
|
||||
}
|
||||
$('#orderDetailsContainer').html(orderDetailsHtml);
|
||||
},
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- Footer Start -->
|
||||
<?php include "footer.php" ?>
|
||||
|
||||
|
@ -466,20 +665,6 @@ if (is_array($vendorOrderss)) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- raymart remove popup feb 20 2024 -->
|
||||
<!-- Recent Purchase Popup -->
|
||||
<!-- <div class="recent-purchase">
|
||||
<img src="assets/images/product-image/1.jpg" alt="payment image">
|
||||
<div class="detail">
|
||||
<p>Someone in new just bought</p>
|
||||
<h6>stylish baby shoes</h6>
|
||||
<p>10 Minutes ago</p>
|
||||
</div>
|
||||
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
|
||||
</div> -->
|
||||
<!-- Recent Purchase Popup end -->
|
||||
|
||||
<!-- Cart Floating Button -->
|
||||
<div class="ec-cart-float">
|
||||
|
@ -680,6 +865,8 @@ if (is_array($vendorOrderss)) {
|
|||
<script src="assets/js/vendor/bootstrap.min.js"></script>
|
||||
<script src="assets/js/vendor/jquery-migrate-3.3.0.min.js"></script>
|
||||
<script src="assets/js/vendor/modernizr-3.11.2.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<!--Plugins JS-->
|
||||
<script src="assets/js/plugins/swiper-bundle.min.js"></script>
|
||||
|
|
|
@ -3,24 +3,41 @@ include "functions.php";
|
|||
|
||||
if ($_SESSION["userId"] <> "") {
|
||||
$_SESSION["isLoggedIn"] = true;
|
||||
// $customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
$vendorLoginId = searchVendorbyLoginId($_SESSION["userId"]);
|
||||
$vendorLoginIdjson = json_decode($vendorLoginId, true);
|
||||
if (isset($vendorLoginIdjson['results'][0])) {
|
||||
$vendorData = $vendorLoginIdjson['results'][0];
|
||||
$vendorId = $vendorData['_id'];
|
||||
$_SESSION["LoggedInVendorId"] = $vendorId;
|
||||
}
|
||||
// $vendor= getVendorbyId($vendorLoginIdjson['results'][0]['_id']);
|
||||
// // var_dump($vendor);
|
||||
// $array = json_decode($vendor,true);
|
||||
// var_dump($array);
|
||||
$response = getAllPayout($_SESSION['token']);
|
||||
$vendorPayoutData = json_decode($response, true);
|
||||
} else {
|
||||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
}
|
||||
|
||||
// $customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
$vendorLoginId = searchVendorbyLoginId($_SESSION["userId"]);
|
||||
$vendorLoginIdjson = json_decode($vendorLoginId, true);
|
||||
if (isset($vendorLoginIdjson['results'][0])) {
|
||||
$vendorData = $vendorLoginIdjson['results'][0];
|
||||
$vendorId = $vendorData['_id'];
|
||||
$_SESSION["LoggedInVendorId"] = $vendorId;
|
||||
}
|
||||
|
||||
$token = $_SESSION["token"];
|
||||
|
||||
$token_parts = explode(".", $token);
|
||||
$token_payload = base64_decode($token_parts[1]);
|
||||
$token_data = json_decode($token_payload);
|
||||
|
||||
$expiration_time = $token_data->exp;
|
||||
$issued_at_time = $token_data->iat;
|
||||
|
||||
$renewal_time = $issued_at_time + 3300;
|
||||
|
||||
|
||||
if (time() >= $renewal_time) {
|
||||
$token = loginRenew($_SESSION["email"], $_SESSION["password"], $token);
|
||||
$_SESSION["token"] = $token;
|
||||
}
|
||||
|
||||
$authToken = $_SESSION['token'];
|
||||
$response = getAllPayout($authToken);
|
||||
$vendorPayoutData = json_decode($response, true);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
@ -55,12 +72,32 @@ if ($_SESSION["userId"] <> "") {
|
|||
<link rel="stylesheet" href="assets/css/style.css" />
|
||||
<link rel="stylesheet" href="assets/css/style2.css" />
|
||||
<link rel="stylesheet" href="assets/css/responsive.css" />
|
||||
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
|
||||
|
||||
|
||||
|
||||
<!-- Background css -->
|
||||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<style>
|
||||
#pagination {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#pagination a {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="shop_page">
|
||||
|
@ -150,19 +187,42 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div class="row">
|
||||
<h4 style="color: #444;">
|
||||
<div class="d-flex align-items-center">
|
||||
<?php
|
||||
$response = getOrderbyVendorId($vendorId);
|
||||
$upcomingPayout = json_decode($response, true);
|
||||
$payoutSum = 0;
|
||||
|
||||
foreach ($upcomingPayout as $x => $val) {
|
||||
$paymentStatus = strtolower($val['payment']['status']);
|
||||
$orderStatus = $val['status'];
|
||||
$payoutStatus = empty($val['payout_status']);
|
||||
if(( $paymentStatus == "paid") && ( $orderStatus == "COMPLETED") && ($payoutStatus == true)){
|
||||
$orderAmount = $val['total_amount'];
|
||||
$payoutSum += $orderAmount;
|
||||
}
|
||||
}
|
||||
|
||||
$finalPayoutSum = number_format($payoutSum, 2, '.', ',');
|
||||
?>
|
||||
<strong>
|
||||
₱ 0.00
|
||||
₱ <?php echo $finalPayoutSum ?>
|
||||
</strong>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="text-sm mt-3">
|
||||
<!-- <div class="text-sm mt-3">
|
||||
Payout Generation: Tue, Mar 19, 2024
|
||||
</div>
|
||||
<div class="text-sm">
|
||||
Receive Payout on or before: Wed, Mar 20, 2024
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="text-sm">
|
||||
Receipient: Philippine National Bank (PNB) Account ending in 6685
|
||||
<?php
|
||||
$vendorResponse = getVendorbyId($vendorId);
|
||||
$vendorInformation = json_decode($vendorResponse, true);
|
||||
$bankAccountNumber = $vendorInformation['bank_acount_details'][0]['bank_account_number'];
|
||||
$bankNumEnding = substr($bankAccountNumber, -3);
|
||||
?>
|
||||
Receipient: Philippine National Bank (PNB) Account ending in <?php echo $bankNumEnding?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -216,16 +276,16 @@ if ($_SESSION["userId"] <> "") {
|
|||
Receive Payout on or before: Wed, Mar 26, 2024
|
||||
</div>
|
||||
<div class="text-sm">
|
||||
Receipient: Philippine National Bank (PNB) Account ending in 6685
|
||||
Receipient: Philippine National Bank (PNB) Account ending in <?php echo $bankNumEnding?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mt-3">
|
||||
<h5><strong>Payout History</strong></h5>
|
||||
<div class="table-responsive">
|
||||
<table id="example" class="table ec-table">
|
||||
<h5 class='m-0'><strong>Payout History</strong></h5>
|
||||
<div class="table-responsive px-4">
|
||||
<table id='payoutsTableContent' class="table ec-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Amount</th>
|
||||
|
@ -237,54 +297,46 @@ if ($_SESSION["userId"] <> "") {
|
|||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class='table-group-divider'>
|
||||
<?php
|
||||
foreach ($vendorPayoutData as $x => $val) {
|
||||
$vendorIdCheck = $val['vendor_details'][0]['vendor_id'];
|
||||
if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($val['status'] == "DEPOSITED")) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . "₱ " . $val['net_amount'] . "</td>";
|
||||
if (empty($val['bank_information'][0]['bank_name']) == false) {
|
||||
echo "<td>" . $val['bank_information'][0]['bank_name'] . "</td>";
|
||||
// echo "<td>" . $val['bank_information'][0]['account_number'] . "</td>";
|
||||
} else {
|
||||
echo '<td>N/A</td>';
|
||||
}
|
||||
if (empty($val['bank_information'][0]['bank_account_number']) == false) {
|
||||
$accNum = $val['bank_information'][0]['bank_account_number'];
|
||||
// Replace characters with asterisks for all characters except the last three segments
|
||||
$maskedAccNum = substr_replace($accNum, str_repeat('*', strlen($accNum) - 3), 0, -3);
|
||||
echo "<td>" . $maskedAccNum . "</td>";
|
||||
// echo "<td>" . $val['bank_information'][0]['bank_account_number'] . "</td>";
|
||||
} else {
|
||||
echo '<td>N/A</td>';
|
||||
};
|
||||
echo "<td>December 08, 2024</td>";
|
||||
echo "<td>" . $val['status'] . "</td>";
|
||||
echo "<td>" .
|
||||
"<button type='button' class='btn btn-primary btn-sm' data-bs-toggle='modal' data-bs-target='#payoutModal'>
|
||||
Details
|
||||
</button>" .
|
||||
"</td>";
|
||||
echo "</tr>";
|
||||
$status = ucfirst(strtolower($val['status']));
|
||||
$payoutDate = date("F d, Y", strtotime($val['createdAt']));
|
||||
$payoutId = $val['_id'];
|
||||
if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($status == "Deposited")) { ?>
|
||||
<tr>
|
||||
<td> <?php echo "₱ " . $val['net_amount'] ?> </td>
|
||||
<?php if (empty($val['bank_information'][0]['bank_name']) == false) {
|
||||
?>
|
||||
<td> <?php echo $val['bank_information'][0]['bank_name'] ?> </td>
|
||||
<?php } else { ?>
|
||||
<td> N/A </td>
|
||||
<?php }
|
||||
if (empty($val['bank_information'][0]['bank_account_number']) == false) {
|
||||
$accNum = $val['bank_information'][0]['bank_account_number'];
|
||||
// Replace characters with asterisks for all characters except the last three segments
|
||||
$maskedAccNum = substr_replace($accNum, str_repeat('*', strlen($accNum) - 3), 0, -3); ?>
|
||||
<td> <?php echo $maskedAccNum ?> </td>
|
||||
<?php } else { ?>
|
||||
<td> N/A </td>
|
||||
<?php } ?>
|
||||
<td> <?php echo $payoutDate ?> </td>
|
||||
<td> <?php echo $status ?> </td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-primary showSinglePayoutBtn" data-order-id="<?php echo $payoutId; ?>" data-bs-toggle="modal" data-bs-target="#payoutsModal">View</button>
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#payoutModal">
|
||||
Details
|
||||
</button> -->
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- <tr>
|
||||
<td> ₱ 1,165.65 </td>
|
||||
<td> EastWest Bank </td>
|
||||
<td> ****6618 </td>
|
||||
<td> December 08, 2023 </td>
|
||||
<td> Deposited </td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#payoutModal">
|
||||
Details
|
||||
</button>
|
||||
</td>
|
||||
</tr> -->
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id='pagination'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -293,105 +345,27 @@ if ($_SESSION["userId"] <> "") {
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="modal fade" id="payoutModal" tabindex="-1" aria-labelledby="payoutModalLabel" aria-hidden="true">
|
||||
|
||||
<!-- Modal Box for the breakdown of payouts from the payouts data table - JOHN LOUIE C. SUEPERALIS MARCH 22, 2024 -->
|
||||
<div class="modal fade" id="payoutsModal" tabindex="-1" aria-labelledby="payoutsModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" style="min-width: 90%;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title fs-5" id="payoutModalLabel">Payout ID: po123034923482934</h5>
|
||||
<h5 class="modal-title fs-5" id="payoutsModalLabel">Payment ID: <span id="payoutIdSpan"></span></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-7 mb-4">
|
||||
<div class="d-flex flex-column">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div>
|
||||
<h6><strong>Payout Information</strong></h6>
|
||||
</div>
|
||||
<!-- <php
|
||||
if ($_SESSION['status'] == "DEPOSITED")
|
||||
$className = "fw-bold border border-success border-2 rounded-pill btn-outline-success btn-sm";
|
||||
else if ($_SESSION['statis'] == "PENDING")
|
||||
$className = "fw-bold border border-warning border-2 rounded-pill btn-outline-warning btn-sm";
|
||||
?> -->
|
||||
<button class="fw-bold border border-success border-2 btn-outline-success btn-sm" disabled>DEPOSITED</button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Gross Amount</div>
|
||||
<div>₱ 1,150.00</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2" style="border-bottom: 1px solid #000;">
|
||||
<div class="fw-bold"> Fees, Deductions, Adjustments
|
||||
<!-- <span data-bs-toggle="tooltip" data-bs-placement="top" data-bs-custom-class="custom-tooltip" data-bs-title="Insert fee information here">
|
||||
<i class="fi fi-rr-info"></i>
|
||||
</span> -->
|
||||
</div>
|
||||
<div>- ₱ 35.00</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold"> Net Amount</div>
|
||||
<div>- ₱ 1125.00</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 mb-4">
|
||||
<div class="d-flex flex-column" style="border-bottom: 1px solid #000;">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<h6><strong>Bank Information</strong></h6>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Bank</div>
|
||||
<div>EastWest Bank</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Account Name</div>
|
||||
<div>Juan De La Cruz</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Account Number</div>
|
||||
<div>Ending in 6618</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="mt-5">
|
||||
<h6><strong>Transaction Logs</strong></h6>
|
||||
<div class="table-responsive">
|
||||
<table id="example" class="table ec-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Transaction Date</th>
|
||||
<th>Gross Amount</th>
|
||||
<th>Fee</th>
|
||||
<th>Net Amount</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<td> Payment </td>
|
||||
<td> December 1, 2020, 10:00 PM </td>
|
||||
<td> ₱ 150.OO </td>
|
||||
<td> - ₱ 5.00 </td>
|
||||
<td> ₱ 145.00 </td>
|
||||
<td> FOURFORTY - 175 </td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" id="payoutDetailsContainer">
|
||||
<!-- Dynamic content will be inserted here -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Confirm</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- End Vendor setting section -->
|
||||
|
||||
<!-- Footer Start -->
|
||||
|
@ -625,15 +599,158 @@ if ($_SESSION["userId"] <> "") {
|
|||
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
|
||||
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
|
||||
<script src="assets/js/plugins/nouislider.js"></script>
|
||||
<script>
|
||||
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
|
||||
|
||||
<!-- <script>
|
||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
||||
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
|
||||
</script>
|
||||
</script> -->
|
||||
|
||||
<!-- Main Js -->
|
||||
<script src="assets/js/vendor/index.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
|
||||
<!-- JS CRIPT FOR DYNAMIC MODAL BOX USING AJAX - JOHN LOUIE C. SUPERALIS MARCH 22, 2024 -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.showSinglePayoutBtn').click(function() {
|
||||
var payoutId = $(this).data('order-id');
|
||||
var token = "<?php echo $authToken; ?>";
|
||||
$('#payoutIdSpan').text(payoutId);
|
||||
$.ajax({
|
||||
// url: 'https://api.obanana.shop/api/v1/payouts/' + payoutId,
|
||||
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/payouts/' + payoutId,
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + token
|
||||
},
|
||||
success: function(response) {
|
||||
// Handle successful response
|
||||
console.log(response);
|
||||
var grossAmount = response.gross_amount;
|
||||
var totalFees = response.fees_deduction_adjustment;
|
||||
var netAmount = response.net_amount;
|
||||
var payoutStatus = response.status;
|
||||
payoutStatus = payoutStatus.charAt(0).toUpperCase() + payoutStatus.slice(1).toLowerCase();
|
||||
var bankName = response.bank_information[0].bank_name;
|
||||
var bankNum = response.bank_information[0].bank_account_number;
|
||||
var bankNumEnding = bankNum.slice(-3); // Extract last three characters of bankNum
|
||||
var maskedBankNum = "Ending in " + bankNumEnding; // Create message
|
||||
var bankAccName = response.bank_information[0].bank_account_name;
|
||||
// var paymentType = response.transaction_logs[0].Type;
|
||||
// // var transDate = response.transaction_logs[0].Transaction + " " + date;
|
||||
// // var transGrossAmt = response.transaction_logs[0].Gross + " " + amount;
|
||||
// var transFee = response.transaction_logs[0].Fee;
|
||||
// // var transNetAmt = response.transaction_logs[0].Net + " " + amount;
|
||||
// var transDesc = response.transaction_logs[0].Description;
|
||||
var transactionLogsHtml = ''; // Initialize empty string to store HTML for transaction logs
|
||||
// Inside the success callback function
|
||||
var transactionLogsHtml = ''; // Initialize empty string to store HTML for transaction logs
|
||||
response.transaction_logs.forEach(function(log) {
|
||||
var paymentType = log.Type; // Assuming Transaction field holds the date
|
||||
var grossAmount = log.Gross; // Assuming Gross field holds the gross amount
|
||||
var transFee = log.Fee;
|
||||
var netAmount = log.Net;
|
||||
var transDesc = log.Description;
|
||||
|
||||
// Append HTML for current transaction log to the transactionLogsHtml string
|
||||
transactionLogsHtml += `
|
||||
<tr>
|
||||
<td>${paymentType}</td>
|
||||
<td>Wala Muna</td>
|
||||
<td>₱ Wala muna</td>
|
||||
<td>- ₱ ${transFee}</td>
|
||||
<td>₱ Wala Muna</td>
|
||||
<td>${transDesc}</td>
|
||||
</tr>`;
|
||||
});
|
||||
|
||||
|
||||
// Populate data dynamically using the response
|
||||
var payoutDetailsHtml = `
|
||||
<div class="row">
|
||||
<div class="col-md-7 mb-4">
|
||||
<div class="d-flex flex-column">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div>
|
||||
<h6><strong>Payout Information</strong></h6>
|
||||
</div>
|
||||
|
||||
<button class="fw-bold border border-success border-2 btn-outline-success btn-sm" disabled>${payoutStatus}</button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Gross Amount</div>
|
||||
<div>₱ ${grossAmount}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2" style="border-bottom: 1px solid #000;">
|
||||
<div class="fw-bold"> Fees, Deductions, Adjustments
|
||||
|
||||
</div>
|
||||
<div> - ${totalFees}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold"> Net Amount</div>
|
||||
<div>₱ ${netAmount}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 mb-4">
|
||||
<div class="d-flex flex-column" style="border-bottom: 1px solid #000;">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<h6><strong>Bank Information</strong></h6>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Bank</div>
|
||||
<div>${bankName}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Account Name</div>
|
||||
<div>${bankAccName}</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="fw-bold">Account Number</div>
|
||||
<div>${maskedBankNum}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="mt-5">
|
||||
<h6><strong>Transaction Logs</strong></h6>
|
||||
<div class="table-responsive">
|
||||
<table id="example" class="table ec-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Transaction Date</th>
|
||||
<th>Gross Amount</th>
|
||||
<th>Fee</th>
|
||||
<th>Net Amount</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
${transactionLogsHtml} <!-- Insert transaction logs HTML here -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#payoutDetailsContainer').html(payoutDetailsHtml);
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready( function () {
|
||||
$('#payoutsTableContent').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ $array = json_decode($result, true);
|
|||
<div class="thumb-upload">
|
||||
<div class="thumb-edit">
|
||||
<input type='file' id="thumbUpload<?php echo $index + 1; ?>" class="ec-image-upload" accept=".png, .jpg, .jpeg" />
|
||||
<label for="thumbUpload<?php echo $index + 1; ?>"><i class="fi-rr-edit"></i></label>
|
||||
<!-- <label for="thumbUpload<?php echo $index + 1; ?>"><i class="fi-rr-edit"></i></label> -->
|
||||
</div>
|
||||
<div class="thumb-preview ec-preview">
|
||||
<div class="image-thumb-preview">
|
||||
|
@ -396,15 +396,24 @@ $array = json_decode($result, true);
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody id="price-matrix-body">
|
||||
<?php foreach ($array['price_matrix'][0] as $index => $pair) : ?>
|
||||
<tr data-row-index="<?php echo $index; ?>">
|
||||
<td><input type="number" class="form-control" name="quantity[]" value="<?php echo $pair['quantity']; ?>"></td>
|
||||
<td><input type="number" class="form-control" name="price[]" value="<?php echo $pair['price']; ?>"></td>
|
||||
<?php if (empty($array['price_matrix'][0])) : ?>
|
||||
<tr data-row-index="0">
|
||||
<td><input type="number" class="form-control" name="quantity[]"></td>
|
||||
<td><input type="number" class="form-control" name="price[]"></td>
|
||||
<td><button type="button" class="btn btn-danger delete-row">Delete</button></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<?php foreach ($array['price_matrix'][0] as $index => $pair) : ?>
|
||||
<tr data-row-index="<?php echo $index; ?>">
|
||||
<td><input type="number" class="form-control" name="quantity[]" value="<?php echo $pair['quantity']; ?>"></td>
|
||||
<td><input type="number" class="form-control" name="price[]" value="<?php echo $pair['price']; ?>"></td>
|
||||
<td><button type="button" class="btn btn-danger delete-row">Delete</button></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
<button type="button" class="btn btn-secondary" id="add-row">Add Row</button>
|
||||
</div>
|
||||
|
@ -413,19 +422,19 @@ $array = json_decode($result, true);
|
|||
<div class="col-md-12" style="margin: 0 0 20px 0;">
|
||||
<label class="form-label">Promo</label>
|
||||
<div class="row" justify-content-between>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="nextDayDeliveryCheckbox" name="promo[next-day-delivery]" value="Yes" <?php if ($array['promo'][0]['next-day-delivery'] === "Yes") echo "checked"; ?> style="background-color: blue;">
|
||||
<label class="form-check-label" for="nextDayDeliveryCheckbox">Next Day Delivery</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!-- <div class="col-md-4">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="sameDayDeliveryCheckbox" name="promo[same-day-delivery]" value="Yes" <?php if ($array['promo'][0]['same-day-delivery'] === "Yes") echo "checked"; ?> style="background-color: blue;">
|
||||
<label class="form-check-label" for="sameDayDeliveryCheckbox">Same Day Delivery</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div> -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="freeShippingCheckbox" name="promo[free-shipping]" value="Yes" <?php if ($array['promo'][0]['free-shipping'] === "Yes") echo "checked"; ?> style="background-color: blue;">
|
||||
<label class="form-check-label" for="freeShippingCheckbox">Free Shipping</label>
|
||||
|
@ -721,7 +730,7 @@ $array = json_decode($result, true);
|
|||
|
||||
Promise.all(promises)
|
||||
.then(filenames => {
|
||||
const updatedImages = existingImages.concat(filenames.map(filename => `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/product_uploads/${filename}`));
|
||||
const updatedImages = existingImages.concat(filenames.map(filename => `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/product_uploads/${encodeURIComponent(filename)}`));
|
||||
|
||||
if (!Array.isArray(updatedImages)) {
|
||||
console.error('Updated images is not an array:', updatedImages);
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
@ -325,7 +323,8 @@ if ($_SESSION["userId"] <> "") {
|
|||
|
||||
// Make an AJAX request to update the favorites with the remaining products
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
|
||||
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
|
||||
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState === XMLHttpRequest.DONE) {
|
||||
|
@ -360,7 +359,8 @@ if ($_SESSION["userId"] <> "") {
|
|||
// Function to delete multiple products
|
||||
function deleteProducts(productIds) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
|
||||
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
|
||||
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState === XMLHttpRequest.DONE) {
|
||||
|
|
Loading…
Reference in New Issue