Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 07-02-2007 06:16:20

nicgregory
Member
Registered: 06-30-2007
Posts: 17

"display multiple images" not working (NOT lightbox)

Hello,

I have this question running in the general CCP6 forum, and a moderator has identified it as a problem specific to the UK distribution of CCP6. He thought it might be something Howard would need to look at. The post is at:

https://forum.kryptronic.com/viewtopic.php?id=15158

Apologies if it was unnecessary to post this here also.

Thanks,

Offline

 

#2 07-03-2007 03:50:09

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi

Your product detail code does not include the mouse over part, I have included the full copy of the default product detail description.

Code:

<?php 

// +--
// | Get variables we need to draw this display.
// +--

$app      = $this->globals('khxc.app');
$ns       = $this->globals('khxc.namespace');
$eol      = $this->globals('khxc.eol');
$proddisp = $this->globals('ecom.prod_proddetail');
$xid      = $proddisp['id'];
$id       = $this->xhtml_encode($xid);
$usethumb = $this->globals('khxc_settings.' . $app . '.imguseprodthumb');
$imgwidthth = $this->globals('khxc_settings.' . $app . '.imgsizeprodlgth');

if ($ns == 'addcart') {$ns = 'prodshow';}

$this->globals('ecom.prod_proddisp',$proddisp);
$this->globals('ecom.prod_priceinfo',$proddisp['khxc.priceinfo']);

// +--
// | Create the product name and description.
// +--

$prodname  = $this->xhtml_encode($proddisp['name']);
$proddesc  = $proddisp['desclong'];
$hastags   = $proddisp['deschastags'];

if (empty($proddesc)) {

     $proddesc = $proddisp['descshort'];
     $hastags  = 0;

} // End of if statement.

if (empty($hastags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}

// +--
// | Create the image tag(s).
// +--

$imglist  = $proddisp['imglg'];

if (empty($imglist)) {$imglist = 'none.png';}

$imglist  = $this->make_list($imglist);
$imgwidth = $this->globals('khxc_settings.' . $app . '.imgsizeprodlg');
$imgtag   = '';

if (empty($imgwidth)) {$imgwidth = 200;}
$count   = 0;
$multilg = 0;
foreach ($imglist as $num => $name) {
    if ($count == 0) { $lgimname = $name; }

    $count++;
} // End of foreach statement.
if ($count > 1) {
  // We have multi large images.
  $multilg = 1;
      
} // End of if statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '<script type="text/javascript">' . $eol;
    $imgtag   .= '<!--' . $eol;
    $imgtag   .= 'if(document.images) { // create an array of prodImages' . $eol;
    $imgtag   .= 'document.prodImages = new Array();' . $eol;

}
foreach ($imglist as $num => $img) {

     if (($multilg) && ($usethumb)) {
         $imgurl   = 'media/' . $app . '/prodlg/' . $img;
        $imgtag   .= 'document.prodImages[' . $num . '] = new Image();' . $eol;
        $imgtag   .= 'document.prodImages[' . $num . '].src = "' . $imgurl . '";' . $eol;
        $imgtag   .= 'document.prodImages[' . $num . '].pop = "' . $imgurl . '";' . $eol;
      } else {
          $imgurl   = 'media/' . $app . '/prodlg/' . $img;

         $imgtag   .= '<img src="' . $imgurl . '" ';
         if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
         $imgtag  .= 'alt="' . $prodname . '" />';

      } // End of if statement.

} // End of foreach statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '//-->' . $eol;
    $imgtag   .= '}' . $eol;
    $imgtag   .= '</script>' . $eol;
    $imgurl   = 'media/' . $app . '/prodlg/' . $lgimname;

    $imgtag   .= '<img src="' . $imgurl . '" ';
     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
    $imgtag  .= 'alt="' . $prodname . '"  id="prodImage" />';

} // End of if statement.

// +--
// | Handle extra large image.
// +--

$showxl  = 0;

$imglist = $proddisp['imgxl'];

if (empty($imglist)) {$imglist = 'none.png';}

