Skip to content

ShippingPaymentCheckoutFormService

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

This service implements CheckoutFormServiceInterface.

The service ID is siso_checkout.checkout_form.shipping_payment.

Usage

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
$formService = $this->container->get('siso_checkout.checkout_form.shipping_payment');
/** @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);
    }
}