Selecting variants in the product listing, shopping basket and checkout


Installation instructions, documentation and FAQs for the Shopware plugin

Selecting variants in the product listing, shopping basket and checkout

With Selecting variants in the product listing, shopping basket and checkout Your customers can easily select and switch between product variants – from the first click on the product listing right through to the order summary at checkout. Instead of deleting an item and searching for the correct variant again, all it takes is a single click on the relevant selection field.

The variant selection is available in four places:

  • in the Product listing (via a selection modal when clicking „Add to basket“),
  • in the Shopping basket,
  • in the OffCanvas shopping basket (the drop-down mini-basket) and
  • in the Order summary at checkout.

A separate selection field appears for each attribute (e.g. colour or size). If the customer selects a different option, the plugin automatically replaces the item with the corresponding variant. If the new variant is already in the shopping basket, the quantities are combined.


Prerequisites

  • Shopware 6.7
  • Products with Variants (Properties such as colour, size, etc.). No selection box appears for items without variants.

Compatibility

The plugin enhances the standard display of product listings, shopping basket items in the shopping basket, the off-canvas shopping basket and the checkout. It utilises the standard Shopware variants (properties / property groups) and does not require any external services.


Installation

  1. Purchase the plugin from the Shopware Store and via Extensions > My extensions Install.
  2. Plugin activate.
  3. In the Storefront, refresh the page once (Ctrl + F5) so that the selection fields appear.

Settings

You can find the configuration under Extensions > My extensions in the „Variant Selection in Listing, Basket & Checkout“ plugin, via the three dots > Configuration. In the area of General settings There are four options available:

Plugin configuration with all four settings
Configuring the extension in the admin panel

Hide inactive variant combinations

Disabled by default. If this switch is enabled, the following will appear in the selection fields only combinations of variants that are actually available displayed. The plugin hides options that do not lead to a purchasable variant. This prevents customers from selecting a combination that does not exist.

Open the variant selection modal in the listing

Disabled by default. If this switch is enabled, clicking „Add to basket“ for a variant product in a listing, in sliders or in experience worlds will open a modal for selecting variants before the product is added to the basket. The Shopware setting „Allow purchase from listing“ is taken into account. Clear the cache after changing this setting.

Display mode for changing variants in the shopping basket

Specifies how variant changes are displayed in the shopping basket, the off-canvas shopping basket and the checkout:

  • Inline drop-downs (Default) – the selection fields appear directly at that position.
  • Modal – instead, a „Change variant“ button appears, which opens a selection modal.

Disable variant switching in the off-canvas shopping basket

Disabled by default. If this switch is enabled, the selection fields appear not in the OffCanvas shopping basket – where the properties are displayed as normal text again. It is still possible to change variants in the shopping basket and during checkout.


1 · Select the variant in the listing

If the setting „Open variant selection modal in listing“ is enabled, clicking „Add to basket“ for a variant product in the product listing, in sliders or in experience worlds will open a modal for selecting variants. This ensures that the correct variant is added to the basket without the customer having to visit the product details page first.

Variant selection modal in the product listing
Select the variant directly in the product listing before adding it to your basket

The Shopware setting „Allow purchase from listing“ is taken into account here – if it is disabled, no selection modal will appear.


2 · Change the variant in your basket

If an item in the shopping basket has variants, the plugin displays either a drop-down menu for each attribute directly next to the item, or a „Change variant“ button that opens a selection modal, depending on the selected display mode. In both cases, the item is immediately replaced with the appropriate variant, and the price and availability are updated.

Inline drop-downs (Standard) in the OffCanvas shopping basket, without reloading the page:

Changing variants in the OffCanvas shopping basket
Change the variant directly in the OffCanvas shopping basket

On the Shopping basket page the selection is applied and the page refreshes briefly:

Changing variants on the shopping basket page
Selection fields for each property in the shopping basket (inline mode)

In the Modal display mode Instead, the „Change variant“ button opens a selection window:

Change variant via a modal in the shopping basket
The „Change variant“ button opens the selection modal (modal mode)

In the Order summary at checkout Can the variant still be changed?

Changing variants at checkout
Changing variants in the checkout order summary

3 · Exclude property from variant change

In some cases, customers should not be allowed to change every property – for example, if the colour is to remain fixed whilst the size can still be changed. To achieve this, each Property group exclude them individually from the variant change.

How to enable the exclusion

  1. In the admin section, go to Catalogues > Features change.
  2. Open the required property group (e.g. „Colour“).
  3. The switch „Exclude a change of variant“ Enable and save.
  4. Then the Clear cache, so that the change takes effect in the storefront.
Custom field „Exclude from variant change’
„Exclude from variant change“ switch in the property group

This is how the exclusion affects things

An excluded property is no longer offered as a selection option in the listing modal, shopping basket, off-canvas shopping basket and checkout, but is instead displayed as fixed text shown. The customer can still see which option (e.g. which colour) has been selected, but can no longer change it. All other properties can still be changed as normal.

The restriction is also enforced on the server side – the blocked property cannot be circumvented, even via tampered requests.


FAQs

Check whether the setting „Open variant selection modal in the listing“ is enabled in the plugin configuration, and then clear the cache. In addition, the Shopware setting „Allow purchase from the listing“ must be enabled – otherwise no modal will appear.

In the plugin configuration, under „Display mode for changing variants in the shopping basket“, select „Modal“ instead of „Inline drop-downs“ and save. The „Change variant“ button will then appear in place of the drop-downs.

Selection fields only appear for items with variants (attributes such as colour or size). Individual products without variants do not have a variant selector. If the item has variants but nothing appears, please refresh the page using Ctrl + F5.

In the plugin configuration, tick the box labelled „Hide inactive variant combinations“. This will ensure that only combinations that can actually be purchased are displayed in the selection fields.

After changing the „Exclude from variant change“ toggle in the property group, the cache must be cleared. Only then will the lock take effect in the Storefront.

Yes. To do this, tick the box labelled „Disable variant switching in the off-canvas shopping basket“. You will still be able to switch variants in the shopping basket and during checkout.

The quantities are combined: the existing item is converted to the new variant and added to the existing item of the same variant.


Support

If you have any questions or problems, please do not hesitate to contact us: