Skip to content

InvoiceAddressCheckoutFormService

InvoiceAddressCheckoutFormService (Siso\Bundle\CheckoutBundle\Service\InvoiceAddressCheckoutFormService) implements the logic for the CheckoutInvoiceAddress form. This service is assigned to the CheckoutInvoiceAddress form in the configuration.

This service implements both CheckoutFormServiceInterface and CheckoutAddressFormServiceInterface

The service ID is siso_checkout.checkout_form.invoice_address.

Usage

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
$formService = $this->container->get('siso_checkout.checkout_form.invoice_address');
/** @var BasketService $basketService */
$basketService = $this->container->get('silver_basket.basket_service');
$basket = $basketService->getBasket($request);

$form = $this->handleForm($request, $data, $basket);
if ($form->isValid()) {
    if ($form->getViewData()->hasChanged()){
       $formService->storeFormDataInBasket($form->getViewData(), $basket);
    }
} 
Read the Docs