Fancybox in all pages

Let’s make some changes to use fancybox on every page of our Prestashop store. This first thing we’ll do is download and install the module fancyboxallpages. Then we just have to put the code to display the popup where you want.

For example we will place a link in the direction of our store to display a locator map on googlemaps in module blockcontactinfos.

Locate this code

<i class="icon-map-marker"></i>{$blockcontactinfos_company|escape:'html':'UTF-8'}{if $blockcontactinfos_address != ''}, {$blockcontactinfos_address|escape:'html':'UTF-8'}</a>{/if}

And change it to this

<i class="icon-map-marker"></i>{$blockcontactinfos_company|escape:'html':'UTF-8'}{if $blockcontactinfos_address != ''}, <a class="google_iframe" href=",+42+avenue+des+Champs+Elys%C3%A9es+75000+Paris+France&hl=es-419&ie=UTF8&sll=40.345462,-3.826037&sspn=0.009485,0.021136&hnear=42+Avenue+des+Champs-%C3%89lys%C3%A9es,+75008+Paris,+Francia&t=m&z=16&amp;output=embed">{$blockcontactinfos_address|escape:'html':'UTF-8'}</a>{/if}

At the end of the file will place this code

<script type="text/javascript">
    $(document).ready(function() {
            'width'             : '75%',
            'height'            : '75%',
            'autoScale'         : false,
            'transitionIn'      : 'none',
            'transitionOut'     : 'none',
            'type'              : 'iframe'

Download module

Posted on 06/04/2014 in Prestashop

Share the Story

About the Author

Responses (4)

  1. Hanz
    23/08/2014 at 1:48 pm · Responder


    thank you for this module, but I have a problem with fancybox in CMS pages. How can I use this modul in CMS, I need to create gallery with fancybox effect.

    Thank you for your reply

    • Antonio Ventura
      24/08/2014 at 6:42 am · Responder

      You must include the call to the script in the file cms.tpl, so in this way for example

      $(document).ready(function () {
      .attr('rel', 'gallery')
      openEffect: 'elastic',
      prevEffect: 'fade',
      nextEffect: 'fade'

  2. Hanz
    25/08/2014 at 11:23 am · Responder

    OK I inserted this code to cms.tpl file. I must use attribute rel=”gallery”?

    For example:

    in CMS page?

  3. Hanz
    25/08/2014 at 11:26 am · Responder

    sorry, here is the code:

    a rel="gallery" href="http://www../image1.jpg">

Leave a reply

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Back to Top