if (($imglist) && ($imglist != 'none.png') && ($ns == 'prodshow')) {

     $this->globals('khxc.load_lightbox',1);

     $showxl   = 1;
     $xlcount  = 0;
     $xlimgtag = '';
     $zlcount  = count($imglist);

     $imglist  = $this->make_list($imglist);

     if (count($imglist) == 1) {$text = 'View Larger Image';}
     else                      {$text = 'View Larger Image Slideshow';}

     foreach ($imglist as $num => $img) {

          $xlcount++;

          $xlurl  = $this->globals('khxc.url_nonssl');
          $xlurl .= '/media/' . $app . '/prodxl/' . $img;

          if ($xlcount == 1) {

               $xlimgtag .= '<p><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } else {

               $xlimgtag .= '<p class="hidden"><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } // End of if statement.

     } // End of foreach statement.

} // End of if statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '<p>';
     foreach ($imglist as $num => $name) {
        $imgurl   = 'media/' . $app . '/prodlg/' . $name;
        $imgtag   .= '<img src=\'' . $imgurl . '\' onmouseover="var x=document.getElementById(\'prodImage\'); x.src=document.prodImages[' . $num . '].src;" width="' . $imgwidthth . '" alt="' . $prodname . '" />';
    } // End of foreach statement.
    $imgtag   .= '</p>';

} // End of if statement.
// +--
// | Print the display.
// +--

?>

<table id="proddetail--<?php print $id; ?>" class="khxc_cptbl_det">

<tr class="khxc_cptbl_det"><td class="khxc_cptbl_det">

<table class="khxc_ghost"><tr><td class="khxc_ghost" style="width: <?php print $imgwidth; ?>px">

<?php print $imgtag; ?>

<?php 

// +--
// | Handle the extra large image tag and email a friend link.
// +--

$emailfr = $this->globals('khxc_settings.' . $app . '.emailfriend');

if ($ns != 'prodshow') {$emailfr = 0;}

if (($showxl) || ($emailfr)) {

     print '<div style="width:' . $imgwidth . 'px">' . $eol;

     if ($showxl) {print $xlimgtag;}

     if ($emailfr) {

          $link_emailf = $this->link_namespace($app,'emailfriend',array('ref' => $proddisp['id']));

          print '<p><a href="' . $link_emailf . '" title="Email a Friend" ';
          print 'class="khxc_hrefbutton">Email This Item to a Friend</a></p>';

     } // End of if statement.

     print '</div>' . $eol;

} // End of if statement.

?>

</td><td class="khxc_ghost">

<p><strong><?php print $prodname; ?></strong></p>

<?php print $proddesc; ?>

<?php $this->include_file($app,'pricedisp.php'); ?>

</td></tr>

</table>

</td></tr></table>

<?php 

// +--
// | Print the product options if we can add the item to the 
// | shopping cart or wish list and we're on the prodshow
// | namespace.
// +--

$add_ok = 1;

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {$add_ok = 0;}
if ($proddisp['pricestatus'] == 'D') {$add_ok = 0;}

if (($ns == 'prodshow') && ($add_ok)) {

     $this->include_namespace($app,'prodshowopt',array());

} // End of if statement.

?>

Offline

 

#3 07-03-2007 03:57:11

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: "display multiple images" not working (NOT lightbox)

Just as an FYI Howard that isn't what gets installed with a fresh installation.  When you released the last update I installed my development setup from scratch and didn't get that which is why I was seeing the same problem as nicgregory.

Offline

 

#4 07-03-2007 04:04:46

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: "display multiple images" not working (NOT lightbox)

I just put that code in the default display format and it didn't change anything (ie: still doesn't show all of the large images).  The source shows the JS being built but there aren't any thumbnails for the other images.

Code:

