setChangeBilling example

RequestDataBag $dataBag,
        SalesChannelContext $context,
        CustomerEntity $customer
    ): void {
        $changeableAddresses = $dataBag->get('changeableAddresses');

        if (!$changeableAddresses instanceof DataBag) {
            return;
        }

        $viewData->setChangeShipping((bool) $changeableAddresses->get('changeShipping'));
        $viewData->setChangeBilling((bool) $changeableAddresses->get('changeBilling'));

        $addressId = $dataBag->get('id');

        if (!$addressId) {
            return;
        }

        $viewData->setAddress($this->getById($addressId$context$customer));
    }

    /** * @throws CustomerNotLoggedInException * @throws InvalidUuidException */
Home | Imprint | This part of the site doesn't use cookies.