Compare commits

..

12 Commits

15 changed files with 4083 additions and 2279 deletions

View File

@ -1056,6 +1056,9 @@ $allSignups = array_merge($all_customers, $all_vendors);
<div class="card card-table-border-none card-default recent-orders" id="recent-orders">
<div class="card-header justify-content-between">
<h2>Recent Orders</h2>
<!-- <div class="date-range-report">
<span></span>
</div> -->
</div>
<div class="card-body pt-0 pb-5">
<table class="table card-table table-responsive table-responsive-large"

View File

@ -93,7 +93,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<!-- Sidebar toggle button -->
<button id="sidebar-toggler" class="sidebar-toggle"></button>
<!-- search form -->
<!-- 03-07-2024 Stacy & Raymart modified this block of code -->
<div class="search-form d-lg-inline-block">
<form action="vendor-product-search-action.php">
@ -648,22 +648,22 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
</header>
<!-- 3-19-24 raymart added vendor search -->
<?php if (!empty($vendorSearchResult['results'])) : ?>
<div class="shop-pro-content" style="margin-bottom:40px; margin-right: 2%; margin-left: 2%;">
<div class="ec-product-inner">
<h5 class="ec-pro-title" style="margin-top: 25px; margin-left: 5%; font-size: 25px;">Vendor Search Results</h5>
<div class="row mt-4">
<?php
$count = 0;
foreach ($vendorSearchResult['results'] as $vendor) {
if ($count < 2) {
?>
<div class="col-md-12">
<div class="card" style="margin:5px">
<div class="card-body">
<div class="vendor-info" style="display: flex; align-items: center;">
<div class="ec-catalog-vendor" style="display: inline-block;">
<!-- 3-19-24 raymart added vendor search -->
<?php if (!empty($vendorSearchResult['results'])) : ?>
<div class="shop-pro-content" style="margin-bottom:40px; margin-right: 2%; margin-left: 2%;">
<div class="ec-product-inner">
<h5 class="ec-pro-title" style="margin-top: 25px; margin-left: 5%; font-size: 25px;">Vendor Search Results</h5>
<div class="row mt-4">
<?php
$count = 0;
foreach ($vendorSearchResult['results'] as $vendor) {
if ($count < 2) {
?>
<div class="col-md-12">
<div class="card" style="margin:5px">
<div class="card-body">
<div class="vendor-info" style="display: flex; align-items: center;">
<div class="ec-catalog-vendor" style="display: inline-block;">
<a href="vendor-profile.php?id=<?php echo $vendor["_id"] ?>">
<?php if (isset($vendor['vendor_image'])) : ?>
<img loading="lazy" src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
@ -671,117 +671,124 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708588564876-viber_image_2024-02-22_15-54-42-498.png" class="vendor-image-placeholder" style="max-width: 100px; max-height: 100px;">
<?php endif; ?>
</a>
</div>
<div class="vendor-details" style="display:inline-block;">
<h6 class="ec-pro-title" style="padding:0 30px;font-family: Poppins, sans-serif; text-decoration: none; color: #777;white-space: nowrap;text-overflow: ellipsis;display: block;font-size: 16px;font-weight: 400;">
<a href="vendor-profile.php?id=<?php echo $vendor["_id"] ?>">
<?php echo $vendor['user_login']; ?>
</a>
</h6>
</div>
<div class="card text-center" style="margin-left: auto; margin-right: 5px;">
<div class="card-body">
<h6>Seller Products</h6>
<?php
$products = productList();
$vendorId = $vendor['_id'];
$product = array_filter($products, function ($var) use ($vendorId) {
return ($var['vendor_api_id'] == $vendorId);
});
?>
<p><?php echo count($product); ?></p>
</div>
<div class="vendor-details" style="display:inline-block;">
<h6 class="ec-pro-title" style="padding:0 30px;font-family: Poppins, sans-serif; text-decoration: none; color: #777;white-space: nowrap;text-overflow: ellipsis;display: block;font-size: 16px;font-weight: 400;">
<a href="vendor-profile.php?id=<?php echo $vendor["_id"] ?>">
<?php echo $vendor['user_login']; ?>
</a>
</h6>
</div>
<div class="card text-center" style="margin-left: auto; margin-right: 5px;">
<div class="card-body">
<h6>Seller Products</h6>
</div>
<div class="card text-center" style="margin-left: 5px; margin-right: 5px;">
<div class="card-body">
<h6>Seller since</h6>
<p>
<?php
$products = productList();
$vendorId = $vendor['_id'];
$product = array_filter($products, function ($var) use ($vendorId) {
return ($var['vendor_api_id'] == $vendorId);
});
if (!empty($vendor['date_registered'])) {
echo $vendor['date_registered'];
} else {
echo "Not yet registered";
}
?>
<p><?php echo count($product); ?></p>
</div>
</div>
<div class="card text-center" style="margin-left: 5px; margin-right: 5px;">
<div class="card-body">
<h6>Seller since</h6>
<p><?php echo $vendor['date_registered']; ?></p>
</div>
</p>
</div>
</div>
</div>
</div>
</div>
<?php
}
$count++;
}
?>
</div>
</div>
</div>
<?php endif; ?>
<!-- vendor search end -->
<!-- 3-19-24 raymart added Shop content Start -->
<div class="shop-pro-content" style="margin-right: 2%; margin-left: 2%;">
<div class="shop-pro-inner list-view">
<div class="row">
<?php
// $productSearchResult = [];
// foreach ($productSearchResult['results'] as $product => $productListVendor) {
// echo "$product .":" . $productListVendor";
// $vendorOfProduct = getVendorbyId($product['vendor_api_id']);
$products = productListVendor($vendorId);
$totalProducts = count($products);
for ($i = 0; $i <= $totalProducts - 1; $i++) {
$product = $products[$i];
?>
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="card-wrapper">
<div class="card-container">
<div class="card-top">
<div class="image-container" style="height: 300px;"> <!-- Adjust the height as needed -->
<?php
if (isset($product['images'])) {
$image_urls = explode(',', $product['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<?php
}
} else {
?>
<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>
</div>
</div>
<div class="card-bottom">
<h3><?php echo $product['product_name']; ?></h3>
<p><?php echo $product['regular_price']; ?></p>
</div>
<div class="card-action">
<div class="card-edit" onclick="editProduct('<?php echo $product['_id'] ?>');"><i class="mdi mdi-circle-edit-outline"></i></div>
<div class="card-preview"><i class="mdi mdi-eye-outline"></i></div>
<div class="card-remove" onclick="deleteProd('<?php echo $product['_id'] ?>');"><i class="mdi mdi mdi-delete-outline"></i></div>
</div>
</div>
</div>
</div>
<?php
<?php
}
?>
</div>
$count++;
}
?>
</div>
</div>
</div>
<!--Shop content End -->
<!-- 3-19-24 raymart added function for delete & edit -->
<script>
<?php endif; ?>
<!-- vendor search end -->
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
<!-- 3-19-24 raymart added Shop content Start -->
<div class="shop-pro-content" style="margin-right: 2%; margin-left: 2%;">
<div class="shop-pro-inner list-view">
<div class="row">
<?php
// $productSearchResult = [];
// foreach ($productSearchResult['results'] as $product => $productListVendor) {
// echo "$product .":" . $productListVendor";
// $vendorOfProduct = getVendorbyId($product['vendor_api_id']);
function editProduct(productId) {
$products = productListVendor($vendorId);
$totalProducts = count($products);
for ($i = 0; $i <= $totalProducts - 1; $i++) {
$product = $products[$i];
?>
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="card-wrapper">
<div class="card-container">
<div class="card-top">
<div class="image-container" style="height: 300px;"> <!-- Adjust the height as needed -->
<?php
if (isset($product['images'])) {
$image_urls = explode(',', $product['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;" />
<?php
}
} else {
?>
<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>
</div>
</div>
<div class="card-bottom">
<h3><?php echo $product['product_name']; ?></h3>
<p><?php echo $product['regular_price']; ?></p>
</div>
<div class="card-action">
<div class="card-edit" onclick="editProduct('<?php echo $product['_id'] ?>');"><i class="mdi mdi-circle-edit-outline"></i></div>
<div class="card-preview"><i class="mdi mdi-eye-outline"></i></div>
<div class="card-remove" onclick="deleteProd('<?php echo $product['_id'] ?>');"><i class="mdi mdi mdi-delete-outline"></i></div>
</div>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<!--Shop content End -->
<!-- 3-19-24 raymart added function for delete & edit -->
<script>
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
function editProduct(productId) {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
@ -818,36 +825,35 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
})
.catch(error => {
console.error("Error:", error.message);
});
}
}
</script>
<!-- 3-19-24 raymart added function for delete & edit -->
</script>
<!-- 3-19-24 raymart added function for delete & edit -->
<!-- Common Javascript -->
<!-- Common Javascript -->
<script src="assets/plugins/jquery/jquery-3.5.1.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/plugins/simplebar/simplebar.min.js"></script>
@ -860,6 +866,6 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<!-- Ekka Custom -->
<script src="assets/js/ekka.js"></script>
</body>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -345,7 +345,6 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<p>Level : 9 out of 10</p>
</div> -->
<div class="col-lg-3 col-md-6 ec-catalog-pro-count pad-15">
<h6>Seller Products</h6>
<?php
?>
@ -353,12 +352,16 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<p><?php echo count($products) ?> Products</p>
</div>
<div class="col-lg-3 col-md-6 ec-catalog-since pad-15">
<h6>Seller since</h6>
<!-- <p><?php echo $vendor["date_registered"] ?></p> -->
<p><?php echo date('F j, Y', strtotime($vendor['date_registered'])); ?></p>
<p>
<?php
if (!empty($vendor['date_registered'])){
echo date('F j, Y', strtotime($vendor['date_registered']));
} else {
echo "Not Yet Registered";
}
?>
</p>
</div>
</div>
</div>

View File

@ -28,10 +28,6 @@
<div class="ec-footer-links">
<ul class="align-items-center">
<li class="ec-footer-link">16F PMI Tower,Makati, Makati, Philippines</li>
<li class="ec-footer-link"><span>Call Us:</span><a
href="Mobile:+63 917 722 6002">+63 (2) 8807-6379</a></li>
<li class="ec-footer-link"><span>Email:</span><a
href="mailto:sales@obanana.com">sales@obanana.com</a></li>
<li class="ec-footer-link"><span>Call Us:</span><a
href="Mobile:+63 (2) 8807-6379">+63 (2) 8807-6379</a></li>
<li class="ec-footer-link"><span>Email:</span><a

View File

@ -689,11 +689,11 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
<script>
let userDataGlobal = null;
let globalQuantity = null;
let globalProductId = null;
let globalProduct = null;
document.addEventListener("DOMContentLoaded", function() {
let userDataGlobal = null;
let globalQuantity = null;
let globalProductId = null;
let globalProduct = null;
let globalVariation = null;
@ -945,7 +945,7 @@ if ($_SESSION["userId"] <> "") {
const firstImageUrl = getFirstImageUrl(productData?.images);
console.log(productData)
// console.log(productData)
const productCon = document.createElement('div');
productCon.className = 'product-con-wrap';
productCon.innerHTML =
@ -1802,7 +1802,7 @@ if ($_SESSION["userId"] <> "") {
<div class="header-top-download">
<!-- 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)) { ?>
<?php if(!empty($customer_data)) { ?>
<button style="cursor:default;">Hi <span
class="text-upper"><?php echo $customer_data[0]['first_name'] ?>!</span></button>
<?php } else if (isset($vendorData)) {?>

View File

@ -66,7 +66,7 @@ if (isset($_GET['id'])) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
@ -530,6 +530,7 @@ if (isset($_GET['id'])) {
function selectVariation(variation) {
globalVariation = variation;
displayReviews();
console.log("Variation selected: ", variation);
document.getElementById("productDescription").innerHTML = variation
@ -1623,10 +1624,13 @@ if (isset($_GET['id'])) {
.comments_wrap {
height: 100%;
width: 100%;
max-height: 800px;
overflow-y: scroll;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin: 10px;
}
@ -1651,7 +1655,7 @@ if (isset($_GET['id'])) {
.comment_card {
height: auto;
width: 100%;
width: 90%;
border-radius: 15px;
display: flex;
align-items: center;
@ -1660,7 +1664,7 @@ if (isset($_GET['id'])) {
border-radius: 10px;
border: 1px solid #eee;
flex-direction: column;
margin-top: 5px;
}
.user_info {
@ -1669,16 +1673,19 @@ if (isset($_GET['id'])) {
justify-content: space-between;
align-items: center;
flex-direction: row;
flex-wrap: wrap;
padding: 10px;
}
.user_info .left {
display: flex;
width: 70%;
justify-content: flex-start;
align-items: center;
flex-direction: row;
min-width: 300px;
}
.user_info .right {
@ -1686,9 +1693,22 @@ if (isset($_GET['id'])) {
justify-content: flex-end;
align-items: center;
flex-direction: row;
}
@media (min-width:768px) {
.user_info {
flex-direction: row;
}
.user_name {
font-size: 16px;
}
}
.user_img {
height: 30px;
width: 30px;
@ -1697,7 +1717,7 @@ if (isset($_GET['id'])) {
}
.user_name {
font-size: 16px;
font-size: 13px;
color: #000;
font-weight: bold;
padding: 10px;
@ -1714,11 +1734,41 @@ if (isset($_GET['id'])) {
padding: 10px;
}
.comment_details {}
.comment_details {
width: 100%;
}
.comment_text {}
.comment_text {
text-align: left;
width: 100%;
padding: 0px 10px;
}
.comment_media {}
.comment_media {
display: flex;
width: 100%;
justify-content: flex-start;
align-items: center;
/* flex-direction: row;*/
flex-wrap: wrap;
}
.comment_media img {
height: 150px;
width: 150px;
object-fit: cover;
margin: 1px 2px;
max-width: 200px;
}
.comment_media video {
height: 150px;
width: 150px;
object-fit: cover;
margin: 1px 2px;
max-width: 200px;
}
.comment_footer {
width: 100%;
@ -1729,11 +1779,12 @@ if (isset($_GET['id'])) {
<div class="rating_con">
<div class="comments_con">
<p class="comment_header">
<p class="comment_header" id="comment_header">
Total Reviews: 20
</p>
<ul class="comments_wrap">
<li class="comment_card_wrap">
<ul class="comments_wrap" id="comments_wrap">
<!-- <li class="comment_card_wrap">
<div class="comment_card">
<div class="user_info">
<div class="left">
@ -1776,7 +1827,7 @@ if (isset($_GET['id'])) {
</div>
</div>
</li>
</li> -->
</ul>
</div>
<!-- <div class="comment_footer">
@ -1800,6 +1851,112 @@ if (isset($_GET['id'])) {
<script>
document.addEventListener("DOMContentLoaded", function() {
displayReviews();
async function fetchProductData() {
let response = null
try {
response = await fetch(
'https://api.obanana.shop/api/v1/products/' + globalProductId
);
const prodData = await response.json();
return prodData;
} catch (error) {
console.error('Error fetching user data:', error);
return null;
}
}
async function displayReviews() {
const prodData = await fetchProductData();
const reviewList = document.getElementById('comments_wrap');
const header = document.getElementById('comment_header');
header.innerText = `Total Reviews: ${prodData?.ratings?.length??0}`
if (prodData?.ratings?.length > 0) {
for (const rate of prodData?.ratings) {
const li = document.createElement('li');
li.classList.add('comment_card_wrap');
// Format the createdAt date
const formattedDate = new Date(rate?.createdAt).toLocaleDateString(
'en-US', {
month: 'short',
day: 'numeric',
year: 'numeric',
});
// Use customer image or fallback to vendor image
const userImage = rate?.customer_id?.customer_image || rate?.vendor_id
?.vendor_image || 'default-image-url.png';
const userName = rate?.customer_id ?
`${rate?.customer_id?.first_name} ${rate?.customer_id?.last_name}` :
`${rate?.vendor_id?.first_name} ${rate?.vendor_id?.last_name}`;
// Generate media content
let mediaContent = '';
if (rate?.images?.length > 0) {
for (const img of rate.images) {
mediaContent +=
`<img src="https://api.obanana.shop/images/storage/upload_ratings/${img}" alt=""/>`;
}
}
if (rate?.videos?.length > 0) {
for (const vid of rate.videos) {
mediaContent +=
`<video class="vid-prev" controls><source src="https://api.obanana.shop/images/storage/upload_ratings/${vid}" type="video/mp4"></video>`;
}
}
li.innerHTML = `
<div class="comment_card">
<div class="user_info">
<div class="left">
<img loading="lazy" class="user_img" src="${userImage}" alt="" />
<p class="user_name">${userName}</p>
<div class="rate_star">
<i class="ecicon eci-star ${parseInt(rate?.rating) >= 1 ? 'fill' : ''}"></i>
<i class="ecicon eci-star ${parseInt(rate?.rating) >= 2 ? 'fill' : ''}"></i>
<i class="ecicon eci-star ${parseInt(rate?.rating) >= 3 ? 'fill' : ''}"></i>
<i class="ecicon eci-star ${parseInt(rate?.rating) >= 4 ? 'fill' : ''}"></i>
<i class="ecicon eci-star ${parseInt(rate?.rating) >= 5 ? 'fill' : ''}"></i>
</div>
</div>
<div class="right">
<p class="date_feedback">${formattedDate}</p>
</div>
</div>
<div class="comment_details">
<p class="comment_text">${rate?.comments ??''}</p>
<div class="comment_media">
${mediaContent}
</div>
</div>
</div>
`;
reviewList.appendChild(li);
}
} else {
const li = document.createElement('li');
li.classList.add('comment_card_wrap');
li.innerHTML = `<p class="comment_text2">No reviews yet</p>`;
reviewList.appendChild(li);
}
}
})
function openTab(tabName) {
var i, tabContent, tabButtons;
tabContent = document.getElementsByClassName("tab-content");

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -137,13 +137,13 @@ $vendorPayoutData = json_decode($response, true);
<div class="col-12">
<div class="row ec_breadcrumb_inner">
<div class="col-md-6 col-sm-12">
<h2 class="ec-breadcrumb-title">Vendor Settings</h2>
<h2 class="ec-breadcrumb-title">Vendor Payouts</h2>
</div>
<div class="col-md-6 col-sm-12">
<!-- ec-breadcrumb-list start -->
<ul class="ec-breadcrumb-list">
<li class="ec-breadcrumb-item"><a href="index.php">Home</a></li>
<li class="ec-breadcrumb-item active">Settings</li>
<li class="ec-breadcrumb-item active">Payouts</li>
</ul>
<!-- ec-breadcrumb-list end -->
</div>

View File

@ -265,10 +265,6 @@ if ($_SESSION["isCustomer"] == true) {
</span>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<div class="billing">
<?php foreach ($vendorData['address'] as $address) : ?>
<?php if ($address['billing']) : ?>
<div>
<span style="font-size:16px;font-weight:800;">Billing Address:</span>
@ -295,6 +291,34 @@ if ($_SESSION["isCustomer"] == true) {
<?php endif; ?>
<?php endforeach; ?>
</div>
<!-- <div class="billing">
<php foreach ($vendorData['address'] as $address) : ?>
<php if ($address['billing']) : ?>
<div>
<span style="font-size:16px;font-weight:800;">Billing Address:</span>
</div>
<div class="sName">
<span>Name:
<span id="selectedBillingFName"><php echo $address['first_name']; ?></span>
<span id="selectedBillingLName"> <php echo $address['last_name']; ?></span>
</span>
</div>
<div class="sContact">
<span id="selectedBillingContact">Contact #: <php echo $address['phone']; ?></span>
</div>
<div class="sAddress">
<span>Address:
<span id="sBillingBuilding"><php echo $address['address_1']; ?></span>
<span id="sBillingStreet"><php echo $address['address_2']; ?></span>
<span id="sBillingBarangay"><php echo $address['barangay']; ?></span>
<span id="sBillingCity"><php echo $address['city']; ?></span>
<span id="sBillingProvince"><php echo $address['province']; ?></span>
<span id="sBillingCountry"><php echo $address['country']; ?></span>
</span>
</div>
<php endif; ?>
<php endforeach; ?>
</div> -->
</div>
</div>
</div>

View File

@ -31,19 +31,19 @@ $token = $_SESSION["token"];
$response = addProduct(
$vendorId,
$productName,
$stock,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$specifications,
$productType,
$parentId,
$token);
$vendorId,
$productName,
$stock,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$specifications,
$productType,
$parentId,
$token);
$array = json_decode($response,true);
$_SESSION['newProductId'] = $array['_id'];
header("location: vendor-uploads.php");

View File

@ -54,32 +54,32 @@ for ($i = 0; $i < count($quantities); $i++) {
$response = editProduct(
$productId,
$vendorId,
$productName,
$stock,
$ndd,
$sdd,
$freeSf,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$description,
$specifications,
$productType,
$productCategory,
$productSf,
$productStatus,
$parentId,
$minimumOrder,
$color,
$material,
$size,
$priceMatrix,
$token);
$productId,
$vendorId,
$productName,
$stock,
$ndd,
$sdd,
$freeSf,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$description,
$specifications,
$productType,
$productCategory,
$productSf,
$productStatus,
$parentId,
$minimumOrder,
$color,
$material,
$size,
$priceMatrix,
$token);
$array = json_decode($response,true);
$_SESSION['newProdictId'] = $array['_id'];
header("location: vendor-all-product-list.php");

View File

@ -345,32 +345,32 @@ if ($_SESSION["isCustomer"] == true) {
<div class="col-md-12">
<label for="slug" class="col-12 col-form-label">Slug</label>
<div class="col-12">
<input id="slug" name="slug" class="form-control here set-slug" type="text">
<input id="slug" name="slug" class="form-control here set-slug" type="text" required>
</div>
</div>
<div class="col-md-6">
<!-- <label for="weight" class="form-label">Weight</label> -->
<!-- raymart edit weight -->
<label for="weight" class="form-label">Weight(grams)</label>
<input type="number" class="form-control slug-title" id="width" name="weight" value="<?php echo $array['weight']; ?>">
<input type="number" class="form-control slug-title" id="width" name="weight" value="<?php echo $array['weight']; ?>" required>
</div>
<div class="col-md-6">
<!-- <label for="length" class="form-label">Length</label> -->
<!-- raymart edit length -->
<label for="length" class="form-label">Length(cm)</label>
<input type="number" class="form-control slug-title" id="width" name="length" value="<?php echo $array['length']; ?>">
<input type="number" class="form-control slug-title" id="width" name="length" value="<?php echo $array['length']; ?>" required>
</div>
<div class="col-md-6">
<!-- <label for="width" class="form-label">Width</label> -->
<!-- raymart edit width -->
<label for="width" class="form-label">Width(cm)</label>
<input type="number" class="form-control slug-title" id="width" name="width" value="<?php echo $array['width']; ?>">
<input type="number" class="form-control slug-title" id="width" name="width" value="<?php echo $array['width']; ?>" required>
</div>
<div class="col-md-6">
<!-- <label for="height" class="form-label">Height</label> -->
<!-- raymart edit height -->
<label for="height" class="form-label">Height(cm)</label>
<input type="number" class="form-control slug-title" id="height" name="height" value="<?php echo $array['height']; ?>">
<input type="number" class="form-control slug-title" id="height" name="height" value="<?php echo $array['height']; ?>" required>
</div>
<!-- raymart added short des feb 21 2024 -->
<div class="col-md-12">