qorder update
This commit is contained in:
parent
252e6df9b2
commit
71dcc986a2
20
qorder.php
20
qorder.php
@ -68,7 +68,7 @@ foreach ($variants_raw as $v) {
|
||||
body.lang-ar { font-family: var(--arabic-font); direction: rtl; text-align: right; }
|
||||
|
||||
.category-nav { overflow-x: auto; white-space: nowrap; background: #fff; padding: 10px; position: sticky; top: 0; z-index: 1020; border-bottom: 1px solid #eee; }
|
||||
.category-item { display: inline-block; padding: 8px 16px; border-radius: 20px; background: #f1f3f5; margin-right: 8px; font-weight: 500; font-size: 1.1rem; cursor: pointer; border: 1px solid transparent; }
|
||||
.category-item { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; background: #f1f3f5; margin-right: 8px; font-weight: 500; font-size: 1.1rem; cursor: pointer; border: 1px solid transparent; }
|
||||
.lang-ar .category-item { margin-right: 0; margin-left: 8px; }
|
||||
.category-item.active { background: #0d6efd; color: #fff; }
|
||||
|
||||
@ -115,12 +115,18 @@ foreach ($variants_raw as $v) {
|
||||
|
||||
<!-- Category Nav -->
|
||||
<div class="category-nav shadow-sm">
|
||||
<div class="category-item active" onclick="filterCategory('all', this)">
|
||||
<div class="category-item active d-flex align-items-center gap-2" onclick="filterCategory('all', this)">
|
||||
<i class="bi bi-grid"></i>
|
||||
<span class="name-en">All</span>
|
||||
<span class="name-ar">الكل</span>
|
||||
</div>
|
||||
<?php foreach ($categories as $cat): ?>
|
||||
<div class="category-item" onclick="filterCategory(<?= $cat['id'] ?>, this)">
|
||||
<div class="category-item d-flex align-items-center gap-2" onclick="filterCategory(<?= $cat['id'] ?>, this)">
|
||||
<?php if (!empty($cat['image_url'])): ?>
|
||||
<img src="<?= htmlspecialchars(strpos($cat['image_url'], 'http') === 0 ? $cat['image_url'] : get_base_url() . $cat['image_url']) ?>" alt="" style="width: 20px; height: 20px; object-fit: cover; border-radius: 4px;">
|
||||
<?php else: ?>
|
||||
<i class="bi bi-tag"></i>
|
||||
<?php endif; ?>
|
||||
<span class="name-en"><?= htmlspecialchars($cat['name']) ?></span>
|
||||
<?php if (!empty($cat['name_ar'])): ?>
|
||||
<span class="name-ar"><?= htmlspecialchars($cat['name_ar']) ?></span>
|
||||
@ -148,7 +154,13 @@ foreach ($variants_raw as $v) {
|
||||
'has_variants' => $has_variants
|
||||
])) ?>)">
|
||||
<div class="position-relative">
|
||||
<img src="https://picsum.photos/seed/<?= $product['id'] ?>/400/300" class="card-img-top product-img" alt="<?= htmlspecialchars($product['name']) ?>">
|
||||
<?php if (!empty($product['image_url'])): ?>
|
||||
<img src="<?= htmlspecialchars(strpos($product['image_url'], 'http') === 0 ? $product['image_url'] : get_base_url() . $product['image_url']) ?>?v=<?= time() ?>" class="card-img-top product-img" alt="<?= htmlspecialchars($product['name']) ?>">
|
||||
<?php else: ?>
|
||||
<div class="card-img-top product-img d-flex align-items-center justify-content-center bg-light">
|
||||
<i class="bi bi-image text-muted opacity-50 fs-1"></i>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="badge-price text-primary">
|
||||
<?php if ($is_promo): ?>
|
||||
<span class="text-danger fw-bold"><?= format_currency($effective_price) ?></span>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user