Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SalesQuoteSaveAfterObserver.php
Go to the documentation of this file.
1 <?php
7 
9 
11 {
15  protected $checkoutSession;
16 
21  public function __construct(\Magento\Checkout\Model\Session $checkoutSession)
22  {
23  $this->checkoutSession = $checkoutSession;
24  }
25 
30  public function execute(\Magento\Framework\Event\Observer $observer)
31  {
32  $quote = $observer->getEvent()->getQuote();
33  /* @var $quote \Magento\Quote\Model\Quote */
34  if ($quote->getIsCheckoutCart()) {
35  $this->checkoutSession->getQuoteId($quote->getId());
36  }
37  }
38 }
$quote
execute(\Magento\Framework\Event\Observer $observer)
__construct(\Magento\Checkout\Model\Session $checkoutSession)