コード例 #1
0
ファイル: OrderUtility.php プロジェクト: extcode/cart
 /**
  * Add Shipping Address
  *
  * @param array $shippingAddress Data for Shipping Address
  *
  * @return void
  */
 protected function addShippingAddress(array $shippingAddress)
 {
     /**
      * Order Address
      * @var \Extcode\Cart\Domain\Model\Order\Address $orderAddress
      */
     $orderAddress = $this->objectManager->get('Extcode\\Cart\\Domain\\Model\\Order\\Address');
     $orderAddress->setPid($this->storagePid);
     if ($shippingAddress['title']) {
         $orderAddress->setTitle($shippingAddress['title']);
     }
     $orderAddress->setSalutation($shippingAddress['salutation']);
     $orderAddress->setFirstName($shippingAddress['firstName']);
     $orderAddress->setLastName($shippingAddress['lastName']);
     $this->addressRepository->add($orderAddress);
     $this->orderItem->setBillingAddress($orderAddress);
 }