Пример #1
0
 /**
  * Check whether we need to create new customer (for another website) during order creation
  *
  * @param \Magento\Store\Model\Store $store
  * @return bool
  */
 protected function _customerIsInStore($store)
 {
     $customerId = (int) $this->getSession()->getCustomerId();
     $customer = $this->customerRepository->getById($customerId);
     return $customer->getWebsiteId() == $store->getWebsiteId() || $this->accountManagement->isCustomerInStore($customer->getWebsiteId(), $store->getId());
 }