diff --git a/prestashopdevcon.php b/prestashopdevcon.php
index 3ae1bc9..b908446 100755
--- a/prestashopdevcon.php
+++ b/prestashopdevcon.php
@@ -19,7 +19,8 @@ public function install()
&& $this->registerHook('displayHome')
&& $this->registerHook('displayCheckoutSummaryTop')
&& $this->registerHook('actionDispatcherBefore')
- && $this->registerHook('displayShoppingCartFooter');
+ && $this->registerHook('displayShoppingCartFooter')
+ && $this->registerHook('header');
}
public function get($serviceName)
@@ -27,6 +28,13 @@ public function get($serviceName)
return (new ServiceProvider())->getService($serviceName);
}
+ public function hookHeader()
+ {
+ return $this->context->smarty->fetch(
+ "{$this->getLocalPath()}/views/templates/header.tpl"
+ );
+ }
+
public function hookActionDispatcherBefore()
{
include_once _PS_MODULE_DIR_ . $this->name . '/' . "vendor/autoload.php";
@@ -36,7 +44,9 @@ public function hookActionDispatcherBefore()
public function hookDisplayHome()
{
- return "Hello from {$this->name}!";
+ return $this->context->smarty->fetch(
+ "{$this->getLocalPath()}/views/templates/home.tpl"
+ );
}
public function hookDisplayCheckoutSummaryTop()
diff --git a/views/templates/header.tpl b/views/templates/header.tpl
new file mode 100644
index 0000000..fac43a1
--- /dev/null
+++ b/views/templates/header.tpl
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/views/templates/home.tpl b/views/templates/home.tpl
new file mode 100644
index 0000000..d1efa32
--- /dev/null
+++ b/views/templates/home.tpl
@@ -0,0 +1,3 @@
+
+ This button is loaded using web components. Your number is:
+
\ No newline at end of file