Jump to content

were do you get the thinkbox or fancy box module from


robchef

Recommended Posts

thickbox was used in PrestaShop 1.3x

fancybox is using in PrestaShop 1.4x

 

To use fancybox, you only need to include following two lines in your theme file

 

 

<link href="{$base_dir_ssl}/css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="{$base_dir_ssl}/js/jquery/jquery.fancybox-1.3.4.js"></script>

 

then run have this jQuery code to enable the links to be popup in a fancybox


<script type="text/javascript">$('a.iframe').fancybox();</script>

 

 

Hope this helps

Link to comment
Share on other sites

thickbox was used in PrestaShop 1.3x

fancybox is using in PrestaShop 1.4x

 

To use fancybox, you only need to include following two lines in your theme file

 

 

<link href="{$base_dir_ssl}/css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="{$base_dir_ssl}/js/jquery/jquery.fancybox-1.3.4.js"></script>

 

then run have this jQuery code to enable the links to be popup in a fancybox


<script type="text/javascript">$('a.iframe').fancybox();</script>

 

 

Hope this helps

 

In which theme file? I have the same problem...Prestashop version is 1.4.8.2. but i have an older theme for prestashops 1.3.x...and this thickbox annoys me. How can i get fancybox working?

Link to comment
Share on other sites

Try this

 

in your PHP file (page controller)

 

 

global $link, $cookie, $smarty;

$cms = new CMS(999, (int)($cookie->id_lang));
$link_cms = $link->getCMSLink($cms, $cms->link_rewrite, true);
if (!strpos($link, '?'))
$link_cms .= '?content_only=1';
else
$link_cms .= '&content_only=1';

$smarty->assign('link_cms', $link_cms);

 

 

in your theme file (you need also include those lines in my previous post)

 

<a href="{$link_cms}" class="iframe">{l s='Your CMS Subject'}</a>



Link to comment
Share on other sites

Sorry but im confused...where is the location of the php file page controller and what theme file you mean? /public_html/php.ini or info.php..../public_html/prestashop/index.php - i really don't know...

 

my website w w w . d i n g o . si

 

There you can have a look. I installed prestashop 1.4.8.2. and the old mobile theme for presta 1.3.x ...so far it's working, but this thickbox is annoying. I tryed to install the lightbox module but no change...and i don't know where and how to implement the fancybox...how to change the thickbox to the fancybox...do i have to install a module or change the code in some files...

 

Thanks for help :rolleyes:

Link to comment
Share on other sites

All PrestaShop 1.4x front page has 3 files, one page file and one Controler file and one theme file.

 

1. Page file

It is under your PrestaShop root

 

For example contact-form.php

 

 

2.

The controller file is under following controllers folder

 

/controllers/ContactController.php

 

3. Theme file is .tpl file under your PrestaShop theme

by default it is this folder

 

/themes/prestashop/contact-form.tpl

Link to comment
Share on other sites

OK, I tested this code, it is working fine you can see the demo site.

 

in function processPost() of file /controllers/ProductController.php

After following code

 

 

