Jump to content

How to add HTML code to Prestashop's Home page?


Recommended Posts

I'm interested in add some HTML code(a banner to another site) at the bottom of my Home Page.

 

I've already used the Home Text Editor module to place a message on my Home page. Can the Home Text Editor be used more than once? I don't see a way of making another one.

 

Or, do I use another method of placing HTML code on the home page?

 

Thanks! 

Link to comment
Share on other sites

If I copy/paste my HTML code after the content of the 'index.tpl' file, how will it know where to put the banner?   I downloaded the 'html block free', but there's no instructions as to how to install it. Do you have an installation guide? Thanks!

Link to comment
Share on other sites

Thanks! I found out how to 'add module', and I added the 'htmlbox', and pasted my code. Banner is now up on my site. Can I use this method to add another banner, or will using 'htmlbox' 'wipe out' the first banner? I've used 'htmlbox' in the 'footer' position, can I use 'htmlbox' again in a different position(but still keep the 'footer' banner), or is 'htmlbox' good only for one insertion?

Link to comment
Share on other sites

OK, thanks. Is there a way to add another block of HTML code? I've already used the Home Text Editor module, and the 'htmlbox'. Am I out of 'free' options? Does 'htmlbox' pro allow multiple blocks of code?

pro version allows to use as many blocks as you want,

there is no limit with number of blocks, and hooks used

Link to comment
Share on other sites

  • 6 months later...

Ok guys, 

thanks for all the help. 

This maybe my first post but i have used many of the hints / fixes on here, 

 

But now i am stuck!! 

 

Installed html box, to use the widget code for "zopim live chat" 

but nothing... 

 

If i added the code to the footer instead of home, it just shows as text, "i assume this means the code is incorrect" 

 

Could you give me the path for adding the code direct into the correct .tpl file to use the chat on all pages ? 

 

Please... 2u9rix4.jpg

Link to comment
Share on other sites

okay so footer.tlp is located, 

\my theme\footer.tpl  

Where to paste the code

 

{*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{if !$content_only}
</div><!-- #center_column -->
{if isset($right_column_size) && !empty($right_column_size)}
<div id="right_column" class="col-xs-12 col-sm-{$right_column_size|intval} column">{$HOOK_RIGHT_COLUMN}</div>
{/if}
</div><!-- .row -->
</div><!-- #columns -->
</div><!-- .columns-container -->
<!-- Footer -->
<div class="footer-container">
<footer id="footer"  class="container">
<div class="row">{$HOOK_FOOTER}</div>
</footer>
</div><!-- #footer -->
</div><!-- #page -->
{/if} 
{include file="$tpl_dir./global.tpl"}
</body>
</html>
Link to comment
Share on other sites

Just before the closing </body> tag :D

 

Nope sorry, I tried that and nothing would load afterwards, 

 

 Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{if !$content_only}
</div><!-- #center_column -->
{if isset($right_column_size) && !empty($right_column_size)}
<div id="right_column" class="col-xs-12 col-sm-{$right_column_size|intval} column">{$HOOK_RIGHT_COLUMN}</div>
{/if}
</div><!-- .row -->
</div><!-- #columns -->
</div><!-- .columns-container -->
<!-- Footer -->
<div class="footer-container">
<footer id="footer"  class="container">
<div class="row">{$HOOK_FOOTER}</div>
</footer>
</div><!-- #footer -->
</div><!-- #page -->
{/if}
{include file="$tpl_dir./global.tpl"}
<!--Start of Zopim Live Chat Script-->
<script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function©{z._.push©},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//cdn.zopim.com/?2E4Qocuv795BV1CLyzbt3O6lLuZBo0us';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
</script>
<!--End of Zopim Live Chat Script-->
</body>
</html>
Edited by EV8 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

OK, After trying everything i can think of, Still nothing. 

 

Non of the additional HTML Codes i have added are working, 

like Yotpo Reviews, Zopim Chat, 

So maybe it's a Bug or maybe i have switched something off? 

Any idea's Welcome. 

http://e-vapor-8.co.uk

 

the question is:

how you're trying to add custom widgets?

Link to comment
Share on other sites

Well both of the above as far as i am aware are just upload, install, configure. 

but i have tried to add the HTML code for both via html box or by adding to the footer.tpl file, but nothing is working. 

Link to comment
Share on other sites

Ok found something that may interest you...

 

if i switch off

"Move JavaScript to the end"  

>>in performance

 

Then the yotop review come alive but paypal is not a clickable link. 

if i turn it on then paypal works but not the reviews? 

 

​I hope that makes more sense to yo.  

 

Link to comment
Share on other sites

yesss

prestashop by default moves javascript to the end of the file

this feature affects many useful snippets, also html purifier can affect them (snippets)

 

regarding to your "clickable" problem

i think that it's because of layers z-index param

 

any chance to see it live?

at te moment i don't see paypal button there

Link to comment
Share on other sites

the reviews, from yotop only work if i switch off "Move JavaScript to the end"   but when i do that the paypal button at end of whole order doesn't 

work, as for the paypal express button o have never got that to work. 

Link to comment
Share on other sites

That's right but if i turn off Move JavaScript to the end Then paypal will not work but the review module will. 

ok so now it is switched off so try now, 

you will see the reviews are now showing and paypal is not working. 

Link to comment
Share on other sites

That's right but if i turn off Move JavaScript to the end Then paypal will not work but the review module will. 

ok so now it is switched off so try now, 

you will see the reviews are now showing and paypal is not working. 

 

Let me know when you are on i will switch it off, when i do no one can order, so i need to know when to switch it off. 

Link to comment
Share on other sites

  • 3 years later...

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...