Sticky Cart Header - Magento 2 module documentation
Author: Paweł Wasiluk
Sticky Cart Header Module
Module overview
Let your customers see the cart regardless of which part of the page they are in. The Sticky Cart Header module adds so-called sticky header with the current state of the cart and buttons that allow you to quickly go to the shopping process or basket.
Module compatibility
This module is compatibile with Magento Community versions: 2.3.
How it works
After installing the module, head to the Admin Panel. There, go to Stores > Configuration > Aurora > StickyHeader.
Under the given weight, you will receive configurations for the module, consisting of 2 fields:
Enable On Main Page - enable the module for all pages except the product card
Enable On Product Page - enable the module for the product card page
After completing the configuration. Sticky header is now fully functional. On all pages excluding the product card, the module is as follows:
And on the product card page, where it differs in that instead of going to the cart and purchasing process, it allows you to add the product to the cart:
It is worth noting that sticky header is applied only if we have a product in the cart.
Demo
Installation
Composer
- Add repo to composer.json:
"repositories": [
...
{
"type": "vcs",
"url": "git@git.auroracreation.com:magento2/sticky-cart-header.git"
}
...
],
- Add package to composer.json:
"require": {
...
"aurora/sticky-cart-header": "1.*"
...
},
- In Magento root folder run commands:
composer update aurora/sticky-cart-header
php bin/magento module:enable Aurora_StickyCartHeaders
php bin/magento setup:upgrade
Manual
- Unzip archive.
- Upload extension files on your server to:
{Magento root}
└── app/
└── code
- In Magento root folder run commands:
php bin/magento module:enable Aurora_StickyCartHeader
php bin/magento setup:upgrade