PHPackages                             fyrst/shopware-variants-grid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fyrst/shopware-variants-grid

ActiveShopware-platform-plugin[Utility &amp; Helpers](/categories/utility)

fyrst/shopware-variants-grid
============================

Variants Grid for Shopware 6 product detail pages

0.2.0(yesterday)00MITTwig

Since Jul 1Pushed yesterdayCompare

[ Source](https://github.com/fyrst-digital/shopware-variants-grid)[ Packagist](https://packagist.org/packages/fyrst/shopware-variants-grid)[ RSS](/packages/fyrst-shopware-variants-grid/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

Fyrst Variants Grid
===================

[](#fyrst-variants-grid)

A Shopware 6 static plugin that renders a paginated variants grid on product detail pages for products with variants.

Requirements
------------

[](#requirements)

- Shopware 6.7.x
- PHP 8.3
- Composer-based Shopware installation

Features
--------

[](#features)

- Automatically shows a variants grid on any product detail page that has variants.
- Dynamic columns based on the product's configurator groups.
- Quantity input for every variant row.
- Single "Add all to cart" button.
- Server-side filtering of rows with zero quantity via a dedicated controller.
- Seamless lazy-loading pagination via JavaScript fetch.
- Preserved quantities across pagination pages.
- Offcanvas cart opens after adding variants, matching default Shopware behavior.
- Configurable rows per page via plugin configuration.
- Unavailable variants are rendered as disabled rows.
- Color/option media rendered as swatches where applicable.

Installation
------------

[](#installation)

This plugin is installed as a static plugin via a Composer path repository.

1. Make sure the plugin is located at `custom/static-plugins/FyrstVariantsGrid/`.
2. Add the path repository to your root `composer.json` if it is not already present:

    ```
    {
        "repositories": [
            {
                "type": "path",
                "url": "custom/static-plugins/*",
                "options": {
                    "symlink": true
                }
            }
        ]
    }
    ```
3. Require the plugin:

    ```
    composer require fyrst/shopware-variants-grid
    ```
4. Install and activate the plugin:

    ```
    bin/console plugin:install FyrstVariantsGrid
    bin/console plugin:activate FyrstVariantsGrid
    ```
5. Build the storefront assets:

    ```
    ./bin/build-storefront.sh
    ```

Configuration
-------------

[](#configuration)

Open the plugin configuration in the Shopware administration to set:

- **Rows per page** — the maximum number of variants displayed per page in the grid. Default: `10`.

How it works
------------

[](#how-it-works)

### Drop-in template override

[](#drop-in-template-override)

The plugin overrides the standard buy-box template via:

```
src/Resources/views/storefront/element/cms-element-buy-box.html.twig

```

This keeps the implementation lightweight and avoids a custom CMS element.

### Custom controller

[](#custom-controller)

Instead of submitting to the default line-item route, the grid form posts to a dedicated controller:

```
frontend.checkout.variants-grid.add

```

This controller receives every row, ignores entries with `quantity
