Add A–Z brand filter and grid/list toggle to the manufacturer overview#73
Open
SvenBrunk wants to merge 1 commit into
Open
Add A–Z brand filter and grid/list toggle to the manufacturer overview#73SvenBrunk wants to merge 1 commit into
SvenBrunk wants to merge 1 commit into
Conversation
The manufacturer overview ("By manufacturer", cl=manufacturerlist root) so far
renders a plain alphabetical grid of all manufacturers. Scoped to that overview
only, this adds:
- an A–Z jump bar (0–9, A–Z) that scrolls to the first brand of a letter;
letters without a brand are disabled. Umlauts are folded (Ä→A, Ö→O, Ü→U, …).
- a grid/list view toggle, remembered client-side via localStorage.
Progressive enhancement: brand letters are emitted as a data-brand-letter
attribute and all index/anchor/toggle logic lives in a small inline script, so
with JS disabled the existing brand grid renders unchanged. Category and vendor
listings share page/list/list.html.twig and are left untouched (the additions
are gated to listType == 'manufacturer').
The feature can be switched off via the new theme option "blBrandAzEnabled"
(group display, on by default).
Claude-Session: https://claude.ai/code/session_01MjXhcohDSe5tiNfXuXrHXr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an A–Z brand filter and a grid/list view toggle to the manufacturer overview page ("By manufacturer",
cl=manufacturerlistroot), plus a theme option to enable/disable it.Why
The manufacturer overview currently renders only a flat alphabetical grid of all manufacturers. On shops with many brands that is hard to navigate; an A–Z brand directory is a common feature on other platforms (Shopware, Magento, WooCommerce).
Changes
tpl/page/list/list.html.twig— within the existinghasVisibleSubCatsblock, gated tolistType == 'manufacturer':0–9,A–Z); present letters link to the first brand of that letter (smooth scroll), missing letters are disabled. First letters are folded (Ä→A, Ö→O, Ü→U, accents, ß→S).btn-primaryactive /btn-outline-primaryinactive), preference kept inlocalStorage.data-brand-letterattribute; the index/anchor/toggle logic is a small inline script. With JS disabled the existing grid renders unchanged.theme.php— newbooloptionblBrandAzEnabled(groupdisplay, default on).de/theme_options.php,en/theme_options.php— label + help text for the option.Scope / safety
--bs-border-color), no hardcoded colors (dark mode safe).blPerfShowActionCatArticleCnt) — unchanged.Testing
Verified on OXID 7.5.1 / apex 3.1.0:
Note
New theme options are registered in
oxconfigdisplayon theme (re)activation. On a fresh install this happens automatically; an already-active theme has to be re-activated once for the option to appear in the admin.Origin: internal OPALE-137.