public function process()
{
global $cart, $currency;
parent::process();

 

 

 

 

Adding following code

 

global $link, $cookie, $smarty;
$cms = new CMS(4, (int)($cookie->id_lang));
$link_cms = $link->getCMSLink($cms, $cms->link_rewrite, true);
$link_cms .= '&content_only=1';
$smarty->assign('link_cms', $link_cms); 

 

 

In file

/themes/prestashop/product.tpl file

 

After this line

 

 

{$HOOK_PRODUCT_FOOTER}

 

Adding following code

 

 

 

<link href="{$base_dir_ssl}/css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />

<script type="text/javascript" src="{$base_dir_ssl}/js/jquery/jquery.fancybox-1.3.4.js"></script>

<a href="{$link_cms}" id="my_cms_page" class="iframe">{l s='Your CMS Subject'}</a>

<script type="text/javascript">$('a.iframe').fancybox();</script>

 

 

And you can see the result link here, above the "More Info" tab

(Please note, this URL is temporary, may not available soon)

http://agiledemo.dyndns.org:8081/demo1/product.php?id_product=5

Link to comment
Share on other sites

  • 1 month later...

Thanks for the code shokinro. It works great!! Do you know:

 

1. How can I make that this link "¡Ahorra hasta un 20% en tus compras!" looks like the wishlist button? http://www.emporio7....?id_product=17.

 

2. Can you help me with the code for opening a current CMS of the left block (First box with title "infórmate") Lin named "¿Cómo comprar en Emporio 7?" in a fancybox?

 

Thanks for your help!

Edited by diegocol12 (see edit history)
Link to comment
Share on other sites

  • 2 months later...

Will be great if anyone help me to configure pop up module to show newsletter subscription option when anyone opens our site.

 

Thanks

 

I have added some attachement. Maybe so it will be easier to find the problem...As i cannot attach directly here i posted a link.

Inside:

 

JS folder - from my theme

product.tpl - from my theme

thickbox.tpl - from my theme

ProductController.php

 

The zip file is here http://www.dingo.si/prestaforum.zip

 

Many thanks in advance...

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 1 month later...

Hi, i tried this:

OK, I tested this code, it is working fine you can see the demo site.

 

in function processPost() of file /controllers/ProductController.php

After following code

 

 

 

public function process()

{

global $cart, $currency;

parent::process();

 

 

 

 

Adding following code

 

 

global $link, $cookie, $smarty;

$cms = new CMS(4, (int)($cookie->id_lang));

$link_cms = $link->getCMSLink($cms, $cms->link_rewrite, true);

$link_cms .= '&content_only=1';

$smarty->assign('link_cms', $link_cms);

 

In file

/themes/prestashop/product.tpl file

 

After this line

 

 

 

{$HOOK_PRODUCT_FOOTER}

Adding following code

 

 

 

 

Quote

 

<link href="{$base_dir_ssl}/css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />

<script type="text/javascript" src="{$base_dir_ssl}/js/jquery/jquery.fancybox-1.3.4.js"></script>

<a href="{$link_cms}" id="my_cms_page" class="iframe">{l s='Your CMS Subject'}</a>

<script type="text/javascript">$('a.iframe').fancybox();</script>

 

 

And you can see the result link here, above the "More Info" tab

(Please note, this URL is temporary, may not available soon)

http://agiledemo.dyn...hp?id_product=5

 

 

It works very well, but now i don't understand how can i writte my text on the cms.

Can somebody explain me all the steps?

 

Thanks in advance

Link to comment
Share on other sites

  • 2 months later...

Hi There

 

 

I want to use the Jquery fancy box on the product page so that the use does not have to visit/go to the product page, instead, by clickon a " quick view" button, he can view the entire product details in the fancy box, staying where he is.

 

I am not sure which changes I need to make and where in order to achieve this objective. I think the product tpl file needs to be changed but i am unsure. Could you please help me with this. Thanks so much.

 

 

thickbox was used in PrestaShop 1.3x

fancybox is using in PrestaShop 1.4x

 

To use fancybox, you only need to include following two lines in your theme file

 

 

<link href="{$base_dir_ssl}/css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="{$base_dir_ssl}/js/jquery/jquery.fancybox-1.3.4.js"></script>

 

then run have this jQuery code to enable the links to be popup in a fancybox


<script type="text/javascript">$('a.iframe').fancybox();</script>

 

 

Hope this helps

thickbox was used in PrestaShop 1.3x

fancybox is using in PrestaShop 1.4x

 

To use fancybox, you only need to include following two lines in your theme file

 

 

<link href="{$base_dir_ssl}/css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="{$base_dir_ssl}/js/jquery/jquery.fancybox-1.3.4.js"></script>

 

then run have this jQuery code to enable the links to be popup in a fancybox


<script type="text/javascript">$('a.iframe').fancybox();</script>

 

 

Hope this helps

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