Post by Nasko » Sun Jan 22, 2012 4:47 am

Hello Mates I am not getting how it works with fancybox.
I am tring to poppup message when clicking on certain word but I got new window instead.

I place the link on the word in

Code: Select all

catalog/language/german/product/product.php
This is how the line i put the fancybox link looks like :

Code: Select all

$_['text_tax']          = 'Price (some text here <a class="fancybox" href="index.php?route=information/information/info&information_id=6"><b>Shiping</b></a>):';
So i want to have some aditional text information in fancybox by klicking on price, same as shiping. But I dont get the fancybox poppup even for shiping ?

Why ?
Should I put something in catalog/view/theme/mytheme/template/product/product.tpl ???

Opencart version : 1.5.x , fancybox is installed.
Not working on xampp nore on my server.


I hope you can teach me my misstake :)

OC 1.5.1.3 http://www.coshino.de


New member

Posts

Joined
Mon Jan 09, 2012 5:55 pm


Post by Qphoria » Sun Jan 22, 2012 10:25 am

Unlike thickbox which was auto-initiated, fancybox needs to be initiated on pages that don't already have it.

So add to the tpl:

Code: Select all

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

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Nasko » Sun Jan 22, 2012 11:38 pm

Manny thanks, this works now. :) I am sure that some day somebody will google this post and will help him too :)))

OC 1.5.1.3 http://www.coshino.de


New member

Posts

Joined
Mon Jan 09, 2012 5:55 pm


Post by Univest » Tue Jan 31, 2012 8:59 am

Hello mates

I trying to figure out how to make the code below to pop out when something is added to the cart with fancy box, can you please give a sugeestion on how this is done. dont seem to find a solution to it :(

thank you in advance

Code: Select all

<?php if ($this->cart->getSubTotal() > 0 ) { ?>
      <li><a id="top-checkout" href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>
      <li><a id="top-cart" href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a></li>
      <li><a id="top-account" href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
     <?php } ?>

Newbie

Posts

Joined
Fri May 13, 2011 1:18 am

Post by Nasko » Thu Feb 09, 2012 1:31 am

You mean somethink like this ?

http://www.opencart.com/index.php?route ... ESC&page=2

Not sure how to do it with fancybox but I think just take the free Module and adjust it as you want... This would do it ??

OC 1.5.1.3 http://www.coshino.de


New member

Posts

Joined
Mon Jan 09, 2012 5:55 pm


Post by Univest » Thu Feb 09, 2012 3:32 am

thank you for yoru reply Nasko

your suggestion is to complex for me and cant figure it out. What I have is a few buttons with the code

Code: Select all

    <?php if ($this->cart->getSubTotal() > 0 ) { ?>
          <li><a id="top-checkout" href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>
          <li><a id="top-cart" href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a></li>
          <li><a id="top-account" href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
         <?php } ?>
problem is that these only show up on page refresh but their logic and code works. just need a small script that makes them visible when the if condition is met. ???

thank you

Newbie

Posts

Joined
Fri May 13, 2011 1:18 am
Who is online

Users browsing this forum: No registered users and 81 guests