<script type="text/javascript">
<!--
if(document.images) { // create an array of prodImages
document.prodImages = new Array();
document.prodImages[0] = new Image();
document.prodImages[0].src = "media/gbu0/prodlg/DESKTOP1002.png";
document.prodImages[0].pop = "media/gbu0/prodlg/DESKTOP1002.png";
document.prodImages[1] = new Image();
document.prodImages[1].src = "media/gbu0/prodlg/DESKTOP1001.png";
document.prodImages[1].pop = "media/gbu0/prodlg/DESKTOP1001.png";
document.prodImages[2] = new Image();
document.prodImages[2].src = "media/gbu0/prodlg/DESKTOP1003.png";
document.prodImages[2].pop = "media/gbu0/prodlg/DESKTOP1003.png";
//-->
}
</script>
<img src="media/gbu0/prodlg/DESKTOP1002.png" width="200" alt="Flatscreen PC"  id="prodImage" /><p><img src='media/gbu0/prodlg/DESKTOP1002.png' onmouseover="var x=document.getElementById('prodImage'); x.src=document.prodImages[0].src;" width="50" alt="Flatscreen PC" /></p>

Offline

 

#5 07-03-2007 04:08:53

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi Dave,

This is for the UK version Only!!

Offline

 

#6 07-03-2007 04:09:49

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: "display multiple images" not working (NOT lightbox)

This is the UK version I'm using and trying Howard.

Offline

 

#7 07-03-2007 11:23:38

nicgregory
Member
Registered: 06-30-2007
Posts: 17

Re: "display multiple images" not working (NOT lightbox)

Thanks your replies. I have tried this code and also found it does not fix the problem.

Any more ideas?

Offline

 

#8 07-04-2007 06:22:05

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi

This only works if you have an up to date CC6-UK install.

Offline

 

#9 07-04-2007 07:17:28

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: "display multiple images" not working (NOT lightbox)

As I said in a previous post Howard this was with a fresh install after the last update was released.  Basically out of the box it doesn't work.  I will remove my installation and install from scratch again to see if it makes a difference.

Offline

 

#10 07-04-2007 10:54:06

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: "display multiple images" not working (NOT lightbox)

I just wiped out my UK installation completely and installed it from scratch.  There was NO change to the displaying multiple large image problem Howard.  I get one image and one small (tiny) thumbnail under it.

Offline

 

#11 07-04-2007 14:52:33

nicgregory
Member
Registered: 06-30-2007
Posts: 17

Re: "display multiple images" not working (NOT lightbox)

I'm half way through my 15 day free trial so I must have the most up to date version, right?
I don't even get the additional thumbnail that Dave mentioned, I just one large pic.

It would be good to know if this will work before we commit to buy, which we are planning on doing.

Thanks again

Offline

 

#12 07-05-2007 09:38:08

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi

The Standard CCP6-UK, provides the large thumb nail out of the box, it looks like you have perhaps put in US mods that have stopped that working.

On this page is a video tutorial of how to set-up multi images on the standard CCP6-UK.

http://www.clickcartpro.co.uk/gbu0-disp … rials.html

It looks like from your website, that the product detail page is not correct.

Offline

 

#13 07-05-2007 10:07:33

nicgregory
Member
Registered: 06-30-2007
Posts: 17

Re: "display multiple images" not working (NOT lightbox)

This function didn't work even before I made a small modification to the code that was only to display an additional column in the product table.

I have  changed the dispaly type to centred, which I haven't touched, so you can see that doesn't work either:

http://www.thepalmhouse.co.uk/clickcart … ref=TrWa2L

Last edited by nicgregory (07-05-2007 10:19:45)

Offline

 

#14 07-05-2007 11:35:00

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi

I must be due to a change in the code you have made, it works in the standard install if you follow the instructions.

http://www.clickcartpro.co.uk/gbu0-prod … xc006.html

Offline

 

#15 07-05-2007 11:52:48

nicgregory
Member
Registered: 06-30-2007
Posts: 17

Re: "display multiple images" not working (NOT lightbox)

I am using the standard install. I haven't made any changes to the code. Can you not just tell me how to fix it???

Last edited by nicgregory (07-05-2007 12:01:32)

Offline

 

#16 07-05-2007 13:41:08

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi

If you have followed the Video Tutorial and not change the code then it will work.

Email me you ftp information and a admin super user account and I will have a quick look.

Offline

 

#17 07-05-2007 14:12:24

nicgregory
Member
Registered: 06-30-2007
Posts: 17

Re: "display multiple images" not working (NOT lightbox)

