Skip to content

Installation

P2Lab Advanced Layouts Assigner is a regular Shopware 6 plugin. You install it the same way you install any other plugin — via the admin Extensions page, via Composer, or via the CLI.

  • Shopware 6.7 (the plugin’s composer.json constrains shopware/core, shopware/administration and shopware/storefront to >=6.7 <6.8)
  • A user role that can access Settings → Extensions and Content → Shopping Experiences
  1. Download the plugin ZIP (P2LabCmsAssigner_vX.Y.Z.zip) from your distribution source.
  2. In the Shopware admin go to Extensions → My extensions → Upload extension and pick the ZIP.
  3. After upload, click Install next to the Advanced Layouts Assigner entry.
  4. Click Activate.
  5. Clear the admin cache and hard-reload the browser (Ctrl+Shift+R) so the new admin bundle loads.

If you have shell access to the Shopware host, copy the plugin into custom/plugins/P2LabCmsAssigner and run:

Terminal window
bin/console plugin:refresh
bin/console plugin:install --activate P2LabCmsAssigner
bin/console cache:clear

If you self-build administration:

Terminal window
bin/build-administration.sh
  1. Open Settings → Extensions → Advanced Layouts Assigner. You should see the configuration form with cards titled Welcome, Replacement mode, Landing page and Replacement types.
  2. Open Settings → Rules → Create new rule and add a condition. The condition picker should now include three new entries (under their respective categories):
    • Is homepage [P2Lab Layouts Assigner]
    • Item in category [P2Lab Layouts Assigner]
    • Item in category with children [P2Lab Layouts Assigner]
  3. Open Content → Shopping Experiences, open any layout, click Layout assignment in the right sidebar, then Assign layout. You should see a Rules tab in the modal (next to Categories / Products / Landing pages).

If the Rules tab is missing from the layout assignment modal, or the new conditions don’t show up in the rule builder:

  • Confirm the plugin is activated under Extensions → My extensions.
  • Clear the admin cache: bin/console cache:clear.
  • Hard-reload the admin (Ctrl+Shift+R) so the browser fetches the new bundle.
  • Check that your user role has access to the new ACL keys.

The post-install routine seeds sane defaults into the system config (per sales channel — including the global “Default” scope):

  • Product page replace modeWithout assigned layout
  • Category page replace modeWith default layout
  • Landing page replace modeWith default layout
  • Product page replacement typesProduct page
  • Shop page replacement typesShop page
  • Landing page replacement typesLanding page
  • Listing page replacement typesListing page

These defaults are conservative — they only allow the plugin to replace what is already a natural fit. See Replacement modes and Replacement types to widen them.

Uninstalling drops the plugin’s p2lab_cms_assigner_cms_page_to_rule table only if you uncheck “Keep user data” in the uninstall dialog. With “Keep user data” checked, the table — and all your rule-to-layout assignments — survive a reinstall.

The plugin is installed but inert until you assign rules to layouts and configure which base layouts are eligible for replacement. Continue to How it works.