Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PIM Slideshow + bxGallery (thumbnails) ?


ce7

Recommended Posts

Posted

Hi,

 

I just installed PIM Slideshow on my osC 2.3.3 and it works great.

 

I like to combine this add on with bxGallery (thumbnail) so that there are all the thumbnails show up below the slideshow image.

 

I copy the code from product_info.php and try to modify the variable to match the slideshow db table.

 

 


--
-- Table structure for table `slideshow`
--
CREATE TABLE IF NOT EXISTS `slideshow` (
`slideshow_id` int(11) NOT NULL auto_increment,
`slideshow_name` varchar(255) NOT NULL default '',
`slideshow_description` text NOT NULL,
`slideshow_image` varchar(255) default NULL,
`slideshow_url` tinytext NOT NULL,
`date_added` datetime default NULL,
`last_modified` datetime default NULL,
PRIMARY KEY (`slideshow_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

<?php
if (tep_not_null($slides_info['slides_info'])) {
$pi_query = tep_db_query("select slideshow_image, slideshow_url from " . TABLE_SLIDESHOW . " where slideshow_id = '" . (int)$slideshow_id['slideshow_id'] . "' order by last_modified");
if (tep_db_num_rows($pi_query) > 0) {
?>
<div id="piGal" style="float: right;">
<ul>
<?php
$pi_counter = 0;
while ($pi = tep_db_fetch_array($pi_query)) {
$pi_counter++;
$pi_entry = ' <li><a href="';
if (tep_not_null($pi['slideshow_url'])) {
$pi_entry .= '#piGalimg_' . $pi_counter;
} else {
$pi_entry .= tep_href_link(DIR_WS_IMAGES_SLIDESHOW . $pi['slideshow_image'], '', 'NONSSL', false);
}
$pi_entry .= '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES_SLIDESHOW . $pi['slideshow_image']) . '</a>';
if (tep_not_null($pi['slideshow_url'])) {
$pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['slideshow_url'] . '</div></div>';
}
$pi_entry .= '</li>';
echo $pi_entry;
}
?>
</ul>
</div>
<script type="text/javascript">
$('#piGal ul').bxGallery({
maxwidth: 300,
maxheight: 200,
thumbwidth: <?php echo (($pi_counter > 1) ? '75' : '0'); ?>,
thumbcontainer: 300,
load_image: 'ext/jquery/bxGallery/spinner.gif'
});
</script>
<?php
} else {
?>
<div id="piGal" style="float: right;">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES_SLIDESHOW . $slides_info['slideshow_image'], '', 'NONSSL', false) . '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES_SLIDESHOW . $slides_info['slideshow_image'], addslashes($slides_info['slideshow_name']), null, null, 'hspace="5" vspace="5"') . '</a>'; ?>
</div>
<?php
}
?>
<script type="text/javascript">
$("#piGal a[rel^='fancybox']").fancybox({
cyclic: true
});
</script>
<?php
}
?>

 

althought it doesn't have any error message, but it doesn't show the thumbnails at all.

 

Did I go in wrong direction? What should I do to make the thumbnail show up?

 

Lyn

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...