Jump to content

How Do I Add HTML Code Under Module Blocks?


Recommended Posts

Three years ago when I first used Prestashop you could add HTML in your chosen Blockmodule .tpl file to insert things like adverts/facebook button etc.

 

It will no longer work on the latest Prestashop. How would I place HTML codes on my website?

 

I've already downloaded a HTML module and transplanted it but that doesn't suit my needs.

 

Help!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Take a block that you whant lets say blockstore.

Download it. rename the folder to a name you want.

Rename the files inside it > "Blockstore.php" and "Blockstore.tpl" to what you want.

then open the 2 files and search for blockstore replace it with the name you gave the 2 files (php, tpl) so lets say you called them test block then rename everything that has blockstore in the 2 files to testblock.

 

After that save them, den go back to the TPL file.

 

Here you can see some Div's and H4 tags.

 

The h4 is the title Place your content below the:

 

<div class="block_content blockstore">

 

Than save it. (make sure you close you're divs right...

 

Example of the TPL File:

 


<!-- Block stores module -->
<div id="stores_block_left" class="block">
<h4><a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4>
<div class="block_content blockstore">
<p>
<a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}"><img src="{$module_dir}{$store_img}" alt="{l s='Our stores' mod='blockstore'}" width="174" height="115" /></a><br />
<a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}">{l s='Discover our stores' mod='blockstore'}</a>
</p>
</div>
</div>
<!-- /Block stores module -->

Thats original:

 

Here's custom:

 


<!-- Block stores module -->
<div id="stores_block_left" class="block">
<h4><a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4>
<div class="block_content blockstore">
<p>
This is my new test block.
</p>
<p>
This could be for twitter facebook or any other HTML code
</p>
</div>
</div>
<!-- /Block stores module -->

 

Then upload everything and install it in your backoffice.

 

 

Way do we change the TPL and PHP file and the blockstore name's inside it.

 

Well then you get an extra block that you can use, if we did not do that then we did overwrite the blockstore and then you do not have the block store anymore.

 

It you need more help post it here or contact me...

  • Like 1
Link to comment
Share on other sites

Take a block that you whant lets say blockstore.

Download it. rename the folder to a name you want.

Rename the files inside it > "Blockstore.php" and "Blockstore.tpl" to what you want.

then open the 2 files and search for blockstore replace it with the name you gave the 2 files (php, tpl) so lets say you called them test block then rename everything that has blockstore in the 2 files to testblock.

 

After that save them, den go back to the TPL file.

 

Here you can see some Div's and H4 tags.

 

The h4 is the title Place your content below the:

 

<div class="block_content blockstore">

 

Than save it. (make sure you close you're divs right...

 

Example of the TPL File:

 


<!-- Block stores module -->
<div id="stores_block_left" class="block">
<h4><a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4>
<div class="block_content blockstore">
<p>
<a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}"><img src="{$module_dir}{$store_img}" alt="{l s='Our stores' mod='blockstore'}" width="174" height="115" /></a><br />
<a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}">{l s='Discover our stores' mod='blockstore'}</a>
</p>
</div>
</div>
<!-- /Block stores module -->

Thats original:

 

Here's custom:

 


<!-- Block stores module -->
<div id="stores_block_left" class="block">
<h4><a href="{$link->getPageLink('stores.php')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4>
<div class="block_content blockstore">
<p>
This is my new test block.
</p>
<p>
This could be for twitter facebook or any other HTML code
</p>
</div>
</div>
<!-- /Block stores module -->

 

Then upload everything and install it in your backoffice.

 

 

Way do we change the TPL and PHP file and the blockstore name's inside it.

 

Well then you get an extra block that you can use, if we did not do that then we did overwrite the blockstore and then you do not have the block store anymore.

 

It you need more help post it here or contact me...

 

Thank for help. really work!! awesome guy :wub: ... this is what i need!!thx djkavaa

Link to comment
Share on other sites

×
×
  • Create New...