Hi Howard,

I have followed the instructions in the tutorial and I haven't made any changes to the code. I only have one admin account for my ftp server and I am unable to change the password, so I really can't give it out to you i'm afraid.

Could you just give an idea of what I could do to get this working? What is likely to have gone wrong? Maybe you could let me have the correct code?

thanks again

Offline

 

#18 07-05-2007 14:13:57

nicgregory
Member
Registered: 06-30-2007
Posts: 17

Re: "display multiple images" not working (NOT lightbox)

The fact that Dave Martin wad also unable to get this working demonstrates that it's not me fiddling with the code that has caused the problem, surely?

Offline

 

#19 07-06-2007 11:27:57

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi
As I said

If you have followed the Video Tutorial and not change the code then it will work.

Email me you ftp information and a admin super user account and I will have a quick look.

Then I will be able to find the problem.

Offline

 

#20 07-10-2007 08:31:35

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi

Another customer allowed me access and I have a fix for this, please replace your product detail displays with these.


The Default:

Code:

<?php 

// +--
// | Get variables we need to draw this display.
// +--

$app      = $this->globals('khxc.app');
$ns       = $this->globals('khxc.namespace');
$eol      = $this->globals('khxc.eol');
$proddisp = $this->globals('ecom.prod_proddetail');
$xid      = $proddisp['id'];
$id       = $this->xhtml_encode($xid);
$usethumb = $this->globals('khxc_settings.' . $app . '.imguseprodthumb');
$imgwidthth = $this->globals('khxc_settings.' . $app . '.imgsizeprodlgth');

if ($ns == 'addcart') {$ns = 'prodshow';}

$this->globals('ecom.prod_proddisp',$proddisp);
$this->globals('ecom.prod_priceinfo',$proddisp['khxc.priceinfo']);

// +--
// | Create the product name and description.
// +--

$prodname  = $this->xhtml_encode($proddisp['name']);
$proddesc  = $proddisp['desclong'];
$hastags   = $proddisp['deschastags'];

if (empty($proddesc)) {

     $proddesc = $proddisp['descshort'];
     $hastags  = 0;

} // End of if statement.

if (empty($hastags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}

// +--
// | Create the image tag(s).
// +--

$imglistlg  = $proddisp['imglg'];

if (empty($imglistlg)) {$imglist = 'none.png';}

$imglistlg  = $this->make_list($imglistlg);
$imgwidth = $this->globals('khxc_settings.' . $app . '.imgsizeprodlg');
$imgtag   = '';

if (empty($imgwidth)) {$imgwidth = 200;}
$count   = 0;
$multilg = 0;
foreach ($imglistlg as $num => $name) {
    if ($count == 0) { $lgimname = $name; }

    $count++;
} // End of foreach statement.
if ($count > 1) {
  // We have multi large images.
  $multilg = 1;
      
} // End of if statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '<script type="text/javascript">' . $eol;
    $imgtag   .= '<!--' . $eol;
    $imgtag   .= 'if(document.images) { // create an array of prodImages' . $eol;
    $imgtag   .= 'document.prodImages = new Array();' . $eol;

}
foreach ($imglistlg as $num => $img) {

     if (($multilg) && ($usethumb)) {
         $imgurl   = 'media/' . $app . '/prodlg/' . $img;
        $imgtag   .= 'document.prodImages[' . $num . '] = new Image();' . $eol;
        $imgtag   .= 'document.prodImages[' . $num . '].src = "' . $imgurl . '";' . $eol;
        $imgtag   .= 'document.prodImages[' . $num . '].pop = "' . $imgurl . '";' . $eol;
      } else {
          $imgurl   = 'media/' . $app . '/prodlg/' . $img;

         $imgtag   .= '<img src="' . $imgurl . '" ';
         if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
         $imgtag  .= 'alt="' . $prodname . '" />';

      } // End of if statement.

} // End of foreach statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '//-->' . $eol;
    $imgtag   .= '}' . $eol;
    $imgtag   .= '</script>' . $eol;
    $imgurl   = 'media/' . $app . '/prodlg/' . $lgimname;

    $imgtag   .= '<img src="' . $imgurl . '" ';
     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
    $imgtag  .= 'alt="' . $prodname . '"  id="prodImage" />';

} // End of if statement.

