/** * Get quote * * @return \Magento\Sales\Model\Quote */ protected function getQuote() { if (null == $this->quote) { $storeIds = $this->_storeManager->getWebsite($this->getWebsiteId())->getStoreIds(); $this->quote = $this->_quoteFactory->create()->setSharedStoreIds($storeIds); $currentCustomerId = $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID); if (!empty($currentCustomerId)) { $this->quote->loadByCustomer($currentCustomerId); } } return $this->quote; }