mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
Fix pagination styling, add-to-cart class/data-attr mismatch, shop.php pagination
This commit is contained in:
@@ -144,7 +144,7 @@ $productTypesList = db()->fetchAll("SELECT type_id, name, slug FROM product_type
|
||||
<span class="original"><?= formatCurrency($product['price']) ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block add-to-cart" data-id="<?= $product['product_id'] ?>">
|
||||
<button class="btn btn-primary btn-block add-to-cart-btn" data-product-id="<?= $product['product_id'] ?>">
|
||||
<i class="fas fa-shopping-bag"></i> Add to Cart
|
||||
</button>
|
||||
</div>
|
||||
@@ -154,14 +154,7 @@ $productTypesList = db()->fetchAll("SELECT type_id, name, slug FROM product_type
|
||||
|
||||
<!-- Pagination -->
|
||||
<?php if ($pagination['total_pages'] > 1): ?>
|
||||
<div style="display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem;">
|
||||
<?php for ($i = 1; $i <= $pagination['total_pages']; $i++): ?>
|
||||
<a href="/shop.php?page=<?= $i ?><?= $category ? '&category=' . urlencode($category) : '' ?><?= $sort ? '&sort=' . $sort : '' ?>"
|
||||
class="btn <?= $i === $page ? 'btn-primary' : 'btn-secondary' ?>">
|
||||
<?= $i ?>
|
||||
</a>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
<?= renderPagination($pagination, '/shop.php?' . http_build_query(array_filter(['category' => $category, 'sort' => $sort]))) ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user