예제 #1
0
파일: Order.php 프로젝트: aiesh/magento2
 /**
  * Convert order address to quote address
  *
  * @param   \Magento\Sales\Model\Order\Address $address
  * @return  \Magento\Sales\Model\Quote\Address
  */
 public function addressToQuoteAddress(\Magento\Sales\Model\Order\Address $address)
 {
     $quoteAddress = $this->_quoteAddressFactory->create()->setStoreId($address->getStoreId())->setAddressType($address->getAddressType())->setCustomerId($address->getCustomerId())->setCustomerAddressId($address->getCustomerAddressId());
     $this->_objectCopyService->copyFieldsetToTarget('sales_convert_order_address', 'to_quote_address', $address, $quoteAddress);
     return $quoteAddress;
 }