fix: implement correct base_url routing for shop frontend

Fix shop frontend links to work correctly across all three access methods:
- Custom domain (wizamart.shop)
- Subdomain (wizamart.localhost)
- Path-based (/vendor/wizamart/)

Changes:
- Update get_shop_context() to calculate base_url based on access method
- Update all shop templates to use {{ base_url }} for links
- Add base_url to shop-layout.js Alpine.js component
- Document multi-access routing in shop architecture docs

This ensures links work correctly regardless of how the shop is accessed,
solving broken navigation issues with path-based access.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-22 15:54:00 +01:00
parent cadf771138
commit 03a487eba9
5 changed files with 599 additions and 564 deletions

View File

@@ -24,6 +24,7 @@ function shopLayoutData() {
// UI state
mobileMenuOpen: false,
searchOpen: false,
loading: false,
cartCount: 0,
// Cart state