œ_#ÁÕ§TE NAŒ“KeÉ:”(åŽÖJÞùY’‚ñùž7; «]Û ý`8g“¯B© jdÖÖ¸ðzœ¸¦4Ç3Kó^(ÍÖ¼ Õ€pvìwšõB4df$Èü^0˜…åÌC$#2FŽÑ§±¦ÛZ/÷š&m£ñzÒÖ ’.Î]!Î;ƒ(Õ–¢d/—#Kª+tZyuÏB>NÛÖ†(¸ŒSà'³„Y˜´-_•¦¼´˜OlNK§¶ÒàŠˆTHµƒeTPå·fïM’…þuÏÍüp6دªE£åü‡ZØ'CKF#â«;‹eyO Qp„†l"ö1èíÙP ÏŒúl! BÝ2ñª•_VÁÉ÷3eu`–F¸ìI--ö<¿žë¯4õ캿¢)34Å{wMÉ2ÆÖFŸ¥`e9Ú¶¸P‡.”FÔï rY ‚²ÈTB,{ÛœéJ}«àQ4¹0Rû4D‚B§S‘ dO•v¾„™Sן¯3FeŸ™«+ÓâwH dÕÛÌì·P4ë&¥#rÜÉ Ù¦ê†ý·xòqk¯2,¹§™E\ék‚×Sá”ÚºÙ⺷ö£6…à ʾ qSá³Å|;àû}4Ÿ($â¹VY~óÍ!èÜÒŒËX½Ù1j‚VíÍŸš³+œ]«½g{_{/vµ½\¢¶vÉWKÿ:ñám½ ¥ S²x‘t ŽšÝÙÿÀÇ^ný PK IW™k‚½÷ á _rels/.relsUT dìd dìd dìd’ÏNÃ0‡ï{ŠÈ÷ÕÝ@¡¥» ¤Ý*`%îÑ&QâÁöö‚J£ì°cœŸ¿|¶²ÙÆA½rL½wVE Šñ¶w†çúay * 9Kƒw¬áÈ ¶ÕbóÄIîI]’Ê—4t"á1™ŽGJ…ìòMããH’±Å@æ…ZÆuYÞ`üÍ€jÂT;«!îì T}|Û7MoøÞ›ýÈNN<|v–í2ÄÜ¥ÏèšbË¢Ázó˜Ë )„"£OÏ7ú{ZYÈ’yÞç#1'tuÉM?6o>Z´_å9›ëKÚ˜}?þ³žÏÌ·N>fµx PK IWª½e ¢ U € word/document.xmlUT dìdPK IWþË3” z €J¢ word/settings.xmlUT dìdPK IWC‡{š' ƒ €¤ docProps/custom.xmlUT dìdPK IW츱=Œ €‡¥ [Content_Types].xmlUT dìdPK IWV%ë±" €U§ docProps/app.xmlUT dìdPK IW€RŒ 3 €¶¨ docProps/core.xmlUT dìdPK IWkòDn ô €ª word/_rels/document.xml.relsUT dìdPK IW;$î €Î« word/fontTable.xmlUT dìdPK IW+åäz] ÷. €ý¬ word/numbering.xmlUT dìdPK IW¤2×r- ¿ €›° word/styles.xmlUT dìdPK IWMFÒ ø €´ word/header1.xmlUT dìdPK IWF— T e €· word/media/image1.jpegUT dìdPK IW!Yéáå €°Ë word/media/image2.pngUT dìdPK IW°Àºë ú €ÙÌ word/media/image3.pngUT dìdPK IW$“†ª L €Î word/footer1.xmlUT dìdPK IWzaGôM €ñÑ word/footer2.xmlUT dìdPK IW–µâº P €}Õ word/theme/theme1.xmlUT dìdPK IW™k‚½÷ á €{Û _rels/.relsUT PK ! bîh^ [Content_Types].xml ¢( ¬”ËNÃ0E÷HüCä-Jܲ@5í‚Ç*Q>Àēƪc[žiiÿž‰ûB¡j7±ÏÜ{2ñÍh²nm¶‚ˆÆ»R‹ÈÀU^7/ÅÇì%¿’rZYï @1__f› ˜q·ÃR4DáAJ¬h>€ãÚÇV߯¹ªZ¨9ÈÛÁàNVÞ8Ê©ÓãÑÔji){^óã-I‹"{Üv^¥P!XS)bR¹rú—K¾s(¸3Õ`cÞ0†½ÝÎß»¾7M4²©ŠôªZÆk+¿|\|z¿(Ž‹ôPúº6h_-[ž@!‚ÒØ Pk‹´2nÏ}Ä?£LËð Ýû%áÄßdºždN"m,à¥ÇžDO97*‚~§Èɸ8ÀOíc|n¦Ñ äEøÿöéºóÀBÉÀ!$}‡íàÈé;{ìÐå[ƒîñ–é2þ ÿÿ PK ! µU0#ô L _rels/.rels ¢( ¬’MOÃ0†ïHü‡È÷ÕÝBKwAH»!T~€Iܵ£$Ý¿'TƒG½~üÊÛÝ<êÈ!öâ4¬‹;#¶w†—úqu *&r–Fq¬áÄvÕõÕö™GJy(v½*«¸¨¡KÉß#FÓñD±Ï.W ¥†=™ZÆMYÞbø®ÕBS톰·7 ê“Ï›×–¦é ?ˆ9LìÒ™ÈsbgÙ®|Èl!õùUSh9i°bžr:"y_dlÀóD›¿ý|-NœÈR"4ø2ÏGÇ% õZ´4ñËyÄ7 ëÈðÉ‚‹¨Þ ÿÿ PK ! Q48wÛ — xl/workbook.xml¤UÙnâ0}iþ!cñ‡ *–¢AšVU×$dC¬&vÆv UÕŸë@XÊK§/¹p|Žï¹N÷b“¥Ö •Š ÞC¸î"‹òHÄŒ¯zèá~b·‘¥4á1I§=ôJºèÿüÑ] ù¼âÙ ®z(Ñ:GE ͈ª‹œrˆ,…̈†©\9*—”Ä*¡Tg©ã¹nàd„q´Eåg0ÄrÉ":Q‘Q®· ’¦D}•°\UhYô¸ŒÈç"·#‘å ±`)Ó¯%(²²(œ®¸d‘‚ì nZ w v¡ñª• t¶TÆ")”Xê:@;[Ògú±ë`|²›ó=ø’ïHúÂL÷¬dðEVÁ+8€a÷Ûh¬Uz%„Íû"ZsÏÍCýî’¥ôqk]‹äù5ÉL¦Rd¥Dé˘i÷P ¦bM/|dÉ",…¨çãFNoçiûéë>aêiçsó#ðÄ ÕTr¢éHp ÜIú®ÝJìQ"ÀÜÖ-ý[0I¡¦ÀZ Z…d¡nˆN¬B¦=4 g %PDF-1.4 %âãÏÓ 3 0 obj << /Linearized 1 /L 422775 ÿØÿà JFIF ÿÛ C ÿÛ C ÿÀ X" ÿÄ ÿÄ H !1A"Qaq2‘¡#±ÁBRÑ3Cbrá$S‚¢²ð4ñ%6DTc’ÂsÿÄ ÿÄ = !1AQ"aq‘Á2R¡±BÑð#3br’²4á$‚¢ÂñÿÚ ? áHBßÝ`„! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! ! stream
<?php
// Enable error reporting (remove on production)
ini_set('display_errors', 1);
error_reporting(E_ALL);
// Database connection
$host = 'localhost';
$db = 'poojajeweller';
$user = 'poojajeweller_user';
$pass = 'Poojajeweller@12345#';
$charset = 'utf8mb4';
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
];
try {
$pdo = new PDO($dsn, $user, $pass, $options);
} catch (PDOException $e) {
die("Database connection failed: " . htmlspecialchars($e->getMessage()));
}
// Check if main category is set
if (isset($_GET['main'])) {
$main_id = intval($_GET['main']);
$stmt = $pdo->prepare("
SELECT p.*,
c.name AS category_name,
g.gender_name,
mc.name AS main_category_name,
sc.name AS sub_category_name
FROM products p
JOIN product_categories c ON p.category_id = c.id
JOIN products_gender g ON p.gender_id = g.id
LEFT JOIN main_categories mc ON p.main_category_id = mc.id
LEFT JOIN sub_categories sc ON p.sub_category_id = sc.id
WHERE p.main_category_id = :main_id
");
$stmt->execute(['main_id' => $main_id]);
$products = $stmt->fetchAll();
if ($products):
foreach ($products as $product):
// Check product type (rental / sale)
$isRental = (int)$product['is_rental'] === 1;
if ($isRental) {
// Rental details
$rentalStmt = $pdo->prepare("SELECT * FROM product_rentals WHERE product_id = ?");
$rentalStmt->execute([$product['product_id']]);
$rentalData = $rentalStmt->fetch();
$fancyStmt = $pdo->prepare("SELECT * FROM product_fancy WHERE product_id = ?");
$fancyStmt->execute([$product['product_id']]);
$fancyData = $fancyStmt->fetch();
} else {
// Sale details
$saleStmt = $pdo->prepare("SELECT * FROM product_sales WHERE product_id = ?");
$saleStmt->execute([$product['product_id']]);
$saleData = $saleStmt->fetch();
$metalStmt = $pdo->prepare("SELECT * FROM product_gold_silver WHERE product_id = ?");
$metalStmt->execute([$product['product_id']]);
$metalData = $metalStmt->fetch();
}
?>
<!-- ✅ Quickview Modal -->
<div class="quickview-modal modal fade" id="quickview-modal<?= $product['product_id'] ?>" data-bs-backdrop="static">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content body-bg border-0 br-hidden">
<div class="modal-body ptb-30 plr-15 plr-sm-30">
<div class="quickview-modal-header d-flex align-items-center justify-content-between meb-30">
<h6 class="font-18">Quickview</h6>
<button type="button" class="body-secondary-color icon-16" data-bs-dismiss="modal" aria-label="Close">
<i class="ri-close-large-line d-block lh-1"></i>
</button>
</div>
<div class="row row-mtm quickview-modal-content">
<!-- LEFT: Product Images -->
<div class="col-12 col-md-6">
<div class="quickview-detail-slider">
<div class="row ul-mt15">
<!-- Main (Big) Slider -->
<div class="col-12">
<div class="quickview-img-big quickview-slider-big position-relative br-hidden">
<div class="swiper quickview-swiper-big-<?= $product['product_id'] ?>">
<div class="swiper-wrapper">
<?php
$product_images = json_decode($product['product_images'], true);
if (!empty($product_images)) {
foreach ($product_images as $index => $img) {
echo '<div class="swiper-slide">';
echo ' <img src="' . htmlspecialchars($img) . '" class="w-100 img-fluid" alt="product-image-' . ($index+1) . '">';
echo '</div>';
}
} else {
// fallback (thumbnail if no gallery)
echo '<div class="swiper-slide">';
echo ' <img src="' . htmlspecialchars($product['thumbnail_image']) . '" class="w-100 img-fluid" alt="' . htmlspecialchars($product['product_name']) . '">';
echo '</div>';
}
?>
</div>
<!-- Navigation -->
<div class="swiper-buttons">
<button type="button" class="swiper-prev-<?= $product['product_id'] ?> secondary-btn icon-16 width-32 height-32 position-absolute top-50 start-0 translate-middle-y z-1 rounded-circle" aria-label="Previous">
<i class="ri-arrow-left-line d-block lh-1"></i>
</button>
<button type="button" class="swiper-next-<?= $product['product_id'] ?> secondary-btn icon-16 width-32 height-32 position-absolute top-50 end-0 translate-middle-y z-1 rounded-circle" aria-label="Next">
<i class="ri-arrow-right-line d-block lh-1"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Thumbnail Slider -->
<div class="col-12">
<div class="quickview-img-small quickview-slider-small">
<div class="swiper quickview-swiper-small-<?= $product['product_id'] ?>">
<div class="swiper-wrapper">
<?php
if (!empty($product_images)) {
foreach ($product_images as $index => $img) {
echo '<div class="swiper-slide">';
echo ' <img src="' . htmlspecialchars($img) . '" class="w-100 img-fluid border-radius" alt="thumb-' . ($index+1) . '">';
echo '</div>';
}
} else {
echo '<div class="swiper-slide">';
echo ' <img src="' . htmlspecialchars($product['thumbnail_image']) . '" class="w-100 img-fluid border-radius" alt="thumb">';
echo '</div>';
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- RIGHT: Product Info -->
<div class="col-12 col-md-6">
<div class="quickview-info p-md-relative height-md-100">
<div class="quickview-detail-info p-md-absolute top-0 bottom-0 start-0 psl-md-3 per-md-30">
<!-- SKU -->
<div class="quick-info" data-animate="animate__fadeIn">
<div class="product-sku">
<span class="font-14 text-uppercase"><?= htmlspecialchars($product['product_unique_id']) ?></span>
</div>
</div>
<!-- Title -->
<div class="quick-info" data-animate="animate__fadeIn">
<div class="product-title">
<h2 class="font-20"><?= htmlspecialchars($product['product_name']) ?></h2>
</div>
</div>
<!-- Price (Rental vs Sale) -->
<div class="quick-info mst-10" data-animate="animate__fadeIn">
<div class="product-price">
<div class="price-box font-18">
<?php if ($isRental && $rentalData): ?>
<span class="new-price dominant-color heading-weight">
Rent: ₹<?= htmlspecialchars($rentalData['rental_amount']) ?>
</span>
<span class="duration"> / <?= htmlspecialchars($rentalData['rental_duration']) ?> days</span>
<?php elseif (!$isRental && $saleData): ?>
<span class="new-price dominant-color heading-weight">₹<?= htmlspecialchars($saleData['price']) ?></span>
<?php if (!empty($saleData['mrp'])): ?>
<span class="old-price heading-weight">
<span class="mer-3">~</span>
<span class="text-decoration-line-through">₹<?= htmlspecialchars($saleData['mrp']) ?></span>
</span>
<?php endif; ?>
<?php else: ?>
<span class="new-price">No pricing info</span>
<?php endif; ?>
</div>
</div>
</div>
<!-- Rental/Sale Extra Details -->
<div class="quick-info mst-10" data-animate="animate__fadeIn">
<?php if ($isRental && $rentalData): ?>
<div class="rental-detail dominant-color">
<strong>Deposit:</strong> ₹<?= htmlspecialchars($rentalData['deposit_amount']) ?>
</div>
<?php if (!empty($rentalData['late_fee'])): ?>
<div class="rental-detail dominant-color">
<strong>Late Fee Per Day:</strong> ₹<?= htmlspecialchars($rentalData['late_fee']) ?>
</div>
<?php endif; ?>
<?php elseif (!$isRental && $saleData): ?>
<?php if (!empty($saleData['making_charges'])): ?>
<div><strong>Making Charges:</strong> ₹<?= htmlspecialchars($saleData['making_charges']) ?></div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- Stock & Availability -->
<div class="quick-info mst-10" data-animate="animate__fadeIn">
<div class="product-availability">
<span class="d-inline-block text-success">
<span class="heading-color heading-weight mer-10">Availability:</span>In stock
</span>
</div>
</div>
<?php
// Validate by category_id
$category_id = intval($product['category_id'] ?? 0);
// Only show message for Gold (category_id = 1)
if ($category_id === 1):
?>
<div class="product-info mst-15" data-animate="animate__fadeIn">
<div class="product-sold">
<span class="text-danger">
<i class="ri-fire-line icon-16 mer-4 blinking"></i>
<span class="heading-weight">
After booking gold jewellery, you have to pick up from store.
</span>
</span>
</div>
</div>
<?php endif; ?>
<!-- Description -->
<div class="quick-info mst-15" data-animate="animate__fadeIn">
<div class="product-desc">
<p>
<?php if ($isRental && $fancyData): ?>
<?= htmlspecialchars($fancyData['material_description'] ?? 'Rental jewellery available.') ?>
<?php elseif (!$isRental && $metalData): ?>
<?= htmlspecialchars($product['short_description'] ?? 'Jewellery item for sale.') ?>
<?php else: ?>
No description available.
<?php endif; ?>
</p>
</div>
</div>
<!-- Quantity + Add to Cart -->
<div class="quick-info mst-20" data-animate="animate__fadeIn">
<div class="product-button mst-15">
<div class="row btn-row15">
<div class="col-12">
<?php if ($isRental && $rentalData): ?>
<button class="rent-now-btn w-100 btn-style quaternary-btn" data-product-id="<?= htmlspecialchars($product['product_unique_id']) ?>">
<span class="product-icon">
<span class="product-bag-icon icon-16"><i class="ri-calendar-line d-block lh-1"></i></span>
</span>
<span class="tooltip-text">Rent Now</span>
</button>
<?php else: ?>
<button class="add-to-cart-btn w-100 btn-style quaternary-btn" data-product-id="<?= htmlspecialchars($product['product_unique_id']) ?>">
<span class="product-icon">
<span class="product-bag-icon icon-16"><i class="ri-shopping-bag-3-line d-block lh-1"></i></span>
</span>
<span class="tooltip-text">Add to Cart</span>
</button>
<?php endif; ?>
</div>
</div>
</div>
</div>
<!-- Delivery & Return -->
<div class="quick-info mst-20" data-animate="animate__fadeIn">
<div class="product-delivery">
<span><i class="ri-check-line heading-color icon-16 mer-4"></i>Your order will reach you within 5-7 business days</span>
</div>
<div class="product-return">
<span><i class="ri-check-line heading-color icon-16 mer-4"></i>We accept returns within 5 days of purchase</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll("[class*='quickview-swiper-big-']").forEach(function (slider) {
let productId = slider.className.match(/quickview-swiper-big-(\d+)/)[1];
let thumbSwiper = new Swiper(".quickview-swiper-small-" + productId, {
spaceBetween: 10,
slidesPerView: 4,
freeMode: true,
watchSlidesProgress: true,
});
new Swiper(".quickview-swiper-big-" + productId, {
loop: true,
spaceBetween: 10,
navigation: {
nextEl: ".swiper-next-" + productId,
prevEl: ".swiper-prev-" + productId,
},
thumbs: {
swiper: thumbSwiper,
},
});
});
});
</script>
<?php
endforeach;
endif;
}
?>