Sticky Add-to-Cart Bar: Buy Button Always in View
Sticky cart for the product page: once the buy box scrolls out of view, price, quantity and cart button stay visible in a slim bar. The purchase runs through your original button.
On this page
- Introduction
- What this plugin does for you
- Who is this plugin for?
- Installation
- Getting Started
- Settings
- Settings per sales channel
- Open documentation
- Enable plugin for this sales channel
- Show on mobile devices only
- Mobile breakpoint
- Position
- Stacking order (z-index)
- Show product image
- Show price
- How to Use the Features
- How the bar appears while scrolling
- How variants appear in the bar
- How a customer adds a product to the cart from the bar
- How to dock the bar at the top
- What the bar looks like on a smartphone
- How to switch the bar off for a sales channel
- Troubleshooting
- The bar does not appear
- A change in the settings does not show in the store
- With the cookie notice open, the bar lies behind it
- The bar covers an element of my theme (or disappears behind it)
- My tracking counts clicks on “Add to shopping cart” twice
- All settings
- General
- FAQ
- For Administrators / Technical Details
- System requirements
- Headless stores and custom frontends
- Cache
- Accessibility
- Devices with a notch or home indicator
- Installation via the command line
Introduction
The Sticky Add-to-Cart Bar makes sure your customers can buy on the product page at any time — even after scrolling far down into the description.
As soon as the buy box of the product page scrolls out of view, a slim bar slides in at the bottom (or top) edge of the browser window. It shows the product image, product name, price, quantity and the Add to shopping cart button. When the buy box is back in view, the bar disappears.
What this plugin does for you
- After reading the product description, your customers no longer have to scroll back up to buy.
- On smartphones in particular, where the buy box quickly disappears from view, buying stays one tap away.
- The purchase runs through your store’s regular buy box. Cart, off-canvas cart and other extensions on the product page therefore keep working unchanged.
- The quantity is kept in sync between the bar and the buy box in both directions.
- The price is shown with the base price; with tier prices, “From” appears in front of the price.
- Sold-out or non-purchasable products show no bar — so the bar never invites a purchase that is not possible.
- You set everything up per sales channel: on or off, mobile devices only, position top or bottom, with or without product image and price.
Who is this plugin for?
For store owners with product pages that carry a lot of content below the buy box — long descriptions, properties, reviews, questions and answers. It pays off especially for stores with a high share of smartphone visitors.
Installation
After purchase, the plugin is available directly in your Administration — you do not need to download anything.
- Log in to your Shopware Administration (
yourstore.com/admin). - Open Extensions → My extensions.
- Next to Sticky Add-to-Cart Bar: Buy Button Always in View, click Install.
- Activate the plugin using the switch next to the entry — done.
Fig. 1: The activated plugin under Extensions → My extensions
Right after activation, the bar is switched on in all sales channels. You do not need to configure anything else for it to appear on your product pages.
If Sticky Add-to-Cart Bar: Buy Button Always in View does not appear in the list, your Shopware account is not yet connected to the store. You can do this under Extensions → My extensions by logging in with your Shopware account.
Getting Started
- Open the settings: Go to Extensions → My extensions and click Configure for the plugin.
- Check the essentials: The switch Enable plugin for this sales channel is turned on. With the remaining values, the bar starts like this: on all devices, at the bottom edge, with product image and price.
- See the result: Open a product page in your store and scroll down until the buy box disappears. The bar slides in at the bottom edge.
Section 5.1 shows what this looks like.
Settings
You find the settings under Extensions → My extensions → Configure. All options are in the General card.
Fig. 2: The plugin’s configuration page
After every change, click Save in the top right corner.
Settings per sales channel
At the very top you see the Sales Channel field. If it says All Sales Channels, your values apply to every sales channel of your store.
If you select a specific sales channel there, all fields initially take over the values from All Sales Channels. You can recognise this by the link icon next to each field. Click the icon to break the link and set a value for exactly this sales channel.
Fig. 3: A single sales channel initially inherits all values
Why this is useful: If you run, for example, a B2C and a B2B store, you can show the bar in one channel and switch it off in the other — or dock it at the top in one channel and at the bottom in the other.
Open documentation
The Open documentation button sits at the very top of the card. It opens this manual on our website in the language of your Administration. In the view of a single sales channel the button is greyed out — switch to All Sales Channels to use it.
Enable plugin for this sales channel
With Enable plugin for this sales channel you switch the sticky add-to-cart bar off for a sales channel without uninstalling the plugin. The switch is turned on by default.
Why this is useful: You can disable the bar in individual stores — for example in a channel whose theme already brings its own buy bar — and switch it back on later with one click. Your other settings are kept.
Show on mobile devices only
When Show on mobile devices only is enabled, the bar only appears on screens narrower than the breakpoint selected below. On larger screens it stays off. The option is turned off by default — so the bar appears on all devices.
Why this is useful: On desktop, the product page is often wide enough for the buy box to stay visible next to the description for a long time. If you only need the bar where space is tight, enable this option.
Mobile breakpoint
With Mobile breakpoint you define from which screen width a device counts as mobile. The setting only takes effect together with Show on mobile devices only. You have three choices:
- Below 576 px (small smartphones) — the bar only appears on very narrow screens.
- Below 768 px (smartphones) — the default; the bar appears on common smartphones.
- Below 992 px (smartphones and tablets in portrait mode) — the bar also appears on tablets held upright.
Why this is useful: If many of your customers shop on a tablet, choose the widest option so they see the bar too.
Position
With Position you dock the bar to the bottom or the top edge of the browser window. You can choose Bottom (default) or Top.
Why this is useful: At the bottom, the bar sits right where the thumb is on a smartphone. The top is a good choice if something else is already fixed at the bottom edge, such as a chat button or a navigation bar of your theme. Section 5.4 shows what the bar looks like at the top.
Stacking order (z-index)
With Stacking order (z-index) you decide whether the bar lies above or below other elements that are also fixed to the window edge. The higher the number, the further on top the bar lies. The default 990 sits above the scroll-up button and below search suggestions, off-canvas cart and cookie notice. Values from 1 to 99999 are allowed.
Why this is useful: Adjust the value if the bar overlaps or hides behind a cookie banner or chat widget. If the bar covers something that should be on top, lower the value. If the bar disappears behind another element, raise it.
Show product image
With Show product image you show or hide the small product image on the left of the bar. It is turned on by default.
Why this is useful: The image shows your customers at a glance which product they are adding to the cart. If you turn it off, there is more room for name and price.
Show price
With Show price you show or hide the price in the bar. It appears as the unit price including the base price, as required for price display regulations. The option is turned on by default.
Why this is useful: The price right next to the buy button gives your customers confidence when they click. Only turn it off if the price in the buy box stays permanently visible anyway.
How to Use the Features
How the bar appears while scrolling
What this gives you: Your customers always have the buy button in view — the bar arrives exactly when the buy box disappears.
As long as the buy box on the product page is visible, there is no bar.
Fig. 4: The buy box is in view, the bar stays hidden
When your customer scrolls further down and the buy box leaves the visible area, the bar slides in. When they scroll back until the buy box is visible again, it disappears.
Fig. 5: The bar after scrolling
In the bar, your customer sees:
- the product image (can be turned off with Show product image),
- the product name,
- the price with base price (can be turned off with Show price) — with “From” in front for tier prices,
- the quantity selector with − and +, provided more than the minimum quantity can be bought,
- the Add to shopping cart button.
So that the footer of your page is not covered, the bar automatically makes room at the bottom of the page in its own height. Your store’s scroll-up button also moves up while the bar is visible at the bottom.
Tip: The bar only appears on product pages. Category pages, cart and checkout stay unchanged.
How variants appear in the bar
What this gives you: For products with variants, your customer sees in the bar which version they have selected — and adds exactly that one to the cart.
Once your customer has fully selected a variant, the bar shows a line with the selected properties and their values below the product name.
Fig. 6: The bar shows the selected variant (names from the demo data)
Shopware always opens a product with variants with one variant selected. If your customer picks another version in the buy box, Shopware reloads the page for that variant, and the bar then shows the new variant with its price.
How a customer adds a product to the cart from the bar
What this gives you: Buying from the bar works exactly like clicking the button in the buy box — with the same quantity, the same cart and the same confirmation.
- Your customer sets the desired quantity in the bar with − and +.
- They click Add to shopping cart.
- The cart opens at the side as usual, with the message that the product was added.
Fig. 7: The cart after buying from the bar
The quantity in the bar and the quantity in the buy box are always the same. If your customer changes the quantity in one place, the other takes it over automatically. Minimum and maximum quantities as well as purchase steps of your product also apply in the bar.
Important: If the button in the buy box cannot be clicked at the moment, neither can the button in the bar. The bar never bypasses the rules of your store.
How to dock the bar at the top
What this gives you: If another element of your store already sits at the bottom edge, the bar stays clearly in view at the top.
- Go to Extensions → My extensions → Configure.
- Under Sales Channel, select the desired channel or All Sales Channels.
- Under Position, select Top.
- Click Save.
The bar now appears at the top edge of the browser window as soon as the buy box scrolls out of view.
Fig. 8: The bar with the position Top
What the bar looks like on a smartphone
What this gives you: On small screens in particular, the buy box quickly disappears from view. The bar brings the buy button to where the thumb already is.
On a smartphone, the bar shows the product image, a shortened product name, the price and the Add to shopping cart button. On very narrow screens (below 576 px), the quantity selector and the variant line are left out so the button stays large enough. The quantity set in the buy box is then the one that is bought.
Fig. 9: The bar on a smartphone
The bar appears whenever the buy box is out of view — no matter whether it lies above or below the visible area. On smartphones, the image gallery and product details often come before the buy box. In that case the bar is visible right after the page opens and disappears once your customer scrolls down to the buy box. This lets them buy immediately, without swiping down first.
Tip: If you only want to show the bar on smartphones, enable Show on mobile devices only (see section 4).
How to switch the bar off for a sales channel
What this gives you: You decide per store whether the bar is active there — without uninstalling the plugin.
- Go to Extensions → My extensions → Configure.
- Under Sales Channel, select the channel in which the bar should not appear.
- Click the link icon next to Enable plugin for this sales channel and turn the switch off.
- Click Save.
Tip: If you only want to show the bar in a single channel, turn it off under All Sales Channels and turn it back on specifically in that one channel.
Troubleshooting
The bar does not appear
Cause: There are several possible reasons. Go through them in order.
How to fix it:
- Plugin active? Check under Extensions → My extensions whether the switch next to the plugin is turned on.
- Enabled for this sales channel? Open Configure, select exactly the channel you are looking at under Sales Channel, and check Enable plugin for this sales channel.
- Mobile devices only? If Show on mobile devices only is enabled, the bar does not appear on a wide screen. Test with a smartphone or a narrow browser window — or turn the option off.
- Product purchasable? For sold-out or non-purchasable products, the plugin deliberately shows no bar.
- Buy box still visible? The bar only comes once the buy box has left the visible area. Scroll further down. On a very large screen with a short product page, the buy box may stay visible the whole time — then no bar is needed.
- On the right page? The bar only exists on product pages.
A change in the settings does not show in the store
Cause: When you save, the plugin clears the cache for the affected pages itself. If the page is still outdated, it is usually still held in your browser’s cache or by an upstream server.
How to fix it:
- Reload the product page, ideally in a private browser window.
- If that does not help, clear the store’s cache: Settings → System → Caches & indexes → Clear cache.
With the cookie notice open, the bar lies behind it
Cause: This is intended. The cookie notice should be read and confirmed first, so it lies above the bar. During that time the scroll-up button sits a little higher than usual, because it makes room for both the cookie notice and the bar.
How to fix it: Nothing to do. As soon as your customer confirms the cookie notice, the bar is fully visible and the scroll-up button returns to its place.
The bar covers an element of my theme (or disappears behind it)
Cause: Some themes or extensions fix their own elements to the bottom edge of the window, such as a mobile navigation bar or a chat button. The plugin only moves Shopware’s own scroll-up button up — such other elements can overlap with the bar.
How to fix it:
- Change the Stacking order (z-index): if the other element should be on top, lower the value. If the bar should be on top, raise it.
- Or set Position to Top so the bar and the element no longer meet.
- Afterwards, check the result once on a smartphone and on desktop.
My tracking counts clicks on “Add to shopping cart” twice
Cause: In the background, the button in the bar triggers the button in the buy box. This makes sure quantity, variant and all additional details end up in the cart. So that tracking tools watching Shopware’s buy buttons count a purchase from the bar only once, the bar button deliberately does not carry their marker. If your tracking still counts twice, it evaluates every button click and therefore sees two clicks: one in the bar and one in the buy box.
How to fix it: Evaluate the actual add-to-cart events in your tracking instead of plain button clicks. If that is not possible, talk to the provider of your tracking tool. Orders and the cart itself are not affected — the product only ends up in the cart once.
All settings
Every setting in the plugin configuration with its default value, in the order shown in the Administration. As of version 6.7.0.
General
| Setting | Default | Description |
|---|---|---|
| Enable plugin for this sales channel | on | Switch the sticky add-to-cart bar off for this sales channel without uninstalling the plugin. |
| Show on mobile devices only | off | When enabled, the bar only appears on screens narrower than the breakpoint selected below. |
| Mobile breakpoint | Below 768 px (smartphones) | Only takes effect together with “Show on mobile devices only”. Screens below this width count as mobile. |
| Position | Bottom | Dock the bar to the bottom or to the top edge of the browser window. |
| Stacking order (z-index) | 990 | Adjust if the bar overlaps or hides behind a cookie banner or chat widget. Default 990 sits above the scroll-up button and below search suggestions, off-canvas cart and cookie notice. |
| Show product image | on | |
| Show price | on | Shows the unit price including the base price, as required for price display regulations. |
FAQ
Q: Do I need to configure anything after installation?
A: No. After activation, the bar appears in all sales channels at the bottom edge, with product image and price. You only need the settings if you want something different.
Q: Does the bar have its own add-to-cart process?
A: No. A click in the bar triggers the button in the buy box. Cart, off-canvas cart and other extensions on your product page therefore work exactly as with a normal purchase.
Q: Why do I not see a bar on a product?
A: For sold-out or non-purchasable products, the plugin deliberately hides the bar. You find other reasons in section 6 under “The bar does not appear”.
Q: What does “From” in front of the price mean?
A: The product has tier prices. The bar then shows the cheapest tier price with “From” in front.
Q: Can my customer switch the variant in the bar?
A: No. The bar shows the selected variant. Switching happens in the buy box on the product page; afterwards the bar shows the new variant.
Q: Can I show the bar on smartphones only?
A: Yes. Enable Show on mobile devices only and choose under Mobile breakpoint up to which screen width the bar should appear.
Q: Can all customers use the bar?
A: Yes. While the bar is hidden, it cannot be reached with the keyboard and screen readers do not read it out. Customers who have enabled reduced motion on their device see the bar without the slide-in animation.
Q: In which languages is the bar labelled?
A: In German, English and Dutch. The bar follows the language in which your customer is currently viewing the store.
For Administrators / Technical Details
This section is intended for technical administrators. You do not need it for normal use.
System requirements
- Shopware: 6.7 (from 6.7.0)
- PHP: 8.2 or newer
Headless stores and custom frontends
The bar is fully built into the Shopware Storefront. For headless frontends (for example Composable Frontends or custom Vue or Nuxt projects), the plugin provides a Store API route:
GET or POST /store-api/swp-sticky-add-to-cart/product/{productId}
Per product and sales channel, it returns the settings of the bar and its state: whether the bar should appear, whether the buy or the options button is shown (the route returns the options button when the frontend requests a parent product with variants; the Shopware storefront always shows a variant), name, variant, image, price with base price, the “From” flag, and minimum, maximum and step quantity. The route uses the sales channel access key like Shopware’s product routes. If the plugin is switched off in the sales channel, the route reports that no bar should appear. The frontend builds the display itself and adds the item to the cart via Shopware’s regular cart route.
Cache
Product pages and Store API responses are cached with dedicated cache tags per sales channel. When you save a plugin setting, the store clears exactly the affected pages — for a single sales channel or, with All Sales Channels, for all of them.
Accessibility
The hidden bar cannot be reached by keyboard or screen reader. If the bar disappears while the focus is inside it, the focus moves back to the buy box. The operating system’s “reduced motion” setting is respected.
Devices with a notch or home indicator
The bar keeps its distance from the safe areas of the screen as soon as the theme uses the full screen area. The plugin itself does not change your theme’s viewport setting.
Installation via the command line
php bin/console plugin:refresh
php bin/console plugin:install SwpStickyAddToCartSix --activate
php bin/console cache:clear
This manual was written for Sticky Add-to-Cart Bar: Buy Button Always in View, version 6.7.0.
How much help do you need?
-
Updates and compatibility: Plugin-Care from €149 per month
Before every Shopware release we check whether your plugins keep up. You get a written recommendation and install the updates yourself. Cancel monthly.
See Plugin-Care -
Setup or customisation: intro call
Want us to set up the plugin, or are you missing a feature? We sort that out in a free intro call.
Book an intro call
Something in the plugin not working? Write to us
More manuals
Address Validation: House Number Check & Corrections
Address validation at the point of entry: the plugin spots missing house numbers, can suggest corrections via Google and helps you send fewer parcels that come back undeliverable.
Open manual Shopware 6Admin Password Reminder
Admin Password Reminder: your backend users renew their passwords on time, prompted after login and by a daily email. Premium locks expired accounts until the password is changed.
Open manual Shopware 6Admin Tweaks: Backend Lists & Shortcuts
Admin Customization
Open manualNeed a team that keeps your shop running?
We have been working with Shopware since 2010 and maintain shops including updates, hotfixes and the plugins you are configuring right now.