[29/05/2024]
Nouveau module pour afficher les modes de paiement acceptés dans le footer du site
This commit is contained in:
28
local/modules/PaymentMethodsInFooter/Hook/FrontHook.php
Normal file
28
local/modules/PaymentMethodsInFooter/Hook/FrontHook.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace PaymentMethodsInFooter\Hook;
|
||||
|
||||
use Thelia\Core\Event\Hook\HookRenderBlockEvent;
|
||||
use Thelia\Core\Hook\BaseHook;
|
||||
|
||||
/**
|
||||
* Class FrontHook
|
||||
* @package PaymentMethodsInFooter\Hook
|
||||
* @author Laurent LE CORRE <laurent@thecoredev.fr>
|
||||
*/
|
||||
class FrontHook extends BaseHook
|
||||
{
|
||||
public function onMainFooterBody(HookRenderBlockEvent $event)
|
||||
{
|
||||
$content = trim($this->render("footer.html"));
|
||||
if ("" != $content) {
|
||||
$event->add(
|
||||
array(
|
||||
"id" => "payment-methods-footer-body",
|
||||
"title" => $this->trans("Our payment methods", array(), "paymentmethodsinfooter"),
|
||||
"content" => $content
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user