Use Carbasa webshop header when Oscar enabled
This commit is contained in:
@@ -72,9 +72,11 @@ def _ensure_installed_app(app_label: str, *, before: str | None = None) -> None:
|
||||
INSTALLED_APPS.append(app_label)
|
||||
|
||||
|
||||
# Prefer Carbasa's webshop templates whenever this project runs as a webshop.
|
||||
# Ensures the full Carbasa webshop header (search, user bar, cart, megamenu).
|
||||
if ocyan_config.is_webshop and importlib.util.find_spec("ocyan.plugin.carbasa.webshop"):
|
||||
# Prefer Carbasa's webshop templates whenever Oscar is enabled.
|
||||
# Ensures the full Carbasa webshop header (search, user bar, cart, megamenu),
|
||||
# even when the environment doesn't mark the site as a webshop explicitly.
|
||||
_oscar_enabled = any("ocyan.plugin.oscar" in app for app in INSTALLED_APPS)
|
||||
if _oscar_enabled and importlib.util.find_spec("ocyan.plugin.carbasa.webshop"):
|
||||
_ensure_installed_app("ocyan.plugin.carbasa.webshop", before="ocyan.plugin.carbasa")
|
||||
|
||||
# Keep Carbasa/Coyote defaults stable even when plugin settings are not
|
||||
|
||||
Reference in New Issue
Block a user