// +--
// | Handle extra large image.
// +--

$showxl  = 0;

$imglistxlg = $proddisp['imgxl'];

if (empty($imglistxlg)) {$imglistxlg = 'none.png';}

if (($imglistxlg) && ($imglistxlg != 'none.png') && ($ns == 'prodshow')) {

     $this->globals('khxc.load_lightbox',1);

     $showxl   = 1;
     $xlcount  = 0;
     $xlimgtag = '';
     $zlcount  = count($imglistxlg);

     $imglistxlg  = $this->make_list($imglistxlg);

     if (count($imglistxlg) == 1) {$text = 'View Larger Image';}
     else                      {$text = 'View Larger Image Slideshow';}

     foreach ($imglistxlg as $num => $img) {

          $xlcount++;

          $xlurl  = $this->globals('khxc.url_nonssl');
          $xlurl .= '/media/' . $app . '/prodxl/' . $img;

          if ($xlcount == 1) {

               $xlimgtag .= '<p><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } else {

               $xlimgtag .= '<p class="hidden"><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } // End of if statement.

     } // End of foreach statement.

} // End of if statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '<p>';
     foreach ($imglistlg as $num => $name) {
        $imgurl   = 'media/' . $app . '/prodlg/' . $name;
        $imgtag   .= '<img src=\'' . $imgurl . '\' onmouseover="var x=document.getElementById(\'prodImage\'); x.src=document.prodImages[' . $num . '].src;" width="' . $imgwidthth . '" alt="' . $prodname . '" />';
    } // End of foreach statement.
    $imgtag   .= '</p>';

} // End of if statement.
// +--
// | Print the display.
// +--

?>

<table id="proddetail--<?php print $id; ?>" class="khxc_cptbl_det">

<tr class="khxc_cptbl_det"><td class="khxc_cptbl_det">

<table class="khxc_ghost"><tr><td class="khxc_ghost" style="width: <?php print $imgwidth; ?>px">

<?php print $imgtag; ?>

<?php 

// +--
// | Handle the extra large image tag and email a friend link.
// +--

$emailfr = $this->globals('khxc_settings.' . $app . '.emailfriend');

if ($ns != 'prodshow') {$emailfr = 0;}

if (($showxl) || ($emailfr)) {

     print '<div style="width:' . $imgwidth . 'px">' . $eol;

     if ($showxl) {print $xlimgtag;}

     if ($emailfr) {

          $link_emailf = $this->link_namespace($app,'emailfriend',array('ref' => $proddisp['id']));

          print '<p><a href="' . $link_emailf . '" title="Email a Friend" ';
          print 'class="khxc_hrefbutton">Email This Item to a Friend</a></p>';

     } // End of if statement.

     print '</div>' . $eol;

} // End of if statement.

?>

</td><td class="khxc_ghost">

<p><strong><?php print $prodname; ?></strong></p>

<?php print $proddesc; ?>

<?php $this->include_file($app,'pricedisp.php'); ?>

</td></tr>

</table>

</td></tr></table>

<?php 

// +--
// | Print the product options if we can add the item to the 
// | shopping cart or wish list and we're on the prodshow
// | namespace.
// +--

$add_ok = 1;

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {$add_ok = 0;}
if ($proddisp['pricestatus'] == 'D') {$add_ok = 0;}

if (($ns == 'prodshow') && ($add_ok)) {

     $this->include_namespace($app,'prodshowopt',array());

} // End of if statement.

?>

The Centred:

Code:

<?php 

// +--
// | Get variables we need to draw this display.
// +--

$app      = $this->globals('khxc.app');
$ns       = $this->globals('khxc.namespace');
$eol      = $this->globals('khxc.eol');
$proddisp = $this->globals('ecom.prod_proddetail');
$xid      = $proddisp['id'];
$id       = $this->xhtml_encode($xid);
$usethumb = $this->globals('khxc_settings.' . $app . '.imguseprodthumb');
$imgwidthth = $this->globals('khxc_settings.' . $app . '.imgsizeprodlgth');

