Phase 1: Fix script loading order and remove duplicates

- Remove duplicate cart.js loads from about.html and contact.html
- Standardize script loading order across all pages:
  1. api-cache.js (if needed)
  2. main.js
  3. shop-system.js
  4. Page-specific scripts
  5. UI enhancements last
- Remove cart.js from shop.html and product.html (shop-system handles it)
- Add api-cache.js to about.html and contact.html (they make API calls)
- Prevent double initialization conflicts
This commit is contained in:
Local Server
2026-01-14 21:19:23 -06:00
parent 7200bd7012
commit 1a5fd691bd
6 changed files with 42 additions and 23 deletions

View File

@@ -195,14 +195,15 @@
<div id="productDetail" style="display: none"></div>
<!-- Core Scripts (load in dependency order) -->
<script src="/assets/js/api-cache.js"></script>
<script src="/assets/js/main.js"></script>
<script src="/assets/js/shop-system.js"></script>
<script src="/assets/js/cart.js"></script>
<script src="/assets/js/api-client.js"></script>
<script src="/assets/js/notifications.js"></script>
<script src="/assets/js/page-transitions.js?v=1766709739"></script>
<script src="/assets/js/back-button-control.js?v=1766723554"></script>
<script src="/assets/js/navigation.js?v=1766708114"></script>
<script src="/assets/js/api-client.js"></script>
<script src="/assets/js/notifications.js"></script>
<script>
// Function to change primary image
function changePrimaryImage(imageUrl, index) {