mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
Fix product images, add-to-cart, and add Sub Categories filter
- Add display:block to .product-card-image so padding-top aspect ratio works on anchor tags - Add Cache-Control: no-transform header to disable Cloudflare Rocket Loader (was deferring main.js and breaking add-to-cart click handlers) - Add Sub Categories filter row on shop page using product_types table - Show category · sub-category on product cards - Add Sub Categories section to footer - Preserve subcat param across category/sort filter links Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,17 @@
|
||||
<li><a href="/shop.php?category=blends">Blends</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Sub Categories</h4>
|
||||
<ul class="footer-links">
|
||||
<?php
|
||||
$footerTypes = db()->fetchAll("SELECT type_id, name FROM product_types WHERE is_active=1 ORDER BY sort_order ASC");
|
||||
foreach ($footerTypes as $ft): ?>
|
||||
<li><a href="/shop.php?subcat=<?= urlencode($ft['type_id']) ?>"><?= htmlspecialchars($ft['name']) ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Company</h4>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate, no-transform');
|
||||
|
||||
require_once __DIR__ . '/db.php';
|
||||
require_once __DIR__ . '/../config/config.php';
|
||||
|
||||
Reference in New Issue
Block a user