if ($ns == 'addcart') {$ns = 'prodshow';}

$this->globals('ecom.prod_proddisp',$proddisp);
$this->globals('ecom.prod_priceinfo',$proddisp['khxc.priceinfo']);

// +--
// | Create the product name and description.
// +--

$prodname  = $this->xhtml_encode($proddisp['name']);
$proddesc  = $proddisp['desclong'];
$hastags   = $proddisp['deschastags'];

if (empty($proddesc)) {

     $proddesc = $proddisp['descshort'];
     $hastags  = 0;

} // End of if statement.

if (empty($hastags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}

// +--
// | Create the image tag(s).
// +--

$imglistlg  = $proddisp['imglg'];

if (empty($imglistlg)) {$imglistlg = 'none.png';}

$imglistlg  = $this->make_list($imglistlg);
$imgwidth = $this->globals('khxc_settings.' . $app . '.imgsizeprodlg');
$imgtag   = '';

if (empty($imgwidth)) {$imgwidth = 200;}
$count   = 0;
$multilg = 0;
foreach ($imglistlg as $num => $name) {
    if ($count == 0) { $lgimname = $name; }

    $count++;
} // End of foreach statement.
if ($count > 1) {
  // We have multi large images.
  $multilg = 1;
      
} // End of if statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '<script type="text/javascript">' . $eol;
    $imgtag   .= '<!--' . $eol;
    $imgtag   .= 'if(document.images) { // create an array of prodImages' . $eol;
    $imgtag   .= 'document.prodImages = new Array();' . $eol;

}
foreach ($imglistlg as $num => $img) {

     if (($multilg) && ($usethumb)) {
         $imgurl   = 'media/' . $app . '/prodlg/' . $img;
        $imgtag   .= 'document.prodImages[' . $num . '] = new Image();' . $eol;
        $imgtag   .= 'document.prodImages[' . $num . '].src = "' . $imgurl . '";' . $eol;
        $imgtag   .= 'document.prodImages[' . $num . '].pop = "' . $imgurl . '";' . $eol;
      } else {
          $imgurl   = 'media/' . $app . '/prodlg/' . $img;

         $imgtag   .= '<img src="' . $imgurl . '" ';
         if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
         $imgtag  .= 'alt="' . $prodname . '" />';

      } // End of if statement.

} // End of foreach statement.
if (($multilg) && ($usethumb)) {
    $imgtag   .= '//-->' . $eol;
    $imgtag   .= '}' . $eol;
    $imgtag   .= '</script>' . $eol;
    $imgurl   = 'media/' . $app . '/prodlg/' . $lgimname;

    $imgtag   .= '<img src="' . $imgurl . '" ';
     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
    $imgtag  .= 'alt="' . $prodname . '"  id="prodImage" />';

} // End of if statement.

// +--
// | Handle extra large image.
// +--

$showxl  = 0;

$imglistxlg = $proddisp['imgxl'];

if (empty($imglistxlg)) {$imglistxlg = 'none.png';}

