Questions tagged [checkoutsession]

Questions about Magento ckeckout session

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Magento 2: LastRealOrderId is missing in checkoutSession

I am facing this weird issue on the checkout page. We are using 3rd party payment module, which redirects customer to the payment page after placing order in Magento. In the controller, it tries to ...
user avatar
0 votes
0 answers
18 views

How to add product programmatically for custom guest Quote in Magento 2

Please let me know how to add product to cart programmatically for custom guest user quote using an event observer in Magento 2 I try to add product for the registered user it was added successfully ...
user avatar
0 votes
0 answers
22 views

How to Select some product from cart to checkout

I'm currently using Magento 2.4 and I'm trying to customize cart page. So I want to add checkbox to cart so I can select some item in my cart to proceed checkout. I have no lead to do this and I'm new ...
user avatar
0 votes
1 answer
225 views

Magento 2 checkout session get empty data after payment success in success.phtml file

Magento 2 Customer logged out automatically after checkout process..After payment gateway from third party, customer logout automatically in chrome browser..It work fine in mozilaa browser.
user avatar
0 votes
0 answers
102 views

How to prevent session data losing on success redirect?

I'm working on Magento 2 upgrade from 2.2.9 to 2.4.3 and I'm having an issue with an on-line payment. Here is the deal, after payment the following callback executes public function execute() { ...
user avatar
0 votes
0 answers
31 views

Session expired after checkout process and system can not redirect to thank you page

after input OPT for checkout product. it's a redirect to this page and the session expired
user avatar
0 votes
2 answers
262 views

magento session destroy after redirect from payment method

We are integrating 3rd party payment method. When returning from payment channel to return url, the session destroyed. Any help will be appreciated. Thanks in advanced
user avatar
0 votes
1 answer
212 views

Magento 2 get session variable on checkout not working

I have been struggling with this issue like 2 days, and I don't understand why it's happening. This is what I'm doing: 1- Unset session variable in case it exists and Create a new session variable 2- ...
user avatar
0 votes
1 answer
66 views

Session or SessionFactory which one to Use in Magento 2?

I am have been working on a payment method where I need Current Quote So I used \Magento\Checkout\Model\SessionFactory $checkoutSession and then get Quote from the Checkout session using $this->...
user avatar
  • 2,029
1 vote
0 answers
97 views

Magento 2 How to Increase payment session PayUMoney

Hi Am Testing PayU Payment gateway for magento 2. I have a testing account for payUMoney. During checkout after the adding credentials and OTP its shows error if it exceeds 30 seconds. If I add ...
user avatar
0 votes
1 answer
36 views

how to get custom session in magento 2?

I have tried this but this is giving empty log file. What should I do to get output for this: public function isAdmin() { $writer = new \Zend\Log\Writer\Stream( BP . '/var/log/myfile.log' ); ...
user avatar
  • 188
1 vote
1 answer
394 views

Magento2 Session Logsout when a person gets back from Payment Gateway

I am facing a very weird Issue in my M2 Store, whenever a user gets back from payment gateway after successful transaction, user automatically logs out from the session and land back on cart page with ...
user avatar
  • 21
1 vote
2 answers
590 views

checkout session reset after creating order $this->_quoteManagement->submit($quote)

I am trying to create order pragmatically using $quote = $this->_checkoutSession->getQuote(); $this->_checkoutSession->setLastQuoteId($quote->getId()) ->...
user avatar
  • 11
1 vote
0 answers
34 views

How to Add a new step in checkout step, I want add new tab After shipping methods tab and before payment tabs in magento 1.9

I'am working with magento 1.9, Now i want add new tab in checkout steps. I want add new tab between shipping methods and payment method information. I want add custom "mytabs" between two tabs with 2 ...
user avatar
0 votes
1 answer
431 views

magento 1.9 not redirecting customer to success page after a successful order

I’m facing a strange problem I’m working on magento 1.9. Sometimes after a success order the customer is not redirected to success page, this happens not in all orders maybe 1 of 5. after diagnosing ...
user avatar
1 vote
0 answers
25 views

Keeps asking to login Magento 2.3.4

Not sure if this is a bug or if this is an actual issue which is going on. I have tried to read up on few informations and tried to follow the steps. But I am not getting anywhere unfortunately. The ...
user avatar
1 vote
3 answers
727 views

How to auto remove items from cart after 1 day - Magento 2.2.4

Guest / Logged-in user: Auto removes items from the cart after 24 hours. Canceling and returning from the payment page auto-remove cart after 24 hours.
user avatar
0 votes
1 answer
141 views

Magento 1.9 redirect on checkout/cart after online payment

I've applied the latest security patches from the Magento website and after that, I have strange behaviour: After an order is done with online payment (card) is redirecting to checkout/cart via ...
user avatar
1 vote
1 answer
2k views

M 2.3.4 - "Infinite loop detected..." exception on OPC, how to get items in the cart?

I'm trying to get quote on checkout and this exception is thrown in vendor\magento\module-checkout\Model\Session.php:241 exception.log Message: Infinite loop detected, review the trace for the ...
user avatar
  • 888
0 votes
1 answer
138 views

Order not processing in backend, but processing with gateway (Unique Constraint Violation Found)

New Magento 2 Install. Authorize.net and Paypal having the same issue. Order is placed on our website Payment is captured and accepted The order DOES NOT show up in Magento`s backend. Customer does ...
user avatar
0 votes
1 answer
1k views

The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly Error

When I try to complete the checkout by paying with Hosted Payment Form (mastercard module) I get an error 400 Bad request. I was reading the exception.log file and I found an error that says the ...
user avatar
0 votes
2 answers
2k views

Get Quote Item from Product Id

I am trying to get the Lastly added Quote Item using "checkout/session". By I don't know, how to get the last added Item. Hence I have product_id. I believe instead of loading the collection and all,...
user avatar
2 votes
0 answers
103 views

When I try to get quote shipping address, it returns customer default address. Does the quote session not updated with value in the table?

When I try to get quote shipping address, it returns customer default address instead of returning from my quote_address table. I'm trying to pre-populate checkout fields with quote address details. ...
user avatar
  • 1,189
2 votes
1 answer
903 views

Magento 2 $this->checkoutSession->getLastRealOrder() and $this->checkoutSession->getLastRealOrderId() returning null

$this->checkoutSession->getLastRealOrder() $this->checkoutSession->getLastRealOrderId() returning null after payment gateway redirect. Strange thing is that it is working some time and ...
user avatar
  • 21
0 votes
0 answers
252 views

403 Session expired in checkout Magento 1

I'm getting this error in the checkout page of Magento 1, what could it be? Request URL: /onepage/json/payments Request Method: POST Status Code: 403 Session Expired Referrer Policy: no-referrer-when-...
user avatar
0 votes
2 answers
865 views

Magento 2 : Issue With Override Magento\Checkout\Model\Session

i am override the checkout model seesion in this way in magento 2.2.5 "\app\code\Namespace\Modulename\etc\di.xml" <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
user avatar
2 votes
1 answer
451 views

Set old quote Magento 2 cart

I'm trying to load/set/restore an old quote from a customer when they log in, but the thing is not that simple, because it turns out that I'm using Cminds Multi User Account Extension, and the project ...
user avatar
1 vote
1 answer
1k views

Customer logged out when clicking 'Go to checkout' from basket

Customers are being logged out when they click 'Go to checkout' before the basket page has fully loaded. It also looks like guests are having their basket emptied when they follow the same process. ...
user avatar
2 votes
1 answer
422 views

Magento 2 : Lifetime, scope and general usage for all types of sessions

There are a lot of session types in magento 2 . The ones I know of are listed below ; 1) \Magento\Catalog\Model\Session //vendor/magento/module-catalog/Model/Session.php 2) \Magento\Newsletter\...
user avatar
  • 4,585
1 vote
0 answers
37 views

Checkout cart products disables randomly

I have created a website using Magento 2.2.3. I'm facing issues with adding product to the cart. The issue is, I can add the product to the cart and able to checkout. But, If i want to add some ...
user avatar
  • 1,124
1 vote
1 answer
1k views

Magento 2 How to create a popup in checkout if customer is not logged in

When a guest customer who is not logged in hits checkout, I want a popup to remind customers to login at the checkout page. How do I implement it? What files should i override? Thanks.
user avatar
  • 11
12 votes
2 answers
1k views

Magento2: Minicart is full while Cart is Empty

A lot of our customers are complaining that they add stuff to the cart & then when they proceed to checkout they are redirected to an empty cart. We thought that it might be a result of too short ...
user avatar
  • 887
1 vote
2 answers
1k views

Front-end session timeout causes error on checkout and basket pages

When user adds an item(or items) to the cart, it behaves normally. but if user tried to goto either checkot page or basket page after a while, it shows an error page as follows, Exception #0 (Magento\...
user avatar
  • 561
1 vote
1 answer
3k views

Checkout session not work in Magento 2

I have used \Magento\Checkout\Model\Session for get quote id and store my custom value in this. but its return every time empty session. when FPC on or customer not logged in. I have found out some ...
user avatar
  • 1,473
2 votes
1 answer
2k views

Magento 2 - GetLastRealOrderId is always returning null

I am trying to get the last order so that I can load the order by increment id but `$this->_checkoutSession->getLastRealOrder()->getIncrementId()`; is returning null.
user avatar
2 votes
2 answers
2k views

\Magento\Backend\Model\Session Clear: Magento 2

In Magento, we could use as $this->_getSession()->clear(); However, in magento 2 if we use the same thing it throws exception as Invalid method Magento\Backend\Model\Session\Interceptor::...
user avatar
  • 349
1 vote
0 answers
362 views

Magento 2: How to add some data into checkout session?

I have successfully added new checkout form, following the instructions are given on: http://devdocs.magento.com/guides/v2.1/howdoi/checkout/checkout_form.html When I submit the form i get the data ...
user avatar
1 vote
0 answers
74 views

Get shipping rates in a frontend controller for particular form in magento 2.1

I am trying to get the shipping rates from the existing shipping methods enabled by the admin in my form in the frontend as the address has been entered. Further, I don't want to save the product in ...
user avatar
1 vote
1 answer
590 views

Post to Sales Flat Order table [closed]

We have installed 2 extensions on Magento 1.9.3 one is a one page checkout extension found here: https://www.magentocommerce.com/magento-connect/onestep-checkout.html and the other is a delivery time ...
user avatar
1 vote
1 answer
1k views

Hiding Shipping Method for current Logged in/Guest user if a condition method

I'm using Magento 2.1. Currently, I'm having two shipping methods. One is UPS and another is Flatrate. If my product's attribute returns true, I want to hide Flatrate shipping method from frontend ...
user avatar
1 vote
2 answers
152 views

Why is DI working in controller but not in Blocks?

I was trying my hand on Magento 2. I am able to get the checkout session data inside a controller by injecting \Magento\Checkout\Model\Session $checkoutSession, in controllers construct method. But ...
user avatar
  • 2,689
2 votes
3 answers
2k views

Magento 2 Checkout session lost custom data

I have created Custom checkout session in controller : public function execute() { $productData = $this->getRequest()->getPostValue(); $this->_checkoutSession->setData("product"...
user avatar