Post by trait » Mon Apr 05, 2010 10:29 pm

Dear all,
as know, the current "Additional Images" with thickbox is only for the single image, not a group, I think it's better for a group not some images split.

As a group there has "next" button when click the image to view.

The way that the thickbox vision is for the old jQuery, the new OpenCart 1.4.6 use jQuery 1.3.2, and you need change "OPENCART_ROOT\catalog\view\javascript\jquery\thickbox" thickbox-compressed.js and modify

Code: Select all

a[@1F="+g+"
to

Code: Select all

a[1F="+g+"
or you can just replace the "@" to "", because there is only one "@" in thickbox-compressed.js.
Save it..

Then, you need modify "OPENCART_ROOT\catalog\view\theme\default\template\product" product.tpl file,

Code: Select all

<?php foreach ($images as $image) { ?>
        <div style="display: inline-block; float: left; text-align: center; margin-left: 5px; margin-right: 5px; margin-bottom: 10px;"><a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="thickbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" style="border: 1px solid #DDDDDD; margin-bottom: 3px;" /></a><br />
          <span style="font-size: 11px;"><?php echo $text_enlarge; ?></span></div>
        <?php } ?>
change to

Code: Select all

<?php foreach ($images as $image) { ?>
        <div style="display: inline-block; float: left; text-align: center; margin-left: 5px; margin-right: 5px; margin-bottom: 10px;"><a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" [code]class="thickbox"
rel="proimages"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" style="border: 1px solid #DDDDDD; margin-bottom: 3px;" /></a><br />
<span style="font-size: 11px;"><?php echo $text_enlarge; ?></span></div>
<?php } ?>[/code]

Also you need know that, I only add

Code: Select all

 rel="proimages"
after

Code: Select all

class="thickbox"

TRAIT-TECH.COM Wholesale electronics with factory price, dropshipper from China


User avatar
New member

Posts

Joined
Sat Apr 03, 2010 10:38 am


Post by dramony » Thu Apr 15, 2010 9:42 am

I tried and it is still working, but only to few products.

Who else tried it?

User avatar
Active Member

Posts

Joined
Sat Oct 24, 2009 12:34 pm

Post by trait » Thu Apr 15, 2010 10:16 am

dramony,
could you please give me your lived website, and I'll try to find your problem for the "thickbox".

TRAIT-TECH.COM Wholesale electronics with factory price, dropshipper from China


User avatar
New member

Posts

Joined
Sat Apr 03, 2010 10:38 am


Post by dramony » Fri Apr 16, 2010 3:52 pm

it is working now, thanks everyone!

User avatar
Active Member

Posts

Joined
Sat Oct 24, 2009 12:34 pm

Post by beasel » Tue May 11, 2010 10:52 pm

Hello,

thanks for posting this. However, once I made the changes, this only works for the additional images, is that correct? It does not allow you to browse from the main product image into the additional images through thickbox. Does anyone know if there is a way to do this?

I saw Qphoria's jcarousel mod, which might be a solution, but I was wondering if there is a way to just use the 'next' and 'prev' buttons in thickbox to accomplish it.

Thanks for any feedback!

Newbie

Posts

Joined
Fri May 07, 2010 3:39 am

Post by Qphoria » Tue May 11, 2010 11:06 pm

Just add it to the main image as well in the product.tpl file. near the top look for class="thickbox" and add rel="proimages" next to it. then you get the main image and the additional images all showing.

This is in 1.4.8 as well.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by beasel » Wed May 12, 2010 1:15 am

Ah ... that makes sense. Worked perfectly! Thanks so much for the rapid help.

Newbie

Posts

Joined
Fri May 07, 2010 3:39 am

Post by snapedesigns » Mon Jan 03, 2011 4:31 pm

Hi to all,

Using Opencart_v1.4.9.1

The above code for thickbox is in place and working fine on products page but I am trying to add this to an information page and when I click on a image all it does is try to load.

Here is the code that I have in place for my Thickbox Test page in information.

Code: Select all

<p>
	<a class="thickbox" href="http://artisticave.com/images/data/lilly.jpg" rel="gallery">
<img src="http://artisticave.com/image/data/lilly.jpg" /></a></p>
<p>
	<a class="thickbox" href="http://artisticave.com/images/data/crawfish.jpg" rel="gallery">
<img src="http://artisticave.com/image/data/crawfish.jpg" /></a></p>
Not sure why the html editor moves rel="gallery" to the end of the link. Not sure if that matters. I tried to to but it directly behind class="thickbox"

I also tried it with one image without the rel"gallery" and had no luck.

Here is the test link for the gallery page
http://artisticave.com/index.php?route= ... tion_id=11

I hope someone can help.

Thanks in advance.

Newbie

Posts

Joined
Mon Jan 03, 2011 3:54 pm

Post by snapedesigns » Tue Jan 04, 2011 1:55 am

Got it working!

I had the wrong path set

should be /image/cache/data/

So simple for so much wasted time.

O well thanks

Newbie

Posts

Joined
Mon Jan 03, 2011 3:54 pm

Post by smorelli » Thu Feb 16, 2012 1:27 am

I've got the thickbox working fine in my site. I'm using OC 1.4.9.3. I have another link on the site that I use to pop up a single image of a UPS delivery times map. I wanted to be consistent so I gave the same class "thickbox" but I don't want it to group with any of the other pictures so I left out the rel="group" from the href. It doesn't seem to matter whether I take it out or change the rel="groupname", it still wants to group all the images together. It's annoying because I have that link on my common/rightnav so when I'm on a product with pictures, it wants to include that other UPS image. Anyone have any ideas on that?

New member

Posts

Joined
Wed Jan 27, 2010 6:28 am

Post by Qphoria » Thu Feb 16, 2012 4:50 am

well that was added to the core in 1.4.9.3 I think. The rel tag isn't part of the href. it is added to the <a>

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 18 guests