Jump to content

Edit History

jsgastoniriartecabre

jsgastoniriartecabre

29 minutes ago, ZiedDams said:

if you want add content to 'my-account' page there are more than a way to do this .

but i think the best way is to use a Hook called

displayCustomerAccount

register the hook in your module

$this->registerHook('displayCustomerAccount')

and re-install it.

then create a function like this

public function hookDisplayCustomerAccount()

inside this function you can fetch any content to be displayed in the my-account page.

, this is how to return a content

return $this->context->smarty->fetch(
	 $this->getLocalPath() . 'views/templates/hook/your_file_name.tpl'
);

then create the .tpl file under

modules/yourmodule/views/templates/hook

inside this file you can put HTML,Buttons,Iframes .. or any think you want.

and it will be displayed in 'my-account' page.

I hope this helps you.

 

awesom! ... my first attempt to php will be difficult.

 

jsgastoniriartecabre

jsgastoniriartecabre

28 minutes ago, ZiedDams said:

if you want add content to 'my-account' page there are more than a way to do this .

but i think the best way is to use a Hook called

displayCustomerAccount

register the hook in your module

$this->registerHook('displayCustomerAccount')

and re-install it.

then create a function like this

public function hookDisplayCustomerAccount()

inside this function you can fetch any content to be displayed in the my-account page.

, this is how to return a content

return $this->context->smarty->fetch(
	 $this->getLocalPath() . 'views/templates/hook/your_file_name.tpl'
);

then create the .tpl file under

modules/yourmodule/views/templates/hook

inside this file you can put HTML,Buttons,Iframes .. or any think you want.

and it will be displayed in 'my-account' page.

I hope this helps you.

 

awesom! ... my first attempt to php will be difficult.

hooks are components, where in my files do I insert this component? or is it by modificating a file? ... sorry for this basic q's but its my second day with prestashop 1.7, 5th day with prestashop and first day with php ... 

jsgastoniriartecabre

jsgastoniriartecabre

18 minutes ago, ZiedDams said:

if you want add content to 'my-account' page there are more than a way to do this .

but i think the best way is to use a Hook called

displayCustomerAccount

register the hook in your module

$this->registerHook('displayCustomerAccount')

and re-install it.

then create a function like this

public function hookDisplayCustomerAccount()

inside this function you can fetch any content to be displayed in the my-account page.

, this is how to return a content

return $this->context->smarty->fetch(
	 $this->getLocalPath() . 'views/templates/hook/your_file_name.tpl'
);

then create the .tpl file under

modules/yourmodule/views/templates/hook

inside this file you can put HTML,Buttons,Iframes .. or any think you want.

and it will be displayed in 'my-account' page.

I hope this helps you.

 

awesom! ... my first attempt to php will be difficult.

hooks are components, where in my files do I insert this component? or is it by modificating a file? ... sorry for this basic q's but its my second day with prestashop 1.7

×
×
  • Create New...