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

@@ -435,12 +435,19 @@
</div>
</footer>
<!-- Core utilities and state management -->
<script src="/assets/js/api-cache.js"></script>
<script src="/assets/js/main.js"></script>
<!-- Shopping system (handles cart & wishlist) -->
<script src="/assets/js/shop-system.js"></script>
<!-- Page interactions -->
<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/main.js"></script>
<script src="/assets/js/navigation.js"></script>
<script src="/assets/js/cart.js"></script>
<script src="/assets/js/shopping.js"></script>
<!-- Page-specific content loading -->
<script>
// Load about page content from API
async function loadAboutContent() {
@@ -598,7 +605,5 @@
loadTeamMembers();
});
</script>
<script src="/assets/js/cart.js"></script>
<script src="/assets/js/shop-system.js"></script>
</body>
</html>