Skip to content

Commit

Permalink
Not used method removed from AjaxController
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Dec 11, 2023
1 parent ad754f7 commit bad8d2e
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions controllers/front/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

0 comments on commit bad8d2e

Please sign in to comment.