Nouveau module pour afficher les modes de paiement acceptés dans le footer du site
29 lines
742 B
PHP
29 lines
742 B
PHP
<?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
|
|
)
|
|
);
|
|
}
|
|
}
|
|
}
|