Skip to content

Add A–Z brand filter and grid/list toggle to the manufacturer overview#73

Open
SvenBrunk wants to merge 1 commit into
OXID-eSales:b-7.5.xfrom
SvenBrunk:b-7.5.x-brand-az-manufacturer-overview
Open

Add A–Z brand filter and grid/list toggle to the manufacturer overview#73
SvenBrunk wants to merge 1 commit into
OXID-eSales:b-7.5.xfrom
SvenBrunk:b-7.5.x-brand-az-manufacturer-overview

Conversation

@SvenBrunk

@SvenBrunk SvenBrunk commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

Adds an A–Z brand filter and a grid/list view toggle to the manufacturer overview page ("By manufacturer", cl=manufacturerlist root), 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 existing hasVisibleSubCats block, gated to listType == 'manufacturer':
    • A–Z jump bar (0–9, AZ); 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).
    • grid/list toggle (btn-primary active / btn-outline-primary inactive), preference kept in localStorage.
    • Progressive enhancement: brand letters are emitted as a data-brand-letter attribute; the index/anchor/toggle logic is a small inline script. With JS disabled the existing grid renders unchanged.
  • theme.php — new bool option blBrandAzEnabled (group display, default on).
  • de/theme_options.php, en/theme_options.php — label + help text for the option.

Scope / safety

  • Strictly gated to the manufacturer overview; category and vendor listings that share this template are unaffected.
  • Theme-aware: Bootstrap classes / CSS variables (--bs-border-color), no hardcoded colors (dark mode safe).
  • Product counts render as before (core, subject to blPerfShowActionCatArticleCnt) — unchanged.

Testing

Verified on OXID 7.5.1 / apex 3.1.0:

  • A–Z bar enables only present letters (folding verified), jump anchors correct.
  • grid ↔ list toggle switches layout and persists; active state clearly highlighted.
  • category and vendor lists unchanged (no A–Z bar); no console errors.
  • theme option off → plain core grid; on → feature returns; option visible under Admin → Themes → APEX → Settings (Display group).

Note

New theme options are registered in oxconfigdisplay on 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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants