Fix multilingual routing for virtual product pages
Use site()->visit() to properly set language context for virtual pages. This ensures UI translations and language-specific content work correctly on both /slug (French) and /en/slug (English) routes. Changes: - Add site()->visit($page, $lang) in routes to set page language - Create product controller for language detection - Fix add-to-cart button to update text in .txt div instead of button - Remove broken hooks approach Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4489e705b8
commit
f4ecdcf947
7 changed files with 41 additions and 20 deletions
|
|
@ -83,6 +83,7 @@
|
|||
}
|
||||
|
||||
.header-cart-btn {
|
||||
font-family: var(--font);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
|
@ -109,11 +110,11 @@
|
|||
}
|
||||
|
||||
&:not(:empty)::before {
|
||||
content: '(';
|
||||
content: "(";
|
||||
}
|
||||
|
||||
&:not(:empty)::after {
|
||||
content: ')';
|
||||
content: ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -559,6 +559,7 @@ main {
|
|||
color: var(--color-txt);
|
||||
}
|
||||
#site-header .header-cart-btn {
|
||||
font-family: var(--font);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue