From bad8d2e3b2407069fda913a82d26c7d95097d281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Ste=CC=A8pien=CC=81?= Date: Tue, 12 Dec 2023 00:22:05 +0100 Subject: [PATCH 1/2] Not used method removed from AjaxController --- controllers/front/ajax.php | 43 -------------------------------------- 1 file changed, 43 deletions(-) diff --git a/controllers/front/ajax.php b/controllers/front/ajax.php index 98b887c..a6a07b2 100644 --- a/controllers/front/ajax.php +++ b/controllers/front/ajax.php @@ -50,47 +50,4 @@ public function displayAjaxGetCartPreview(): void 'notificationContent' => $notificationRender->render(), ])); } - - /** - * @param Cart $cart - * @param int $id_product - * @param int $id_product_attribute - * @param int $id_customization - * - * @return string - * - * @throws Exception - */ - private function renderModal(Cart $cart, $id_product, $id_product_attribute, $id_customization) - { - $data = (new CartPresenter())->present($cart); - $product = null; - - foreach ($data['products'] as $p) { - if ((int) $p['id_product'] == $id_product && - (int) $p['id_product_attribute'] == $id_product_attribute && - (int) $p['id_customization'] == $id_customization) { - $product = $p; - break; - } - } - - $this->context->smarty->assign([ - 'product' => $product, - 'cart' => $data, - 'cart_url' => $this->context->link->getPageLink( - 'cart', - null, - $this->context->language->id, - [ - 'action' => 'show', - ], - false, - null, - true - ), - ]); - - return $this->module->fetch("module:{$this->module->name}/views/templates/front/modal.tpl"); - } } From a880eb5947d8dfceb0d461754b9377c68d8c858e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Ste=CC=A8pien=CC=81?= Date: Tue, 12 Dec 2023 00:24:16 +0100 Subject: [PATCH 2/2] cs-fixer fix --- controllers/front/ajax.php | 1 - 1 file changed, 1 deletion(-) diff --git a/controllers/front/ajax.php b/controllers/front/ajax.php index a6a07b2..605d498 100644 --- a/controllers/front/ajax.php +++ b/controllers/front/ajax.php @@ -6,7 +6,6 @@ use Oksydan\IsShoppingcart\View\NotificationRender; use Oksydan\IsShoppingcart\View\PreviewBtnRender; use Oksydan\IsShoppingcart\View\PreviewRender; -use PrestaShop\PrestaShop\Adapter\Presenter\Cart\CartPresenter; class Is_shoppingcartAjaxModuleFrontController extends ModuleFrontController {