Download the PHP package magepow/customersession without Composer
On this page you can find all versions of the php package magepow/customersession. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download magepow/customersession
More information about magepow/customersession
Files in magepow/customersession
Package customersession
Short Description Help you able to get customer session data when varnish cache is enable.
License OSL-3.0 AFL-3.0
Informations about the package customersession
Magento 2 CustomerSession Extension Free
In Magento 2, we can't get customer session from \Magento\Customer\Model\Session when varnish cache is enable so we use \Magento\Framework\App\Http\Context instead. But by default, \Magento\Framework\App\Http\Context only gives the value of customer_group and customer_logged_in. CustomerSession extension free by Magepow allows you to get more than just customer_group and customer_logged_in is customer id, name, email and other customer attributes if set.
How to install Magento 2 CustomerSession extension Free
✓ Install Magepow CustomerSession via composer (recommend)
Run the following command in Magento 2 root folder:
Magepow CustomerSession user guide
Example:
1. Get customer_logged_in
1. Get customer_group
1. Get customer id
1. Get customer name
1. Get customer email
To get more customer attributes you have to edit method aroundDispatch in \Magepow\CustomerSession\Plugin\CustomerSessionContext.php
Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)