if (!
$this->
Request()->
getPost('setAsDefaultBillingAddress'
) && !
$setBoth) { $billingId = false;
} if (!
$this->
Request()->
getPost('setAsDefaultShippingAddress'
) && !
$setBoth) { $shippingId = false;
} if ($billingId &&
$billingId !=
$this->
View()->
getAssign('sUserData'
)['additional'
]['user'
]['default_billing_address_id'
]) { $address =
$this->
get(ModelManager::
class) ->
getRepository(Address::
class) ->
getOneByUser( $billingId,
$this->
View()->
getAssign('sUserData'
)['additional'
]['user'
]['id'
] );
$this->
get(AddressServiceInterface::
class)->
setDefaultBillingAddress($address);
} if ($shippingId &&
$shippingId !=
$this->
View()->
getAssign('sUserData'
)['additional'
]['user'
]['default_shipping_address_id'
]) { $address =
$this->
get(ModelManager::
class) ->
getRepository(Address::
class) ->
getOneByUser(