if (($imglistxlg) && ($imglistxlg != 'none.png') && ($ns == 'prodshow')) {

     $this->globals('khxc.load_lightbox',1);

     $showxl   = 1;
     $xlcount  = 0;
     $xlimgtag = '';
     $zlcount  = count($imglistxlg);

     $imglistxlg  = $this->make_list($imglistxlg);

     if (count($imglistxlg) == 1) {$text = 'View Larger Image';}
     else                      {$text = 'View Larger Image Slideshow';}

     foreach ($imglistxlg as $num => $img) {

          $xlcount++;

          $xlurl  = $this->globals('khxc.url_nonssl');
          $xlurl .= '/media/' . $app . '/prodxl/' . $img;

          if ($xlcount == 1) {

               $xlimgtag .= '<p><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } else {

               $xlimgtag .= '<p class="hidden"><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } // End of if statement.

     } // End of foreach statement.

} // End of if statement.

// +--
// | Print the display.
// +--
if (($multilg) && ($usethumb)) {
    $imgtag   .= '<p>';
     foreach ($imglistlg as $num => $name) {
        $imgurl   = 'media/' . $app . '/prodlg/' . $name;
        $imgtag   .= '<img src=\'' . $imgurl . '\' onmouseover="var x=document.getElementById(\'prodImage\'); x.src=document.prodImages[' . $num . '].src;" width="' . $imgwidthth . '" alt="' . $prodname . '" />';
    } // End of foreach statement.
    $imgtag   .= '</p>';

} // End of if statement.
?>

<table id="proddetail--<?php print $id; ?>" class="khxc_cptbl_det">

<tr class="khxc_cptbl_det"><td class="khxc_cptbl_det">

<div class="center">

<?php print $imgtag; ?>

</div>

<?php 

// +--
// | Handle the extra large image tag and email a friend link.
// +--

$emailfr = $this->globals('khxc_settings.' . $app . '.emailfriend');

if ($ns != 'prodshow') {$emailfr = 0;}

if (($showxl) || ($emailfr)) {

     print '<div style="width:' . $imgwidth . 'px; margin: auto">' . $eol;

     if ($showxl) {print $xlimgtag;}

     if ($emailfr) {

          $link_emailf = $this->link_namespace($app,'emailfriend',array('ref' => $proddisp['id']));

          print '<p><a href="' . $link_emailf . '" title="Email a Friend" ';
          print 'class="khxc_hrefbutton">Email This Item to a Friend</a></p>';

     } // End of if statement.

     print '</div>' . $eol;

} // End of if statement.

?>

<p><strong><?php print $prodname; ?></strong></p>

<?php print $proddesc; ?>

<?php $this->include_file($app,'pricedisp.php'); ?>

<?php 

// +--
// | Print the product options if we can add the item to the 
// | shopping cart or wish list and we're on the prodshow
// | namespace.
// +--

$add_ok = 1;

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {$add_ok = 0;}
if ($proddisp['pricestatus'] == 'D') {$add_ok = 0;}

if (($ns == 'prodshow') && ($add_ok)) {

     print '<p class="khxc_ultablesp">&nbsp;</p>' . $eol . $eol;

     $this->include_namespace($app,'prodshowopt',array());

} // End of if statement.

?>

</td></tr>

</table>

Offline

 

#21 07-19-2007 05:57:31

davidyounger
Member
Registered: 07-19-2007
Posts: 10

Re: "display multiple images" not working (NOT lightbox)

This is probably a stupid question but were do I put this code? Am I correct in thinking this is all I need to change and I can use comma delimited images in: Home > ClickCartPro (GBU) > Catalog: Categories, Products and Options > Manage Online Store Products (Product Display Images)?

Thanks

Offline

 

#22 07-19-2007 06:03:59

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: "display multiple images" not working (NOT lightbox)

The code Howard posted is used in the various display formats which you'll find in admin under Home > ClickCartPro (GBU) > Displays: Skins, Menus, XHTML Includes and Messages > Manage Catalog Product Displays: Detail View

The multiple images support is the area you mention in the Large Product Image field for products.

Offline

 

#23 07-19-2007 07:02:28

davidyounger
Member
Registered: 07-19-2007
Posts: 10

Re: "display multiple images" not working (NOT lightbox)

I have copied and pasted the default code into: Home > ClickCartPro (GBU) > Displays: Skins, Menus, XHTML Includes and Messages > Manage Catalog Product Displays: Detail View

I have added comma seperated files to Product details. Still only see one image on the website and when I click the image. Is there anything else I have to change?

Thanks

Offline

 

#24 07-19-2007 07:55:13

GreenbarnWeb
Banned
Registered: 09-23-2003
Posts: 2743
Website

Re: "display multiple images" not working (NOT lightbox)

Hi

Make sure you have uploaded all the images to the website. If you post your URL it would help.

Offline

 

#25 07-19-2007 11:58:59

davidyounger
Member
Registered: 07-19-2007
Posts: 10

Re: "display multiple images" not working (NOT lightbox)

The images were uploaded they were just not in the correct folders. ( You need one copy in each of the relevent media folders)

Works fine no!

Thanks for all your help.

Offline

 

Board footer