Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Page 2 of 3
new lightbox tutorial in wiki
 
redegifts
Member
 
Total Posts:  34
Joined:  2007-12-04
 

Seems to work well, EXCEPT:

the CLOSE and LOADING images don’t work

according to your code in the lightbox.js file, the code should be:

var fileLoadingImage = “../images/lightbox/loading.gif”;
var fileBottomNavCloseImage = “../images/lightbox/closelabel.gif”;

Since this file is located in the /magento/js/lightbox folder, wouldn’t this code only go back one level to the /magento/js/images folder which is not created. 

However, I tried to create a /magento/js/images/lightbox to match the code and the loading.gif and closelabel.gif would not show up. 

To close the lightbox images, I just click away from the pictures.

Besides this, it is a FANTASTIC addition that many of us have been trying to figure out for some time. 

Thanks again,
-Russ

 
Magento Community Magento Community
Magento Community
Magento Community
 
PC Games Plus
Member
 
Avatar
Total Posts:  56
Joined:  2008-01-04
Sacramento, CA
 

I had to play around with the paths too, to get it to work. I did finally get it working. I right clicked on the location where the arrow pictures were supposed to be and looked at the propeties and it told me where it was looking then I adjusted the path in the file accordingly. Only thing now is that i doesn’t scale the picture to fit the screen, it shows it full size. I realize I should scale down my own to save loading time it’s just that It’s alot of extra work to resize all of my pictures. I looked into the file and saw what to me seemed like instructions for resizing to fit the client display...but it doesn’t work. Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
chinesedream
Guru
 
Total Posts:  745
Joined:  2007-08-31
San Francisco, CA
 
redegifts - 09 April 2008 05:59 AM

Seems to work well, EXCEPT:

the CLOSE and LOADING images don’t work

according to your code in the lightbox.js file, the code should be:

var fileLoadingImage = “../images/lightbox/loading.gif”;
var fileBottomNavCloseImage = “../images/lightbox/closelabel.gif”;
-Russ

I have the same problem. I moved the two gif images to the same directory as the lightbox.js, and change path to
var fileLoadingImage = “loading.gif”;

still not showing up.

By the way, you may see the overlapping with the category menu, this is because the
#nav { padding:0 20px; font-size:1.1em; z-index:999; } in the menu.css sets to ‘999’.

Simply change the z-index value higher than that in the #lightbox like so.

#lightbox { z-index: 3000;}

p/s. Thanks for the how-to guide smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiaraweb
Guru
 
Avatar
Total Posts:  643
Joined:  2008-03-21
Aviano ~ Italy
 

Hi
I installed and changed the file lightbox.js

at line 65/66 you must add ../../ before the original string
and it works fine

http://ecobabybusiness.com/public/shop/index.php/inserti-co/veli-biodegradabili-in-rotolo-da-100-fogli.html

today I cannot see the extensions listed in magento site… ?? nobody can download the addon?

 Signature 

Non criticare cio’ che non puoi capire.
Bob Dylan

My Live Magento Shops
http://www.ecobaby.it
http://www.pesicampione.it

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tweakmag
Sr. Member
 
Avatar
Total Posts:  277
Joined:  2007-08-31
London, UK
 

chiara - I released the extension prematurely - it will cause problems if you uninstall it - I will be releasing an updated version early next week - which will work with all themes that you may create as well. I got magento to remove this extension so it would not be downloaded with it having a problem.

Cheers
Adam

 Signature 

adam martin: internet consultant / web developer
contact | adam.martin@internetconsultants.com.au | +61 4 3331 3374 | skype adam.j.martin
http://www.tweakmag.com - Tweaking and Customizing The Magento eCommerce Platform

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiaraweb
Guru
 
Avatar
Total Posts:  643
Joined:  2008-03-21
Aviano ~ Italy
 
Ajazza - 10 April 2008 01:37 AM

chiara - I released the extension prematurely - it will cause problems if you uninstall it - I will be releasing an updated version early next week - which will work with all themes that you may create as well. I got magento to remove this extension so it would not be downloaded with it having a problem.

Cheers
Adam

Thank You Adam

 Signature 

Non criticare cio’ che non puoi capire.
Bob Dylan

