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:
2026-06-14 19:47:08 +00:00
parent 548713971d
commit 890c98d4cd
4 changed files with 71 additions and 18 deletions
+11
View File
@@ -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>
+1
View File
@@ -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';