| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Lightbox JS v2.0 implementation | ||||
|
|
Thread Tools | Search this Thread |
#31
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
i am having trouble getting this to work...i changed the thickbox_productpage to match my site layout (items have front and rear images) and have it display on the products page rather than the product page
Code:
what happens is that when i click on the link for the detailed image, the screen darkens as though its going to load it, but no detailed image is displayed nor the loading image can anyone think of something that i missed? |
|||||||
#32
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
Great got it working showing thumbs instead of image 1.
http://www.embroideredcaps.info/4021-Brushed-Heavy-Cotton-with-Sandwich-Trim-p-3.html One thing I'd like to do is rather than it loading the detailed image and scaling it, I'dlike it toload a thumbnail from the /files/T directory. Is there a value like "image_name" I can use so instead of calling image.php?id={$images[image].imageid}&type=D I can call files/T/{$images[image]."image_name" Obviously this means ensuring there are images in the T and D folders with the same name but it will help the page load faster. Ant
__________________
Xcart 4.4.? Xcart Next Litecommerce with Drupal http://www.corbywebworx.com Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce |
|||||||
#33
|
|||||||||
|
|||||||||
Re: Lightbox JS v2.0 implementation
Quote:
That would be a nice feature. My detailed images tend to be around 640 x 480 and that makes for larger size thumbnails without them being resampled. Cheers, Jason |
|||||||||
#34
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
I have been living with this mod now for 2 days and it is a home run. Fantastic.
Thank you, Goran for bringing this to us. I have been trying to figure out how to improve this -- I want to make it so that clicking on the thumbnail image opens up the thickbox, image #1. I am REAL CLOSE to figuring this out, but I am obviously missing one (essential) concept. So far, I have done the following: 1. enabled Detailed Product Images options (4.1 admin settings) - and then changed this code in product.tpl: Code:
2. OK, so far so good... then I copied this code from the no longer in use, modules/Detailed_Product_Images/popup_image.tpl: Code:
This is the code that displays the thumbnail, and there is js to call the OLD detailed popup image. 3. I pasted this code at the top of thickbox_productpage.tpl (in its own table) -- and then removed: Code:
SO, now the thumbnail appears, but we need a way to call on thickbox. I tried simply copying the code from later down in thickbox: Code:
and insert it around: Code:
But that only called the thickbox, but did not load the desired image. I AM SO FREAKING CLOSE TO FIGURING THIS OUT... Anyone who actually knows what they are doing want to chime in and set me straight? Thanks!!!!!!!!! Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#35
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
Quote:
This is my first attempt at proper coding shoot me down if it's bad. I added this function to /skin1/common.js Code:
and chopped thickbox_productpage.tpl to look like this Code:
It appears to be working for me. http://www.embroideredcaps.info/4021-Brushed-Heavy-Cotton-with-Sandwich-Trim-p-3.html Ant
__________________
Xcart 4.4.? Xcart Next Litecommerce with Drupal http://www.corbywebworx.com Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce |
|||||||
#36
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
Quote:
I'm viewing your page in Safari (and Firefox) - mac - and I see 3 artifacts: the alt names appear as: "Image 1 " "Image 2" (which means you probably left off the trailing ";" of " " ) Also, in thickbox, the images appear as "image 2 of 4" and "image 4 of 4" -- where are images 1 & 3? Finally, the "quantity" pulldown in Firefox appears to be "squashed" horizontally -- and that could be attributed to the thickbox css -- scroll up a few posts.... I solved it by commenting out the "body" css code. You may have a different workaround... but just thought you should know. What part of the code enables the click on the thumb? Thanks for your contributions!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#37
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
Quote:
Correct, one missing ";" after  . Very hard to spot things in string cocantinations. I think I may have to do browser specific versions to get around the Safari and Firefox problems. Possibly something to dowith the innerHTML bit. Just tried it in Firefox on XP pro and the whole page left aligns. Odd about the image 2 of 4 bit. Will have a look when I get time. The clickable thumb is just a HREF. the url is passed via {$images[image].tmbn_url} and assigned to imgUrlStr and joined up with the other bits. Thanx for looking Ant
__________________
Xcart 4.4.? Xcart Next Litecommerce with Drupal http://www.corbywebworx.com Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce |
|||||||
#38
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
Something I found yesterday on the forum
http://forum.x-cart.com/showthread.php?t=10116 This is well worth a look at and should be made sticky somewhere I think! If I'd seen this on monday I'd wouldn't of gone bald trying to work out the lowest price on my catergory display page. Very Useful!!
__________________
Xcart 4.4.? Xcart Next Litecommerce with Drupal http://www.corbywebworx.com Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce |
|||||||
#39
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
Quote:
I'm good, but not that good! You lost me at: "and assigned to imgUrlStr" IF -- my code to display the thumb is: {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"} Then I would want to surround it with: <a href="THE CONTENT" /></a> I have tried all kinds of stings -- starting with the obvious. If you wanted THIS code that displays the thumbs (variants and all) and make it clickable INTO "thickbox" -- how would you do this? I really appreciate your feedback. Thanks, Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#40
|
|||||||
|
|||||||
Re: Lightbox JS v2.0 implementation
Quote:
going off of memory...if you want a clickable thumbnail just move the include after the <img src.../> but keep it inside the <a href...> and </a> |
|||||||
|
|||
X-Cart forums © 2001-2020
|