Jump to content

Adding a block in Product's Page through a module


Recommended Posts

Hi,

I am making a module and I would like to add a section in Product's Page using a module, so I don't have to manually edit the PS. *.tpl files of product.

How I can edit my module's .tpl and automatically be inserted in the product's appropriate .tpl?
Can this be done using Template Inheritance?

spacer.png

Template Inheritance official PS page

 

i.e. I would like to have a banner(block) that will have 2 text testimonials.

 

Link to comment
Share on other sites

18 minutes ago, Minsky_ae said:

Hi @limitcracker,

Not sure as I'm pretty new to PrestaShop but shouldn't you check the available hook for Product's page? (https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/)

Hi thanks for your reply,

I am on PS1.6.x .

I managed to do it by calling in a myexample.tpl looks like this:

{ extends file = 'product.tpl' }

{block name='page_content_container'}

<h1>{l s='Recent Prices' mod='sleed'}{$price_recent1}</h1>

{/block}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...