Markus Michalski FAQ

Cart & Checkout Attributes: Extending

Repository interface, the plugin's own Twig hook points and the admin menu convention for other plugins and the host app.

Deutsche Version

Back to overview

Cart & Checkout Attributes: Extending

Read access via interface and Twig functions

ProductAttributeDisplayConfigRepositoryInterface is the read access point to the display configuration that the plugin itself uses. The five public Twig functions from CartCheckoutAttributeValuesExtension (see Storefront) are the actual extension surface for templates - a custom theme or plugin can call the same functions from its own template instead of overriding this plugin's hook templates.

The plugin's own hook points

The hook points this plugin registers itself (the admin form card cart_checkout_display, the five attributes hookables on the storefront, the settings page's hookables) are the generic Sylius mechanism - another plugin could in principle hook into these points too. Nothing in the repository documents this as a supported use case anywhere.

Admin menu convention

The admin sidebar entry sits under a shared "MMKreativ Plugins" group (MenuGroup::CODE = 'mmd_plugins'). This class is deliberately not a shared dependency - it is copied into sibling plugins by the same author (such as mmd/sylius-product-custom-inputs-plugin) so that several MMKreativ plugins show the same sidebar group instead of one entry each. A plugin that wants to follow this convention copies the same CODE constant.

There is no documented, versioned backward-compatibility promise for interfaces, service IDs or hook names - the points above are conventions, not a contractually guaranteed interface.