From 6f6210d4d0bd4eb86887df598b29ab99e862aeea Mon Sep 17 00:00:00 2001 From: Joris Wagter Date: Thu, 31 Oct 2024 11:48:36 +0100 Subject: [PATCH] removed all loggers --- Controller/AbstractDataLayerController.php | 2 -- Controller/GetQuoteData/Index.php | 1 - Controller/RemoveFromCart/Index.php | 1 - Observer/PurchaseEvent.php | 8 -------- Plugin/RemoveFromCart.php | 2 -- 5 files changed, 14 deletions(-) diff --git a/Controller/AbstractDataLayerController.php b/Controller/AbstractDataLayerController.php index 9d7bf33..adb8f68 100644 --- a/Controller/AbstractDataLayerController.php +++ b/Controller/AbstractDataLayerController.php @@ -37,10 +37,8 @@ public function __construct( public function execute(): ResultInterface { $resultJson = $this->resultFactory->create(); -// $dataLayer = $this->getDataLayer(); $resultJson->setData($this->getDataLayer()); -// ObjectManager::getInstance()->get(LoggerInterface::class)->critical(print_r($dataLayer, true)); return $resultJson; } diff --git a/Controller/GetQuoteData/Index.php b/Controller/GetQuoteData/Index.php index 9a62ce6..1a5c725 100644 --- a/Controller/GetQuoteData/Index.php +++ b/Controller/GetQuoteData/Index.php @@ -27,7 +27,6 @@ public function __construct(QuoteDataHelper $quoteDataHelper, JsonFactory $jsonF public function execute() { $quoteData = $this->quoteDataHelper->getQuoteData(); - ObjectManager::getInstance()->get(LoggerInterface::class)->critical(print_r($quoteData, true)); $result = $this->jsonFactory->create(); $result->setData($quoteData); return $result; diff --git a/Controller/RemoveFromCart/Index.php b/Controller/RemoveFromCart/Index.php index 83e7f96..eecd2b8 100644 --- a/Controller/RemoveFromCart/Index.php +++ b/Controller/RemoveFromCart/Index.php @@ -37,7 +37,6 @@ public function getEvent(): string public function getEcommerce(): array { $quoteItemId = $this->context->getRequest()->getParam('id'); - ObjectManager::getInstance()->get(LoggerInterface::class)->critical('quote item id remove: ' . $quoteItemId); $quote = $this->checkoutSession->getQuote(); $ecommerce = [ diff --git a/Observer/PurchaseEvent.php b/Observer/PurchaseEvent.php index 0e24cbe..eeb49f8 100644 --- a/Observer/PurchaseEvent.php +++ b/Observer/PurchaseEvent.php @@ -60,8 +60,6 @@ public function execute(Observer $observer) $eventEnabled = $this->config->getValue('taggrs_datalayer/events/purchase_via_measurement_api'); - // $logger->critical("Purchase event enabled: " . $eventEnabled); - if (!$eventEnabled) { return; } @@ -100,8 +98,6 @@ public function execute(Observer $observer) $jsonBody = json_encode($body); $jsonBody = strtr($jsonBody, [':[]' => ':{}']); - // $logger->critical($jsonBody); - $res = $this->client->request('POST', $url, [ 'headers' => [ 'content-type' => 'application/json;charset=utf-8' @@ -109,10 +105,6 @@ public function execute(Observer $observer) 'body' => $jsonBody, ]); - // $logger->critical($res->getStatusCode()); - - - // TODO: Implement execute() method. } private function getUserData(): array diff --git a/Plugin/RemoveFromCart.php b/Plugin/RemoveFromCart.php index 8ce94e0..faa8e72 100644 --- a/Plugin/RemoveFromCart.php +++ b/Plugin/RemoveFromCart.php @@ -52,8 +52,6 @@ public function __construct( public function beforeExecute(Delete $subject) { $request = $subject->getRequest(); - ObjectManager::getInstance()->get(LoggerInterface::class)->critical(print_r($request->getParams(), true)); - $quoteItemId = $request->getParam('id'); if ($quoteItemId !== null) {