Jump to content

[Solved] Template transfer from 1.3 to 1.4 - problem with thickbox


Recommended Posts

Hi.

I'm using a template designed for Prestashop 1.3.6, but i have to convert it to be compatible with Prestashop 1.4.3.
I'm stuck at this issue:
When I click "View Full Size", nothing happens. Absolutely nothing. Clicking on the thumbnails doesn't work either.
The template is using thickbox, and apparently it no longer exists in 1.4.
I would like to know how to replace it with lightbox or the original 1.4's image previewer.

Any help is highly appreciated
P.S. Getting a new template is NOT an option, because I paid a good chunk for it and I wasn't aware of such a PITA of converting templates... you get the idea.

Link to comment
Share on other sites

Solved it. (kind of)
I installed Slimbox.

Copy slimbox files to the theme, then

FrontController.php, Line 430, add

Tools::addCSS(_THEME_CSS_DIR_.'global.css', 'all');



FrontController.php, Line 432:

Tools::addJS(array(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js', _PS_JS_DIR_.'jquery/jquery.easing.1.3.js', _PS_JS_DIR_.'tools.js', _THEME_JS_DIR_.'slimbox2.js'));



product.tpl, I modified line (around 93) to have

        
       {if $have_image}
           {if !$jqZoomEnabled}getImageLink($product->link_rewrite, $cover.id_image)}" rel="lightbox" title="{$product->name|escape:'htmlall':'UTF-8'}">{/if}
getImageLink($product->link_rewrite, $cover.id_image, 'large')}" 
               {if $jqZoomEnabled}
                   class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image)}"
               {else}
                   title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}"
               {/if}  
           id="bigpic" width="{$largeSize.width}" />
           {if !$jqZoomEnabled}{/if}
Link to comment
Share on other sites

  • 1 month later...

Hi

 

I was trying to implement your modifications but as I have changed the frontcontroller and product.tpl - it is difficult to know where to modify the files.

 

Can you please let me know what lines of code come before those modifications

Link to comment
Share on other sites

  • 1 month later...

I cant get this to work, and I dont understand what Im doing wrong.

 

Copied the CSS and JS files to the CSS and JS folders in the theme folder. I guess Im doing something wrong when modifying FrontController.php, could you please repost the exact code that works?

Link to comment
Share on other sites

×
×
  • Create New...