Skip to content

Snowdog's menus on a rendered page come from documents - #37

Merged
Sental merged 3 commits into
mainfrom
snowdog-menu-documents
Oct 18, 2026
Merged

Sental merged 3 commits into
mainfrom
snowdog-menu-documents

Conversation

@Sental

@Sental Sental commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Every rendered page read its Snowdog menus, their nodes, and the url rewrites and categories of the category nodes from the database. A menu feed now writes the menus as documents per store view, a trigger on the node groups table exports a menu whose node groups change, and the categories feed carries the count a category node reads, so a page served from documents renders its menus without SQL. The module registers only where Snowdog_Menu is installed.

Written by Claude Code:

CatalogStorefrontSnowdogMenu serves Snowdog_Menu's reads on a rendered page from documents, under the ProductFrontend mode and strict: MenuRepositoryInterface::get(), NodeRepositoryInterface::getByMenu() and the fetchData() of every node type that reads (category, product, CMS page, CMS block).

  • Feed snowdogMenus (indexer catalog_storefront_snowdog_menus, rebuild entity snowdog_menu): a document per active menu in each store view it is assigned to, directly or through store 0, with the active pages and blocks its CMS nodes name per store, and a marker the rebuild seeds. Model/Mview/MenuLookupSubscription marks the menus of a row that names no menu: a node's customer groups, a page or block and their store rows.
  • The categories feed gets menuProductCount, the rows of the category in the category product index, with a subscription on catalog_category_product.
  • Node URLs come from the url rewrite documents, categories from CategoryDocuments, products from the product documents. A product node's price is the price its listing card advertises (core's final price on the model built from the document; the minimal amount of a bundle; the cheapest product of a grouped product; as the tax and fixed product tax renderers display it), not the index's min_price.
  • CategoryFrontend\Model\LoadedCollection gives its categories back on a reload after clear(): its select has no filter, so a category child node listed every category.
  • The delivery purges snowdog_menu_menu_<id> after a menu write and cat_c_p_<id> after a categories write.
  • registration.php registers the module only where Snowdog\Menu\Api\MenuRepositoryInterface exists; snowdog/module-menu is suggested, not required. The unit job installs it.

Listing parity 4 of 4 and detail parity 6 of 6 identical with a menu that holds every node type. The document path runs no SQL for any node type.

🤖 Generated with Claude Code

Sental and others added 3 commits October 18, 2026 17:10
Every rendered page read its Snowdog menus, their nodes, and the url rewrites and categories of the category nodes from the database. A menu feed now writes the menus as documents per store view, a trigger on the node groups table exports a menu whose node groups change, and the categories feed carries the count a category node reads, so a page served from documents renders its menus without SQL. The module registers only where Snowdog_Menu is installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reload

A caller that clears the children collection of a category served from its document and loads it again, as Snowdog's category child node does, ran the collection's select, which carries no filter, and got every category of the catalog. The collection now gives its own categories back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A menu with product, CMS page or CMS block nodes still read the tables for them on a page served from documents. The product node reads the product and url rewrite documents and shows the price its listing card advertises, the CMS nodes read the pages and blocks the menu feed now exports with the menu, and triggers on the CMS tables export the menus that name a changed page or block. The unit job installs Snowdog for the module's tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Sental
Sental merged commit ee473bb into main Oct 18, 2026
8 checks passed
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.

1 participant