My Live Magento Shops
http://www.ecobaby.it
http://www.pesicampione.it

 
Magento Community Magento Community
Magento Community
Magento Community
 
carsal
Member
 
Total Posts:  38
Joined:  2008-03-31
Medellin, Colombia
 

I have followed the instructions, but can’t manage to get it working. When I try to open the alt image, it will open in full screen. I am not getting errors in my logs. Really would appreciate any help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chinesedream
Guru
 
Total Posts:  745
Joined:  2007-08-31
San Francisco, CA
 

After spending hours making the jquery tab working for product collateral section (production description, additional info etc), I am dismay to find out it disables the lightbox and the image slider.
http://74.52.59.43/index.php/bluetooth-accessories/jawbone-headset-black.html
If I remove the jquery scripts, lightbox and image slider come back.

<action method="addJs"><script>jquery/jquery-1.2.3.pack.js</script></action>
<action method="addJs"><script>jquery/ui.tabs.pack.js</script></action>

Just found out, it also disable the accordion script in onepage checkout :(

Can’t prototype and jquery co-exist?

 
Magento Community Magento Community
Magento Community
Magento Community
 
chinesedream
Guru
 
Total Posts:  745
Joined:  2007-08-31
San Francisco, CA
 

Never mind! got it working now.

First found the jQuery.noConflict( ) mode, got the image slider working, but not with lightbox. More testing, found out the jquery files have to place AFTER the lightbox.js in the page.xml smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
carsal
Member
 
Total Posts:  38
Joined:  2008-03-31
Medellin, Colombia
 

How would I be able to debug so I could see where the script is failing/not loading. I tried changing the position of lighbox.js in the head block wiht no luck. I there any other special consideration I should have?

 
Magento Community Magento Community
Magento Community
Magento Community
 
carsal
Member
 
Total Posts:  38
Joined:  2008-03-31
Medellin, Colombia
 

Managed to get it working. In the app/design/frontend/default/default/layout/page.xml I was including the lines

<action method="addJs"><script>lightbox/lightbox.js</script></action>
<
action method="addCss"><stylesheet>css/lightbox.css</stylesheet></action>
in the “print” section instead of the “default” section. Also I had to include the lines AFTER the prototype.js lines so it would work.

I had to modify the images path in the lightbox.js to:

../skin/frontend/default/default/images/lightbox/loading.gif
../skin/frontend/default/default/images/lightbox/closelabel.gif

 
Magento Community Magento Community
Magento Community
Magento Community
 
gavh
Member
 
Total Posts:  36
Joined:  2008-04-01
 

Thanks for the tutorial.

I edited the media.phtml a little to get some consistency with my image sizes.

My original/large images are 1100px x 1100px but I only want them to appear in lightbox as 600 x 600

Replace

<?php foreach ($this->getGalleryImages() as $_image): ?>
        
<li>
            <
a href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>" rel="lightbox[rotation]" title="<?php echo $_product->getName();?>">
             <
img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(120, 120); ?>" width="120" height="120" alt=""/>
              </
a>
          </
li>
        
<?php endforeach; ?>

With

<?php foreach ($this->getGalleryImages() as $_image): ?>
        
<li>
            <
a href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->resize(600, 600); ?>" rel="lightbox[rotation]" title="<?php echo $_product->getName();?>">
             <
img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(120, 120); ?>" width="120" height="120" alt=""/>
              </
a>
          </
li>
        
<?php endforeach; ?>

Obviously change getFile())->resize(600, 600); to your own required dimensions.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
chinesedream
Guru
 
Total Posts:  745
Joined:  2007-08-31
San Francisco, CA
 

I’d just noticed that in the configurable product, the ‘x’ close icon is gone but it’s showing up fine with simple product. Anybody has the same problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
david_pokerfield
Jr. Member
 
Total Posts:  1
Joined:  2008-04-01
 

same problem here
the loading bar doesn’t work too.....

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Guru
 
Avatar
Total Posts:  459
Joined:  2008-04-28
London, UK
 

Hi,

This does not seem to work any more - I have tried everything, but nothing happens.

Can somebody confirm that this works on 1.0.19870 and later?

Also - any update on the extension?

Lisa

 Signature 

ExtraCall.com - UK Telecommunications & VOIP

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 3
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53152 users|513 users currently online|107157 forum posts