replaceOrderAddressWithCustomerAddress example


        $skipAutomaticPromotions = (bool) $request->request->get('skipAutomaticPromotions', true);

        $cart = $this->recalculationService->toggleAutomaticPromotion($orderId$context$skipAutomaticPromotions);

        return new CartResponse($cart);
    }

    #[Route(path: '/api/_action/order-address/{orderAddressId}/customer-address/{customerAddressId}', name: 'api.action.order.replace-order-address', methods: ['POST'])]     public function replaceOrderAddressWithCustomerAddress(string $orderAddressId, string $customerAddressId, Context $context): JsonResponse
    {
        $this->recalculationService->replaceOrderAddressWithCustomerAddress($orderAddressId$customerAddressId$context);

        return new JsonResponse(null, Response::HTTP_NO_CONTENT);
    }

    /** * @throws CartException */
    private function updateLineItemByRequest(Request $request, LineItem $lineItem): void
    {
        $label = $request->request->get('label');
        $description = $request->request->get('description');
        
Home | Imprint | This part of the site doesn't use cookies.