return new JsonResponse(['data' =>
$cart]);
} #[Route(path: '/api/_proxy/disable-automatic-promotions', name: 'api.proxy.disable-automatic-promotions', methods: ['PATCH'])]
public function disableAutomaticPromotions(Request
$request): JsonResponse
{ if (!
$request->request->
has(self::SALES_CHANNEL_ID
)) { throw ApiException::
salesChannelIdParameterIsMissing();
} $contextToken =
$this->
getContextToken($request);
$salesChannelId =
(string) $request->request->
get('salesChannelId'
);
$this->adminOrderCartService->
addPermission($contextToken, PromotionCollector::SKIP_AUTOMATIC_PROMOTIONS,
$salesChannelId);
return new JsonResponse();
} #[Route(path: '/api/_proxy/enable-automatic-promotions', name: 'api.proxy.enable-automatic-promotions', methods: ['PATCH'])]
public function enableAutomaticPromotions(Request
$request): JsonResponse
{