Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Magento 2 Remove cart content when user log-out | Empty cart when logged back in

Correct me if I'm wrong, but completely removing the cart content on customer log-out is not native to Magento 2 is it? I read about the "Persistent cart" but it seems to work only for removing the ...
Greg's user avatar
  • 2,749
2 votes
0 answers
491 views

Magento 2 Increase guest session time and keep the items in cart for 20 days

I want t increase guest user session time in magento. If guest user add to cart and just go for lunch or any other activity putting his/her website open in browser, when user come after 5-6 hours ...
Jackson Wyss's user avatar
1 vote
1 answer
2k views

Set only last added product in the quote

In my website i have bounded the user to only add one product into the cart , however from the session quote object it loads multiple products. How can i restrict quote object to show only last added ...
Bhavesh Tilvani's user avatar
2 votes
0 answers
261 views

Magento 2: Session Information

Magento 2 has multiple session types. I know that each type gives you access to different information ie current customer information. The sessions I know of are: \Magento\Backend\Model\Session \...
Tarwin Stroh-Spijer's user avatar
0 votes
1 answer
44 views

How to extend Configurable Class with session data

I'm trying to extend the class \Magento\Swatches\Block\Product\Renderer\Configurable to access session data. So I did this as proposed on so many stacks and tutorials. class ExtendConfigurable ...
steros's user avatar
  • 1,622
2 votes
1 answer
944 views

Session data not saving through controller

I've got a couple controller that I'm trying to use to save and retrieve a custom piece of session data. It works on my local development environment but doesn't work on my staging environment. Here'...
Mike Levy's user avatar
  • 805
0 votes
2 answers
1k views

To check the user in logged in or not in Magento 2 [duplicate]

I have used the following code to check the user is logged or not. It always show me "Login Failed" after the user is logged to the site also. $objectManager = \Magento\Framework\App\ObjectManager::...
Selva Kumar's user avatar