Skip to content

Commit

Permalink
Fixes storing changed billing/delivery addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Nov 22, 2019
1 parent 25a456d commit 18be864
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,7 @@ protected function setAddress( \Aimeos\MW\View\Iface $view )
throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one billing address part is missing or invalid' ) );
}

$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' )->uses( [] );
$params = $cntl->add( $params )->store()->get()->getPaymentAddress()->toArray();
\Aimeos\Controller\Frontend::create( $context, 'customer' )->uses( [] )->add( $params )->store();
}

$basketCtrl->addAddress( $type, $params, 0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ protected function setAddress( \Aimeos\MW\View\Iface $view )

if( ( $address = $cntl->uses( ['customer/address'] )->get()->getAddressItem( $option ) ) !== null )
{
$cntl->addAddressItem( $address->fromArray( $params ), $option )->store();
$params = $address->toArray();
$data = $params;
$cntl->addAddressItem( $address->fromArray( $data ), $option )->store();
}

$basketCtrl->addAddress( $type, $params, 0 );
Expand Down

0 comments on commit 18be864

Please sign in to comment.