Super5 Side Cart

By Super5

0+ active installationsVersion 1.0.0

A light, accessible slide-out cart for WooCommerce: change quantities, see free shipping progress and suggestions. No jQuery, safe with page caches.

Description

Super5 Side Cart opens the WooCommerce cart as a drawer from the side of the screen: from your theme’s cart button, from a floating cart button, and every time a product is added to the cart. Shoppers change quantities, see how far they are from free shipping, add a suggested product and go to checkout without leaving the page.

What makes it different

  • No jQuery, small and fast. The drawer is one plain JavaScript file and one stylesheet, loaded with defer. It still listens to WooCommerce’s jQuery events when a theme or plugin uses them.
  • Safe behind page caches. The page only carries an empty drawer. The cart itself comes from a WooCommerce AJAX endpoint that is never cached, so a cached page can never show one visitor another visitor’s cart. When the cart cookie says there are items, the count and the drawer are refreshed once on page load.
  • Free shipping threshold found for you. The progress bar reads the “Free shipping” minimum order amount from your shipping zones, with no extra setup. You can also type your own amount.
  • Accessible. A real dialog with a label, focus kept inside while it is open and returned to the cart button on close, Esc and backdrop to close, screen-reader labels on every button and a progress bar with values. The page behind does not jump when the scrollbar disappears.
  • Works with any theme. It takes over the theme’s own cart button (links to the cart in the header, the classic .cart-contents button, and the Mini-Cart block), and shows a floating cart button only on pages where no header cart button is visible.
  • Block and classic add to cart. It opens after WooCommerce’s AJAX buttons, the product blocks, and normal “Add to cart” forms on product pages.

Features

  • Quantity stepper with − / + and a typed amount. At 1 the − turns into a remove button; quantities above the stock are capped, with a message.
  • Free-shipping progress bar (“Add 25,00 € more for free shipping.”), turning green when the order ships for free.
  • Product suggestions: cross-sells of the cart (else products on sale), products you pick, or a category. Products already in the cart are never suggested, and simple products are added right from the drawer.
  • Total, a big checkout button, a short note, and “Card” / “Cash on delivery” badges for the payment methods your shop has turned on.
  • Settings under WooCommerce → Side Cart: colours, corner radius, width, left or right side, open on add to cart, floating cart button (Automatic, Always, Never), free shipping, suggestions, payment badges, and every text in the drawer.
  • Not shown on the cart and checkout pages, where the cart button stays a normal link. Without JavaScript, every cart button keeps working as a link.
  • Declares compatibility with WooCommerce’s High-Performance Order Storage and the Cart and Checkout blocks.
  • Optional “Side cart by Super5” credit link. It is off by default and only appears if you switch it on.

For developers

  • Open the drawer from any element with the data-s5sc-open attribute, or with document.dispatchEvent(new Event('s5sc:open')).
  • After a custom add to cart: document.dispatchEvent(new CustomEvent('s5sc:added', { detail: { fragments } })).
  • An element with data-s5sc-header-count shows the number of items.
  • Filters: super5_side_cart_enabled, super5_side_cart_texts, super5_side_cart_free_shipping_min, super5_side_cart_suggestion_ids, super5_side_cart_payments, super5_side_cart_trigger_selectors.

Privacy

Super5 Side Cart makes no external requests, sets no cookies of its own and collects no data. It reads the cart through WooCommerce, which uses its usual cart cookies.

About

Made by Super5, a web design agency in Bulgaria.

Installation

  1. Make sure WooCommerce is installed and active.
  2. Install and activate Super5 Side Cart from Plugins → Add New.
  3. Your theme’s cart button now opens the drawer. Go to WooCommerce → Side Cart to set colours, texts and options.

FAQ

Does it work with page caching plugins?

Yes. The HTML of your pages holds an empty drawer only, and the contents always come from WooCommerce’s uncached AJAX endpoint. This is the same way WooCommerce’s own cart fragments work.

My theme’s cart button still goes to the cart page.

Add the data-s5sc-open attribute to it, or add its CSS selector with the super5_side_cart_trigger_selectors filter. Links to the cart page inside the site header or navigation are picked up automatically.

Where does the free-shipping amount come from?

From the lowest “Free shipping” method with a minimum order amount in your shipping zones (WooCommerce → Settings → Shipping). If you enter an amount under WooCommerce → Side Cart, that amount is used instead. Without either, the bar stays hidden.

Why is the quantity endpoint not protected by a nonce?

The drawer has to work on cached pages, where a nonce in the HTML would be stale. Like WooCommerce’s own “remove from cart” and “add to cart” endpoints, it can only change the visitor’s own cart, and every input is checked strictly.

Why are there no Visa or Mastercard logos?

Card brand logos are trademarks with their own usage rules, so the badges use plain words and simple icons: “Card” and “Cash on delivery”.

What happens when I delete the plugin?

Its settings and cache are removed. Your cart and orders belong to WooCommerce and are not touched.

How can I report security bugs?

Please email support@super5.bg with the details, and do not post them in the public support forum.

Screenshots

Changelog

1.0.0

  • First release.