Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multiple Images in BS?


Rosyweb

Recommended Posts

Just a bit of advice needed.  I'm running version 2.3.4.1 CE .   

What is the best add on for Multiple Images to run work with BS.  I can see a few, but quite old addons and I'm not sure of the compatibility.

I don't want the images to link to product attributes, just simply to have more than one image viewable when in the product page.

many thanks

Link to comment
Share on other sites

you don't need an addon? you can add more images in admin in stock osC it's the large image option add as many as you like, or have I missed somthing?

Or you can add as many as you like just in the discription with simple html.

 

Link to comment
Share on other sites

Thanks JcMagpie.  No it was me that had missed something! 

Although on this version ( 2.3.4.1 CE . ) they don't display in the product page when there are multiple images.   

In the search results page (gallery) the main image still displays, but when you go into product,  then no images  at all display. 

I'll have to try and work out why that is, probably something to do with BS.  I'll search the forums but if anyone has come across this please do point me in the right direction.

many thanks!     

Link to comment
Share on other sites

34 minutes ago, Rosyweb said:

but when you go into product,  then no images  at all display

You should be able to tell what is happening by looking at the html beeing generated on the product info page. The main image and the large images are in different tables in the database so the html will show which is being used. If your not sure pm or post a link to the product that is not showing the multiple.

here is a product with one large image, the colorbox script hows it below the main image.

image.png.f086a3ec5fafcdf778633d21f7bbc4fa.png

You can see the html showing the photoset beeing used to show the large image and piGalImg_1 shows it is sort order 1 or first large image.

image.png.9d26b8f15cb53eea451706153d314282.png

 

Link to comment
Share on other sites

Thanks Heatherbell.  It seems the new version was released in July?   My version ( 2.3.4.1 ) was the latest till recently then is so heavily modified that a new version and re-doing all the modifications is a long project. 

So lets see if I can get this working in 2.3.4.1 for now and can look at that for the future. 

Thanks JcMagpie.    The code I'm getting - showing no images is:

<div class="col-sm-6 cm-pi-gallery">
  <div class="piGal" data-imgcount="155"></div>  <div class="clearfix"></div>
</div>

 

So the missing code should go after <div class="piGal" data-imgcount="155"> 

I'm not sure why its not generating it?  

 

Link to comment
Share on other sites

Hard to say but on a stock frozen or edge image gal you should be seeing this stock html for the single image.

<div class="col-sm-6 cm-pi-gallery">

  <div class="piGal" style="visibility: visible; width: 100%;" data-width="419.667"><a href="images/Matrox G200 MMS.jpg" class="photoset-cell highres-link cboxElement" rel="pigallery" style="float: left; display: block; line-height: 0; box-sizing: border-box;"><img src="images/Matrox G200 MMS.jpg" alt="Matrox G200 MMS test1" title="Matrox G200 MMS test1" class="img-responsive" style="width: 100%; height: auto;" width="500" height="400"></a></div>  
   </div>

 

If your using stock code for gallery

1) Make sure the header_tag colorbox is installed and turned on.

2) Check you are using the stock product info Gallery ( if required turn off , uninstall and reinstall the gallery.) Also make sure it's set to correct width and sort order.

With out seeing the page it's about as much as I can advise.

 

 

Link to comment
Share on other sites

Thanks JcMagpie.  1) Yes, 2) yes - and re-installed checked width etc. 

So when just one image is loaded for the product, this works.  When more than one it doesn't generate any code.    I get the empty

<div class="piGal" data-imgcount="155"></div>

 

So in cm_pi_gallery.php,  function execute - the else statement is working fine (when just 1 image is present) -  its the rest (when more than 1 image) that for some reason isn't generating anything. 

So it must be picking up correctly that there is more than one image - so the problem seems to lie somewhere here:

          $pi_output .= '<div class="piGal" data-imgcount="' . $photoset_layout . '">';
          while ($pi = tep_db_fetch_array($pi_query)) {
            $pi_counter++;

            if (tep_not_null($pi['htmlcontent'])) {
              $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
            }

            $pi_output .= tep_image('images/' . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '"');
          }          
          $pi_output .= '</div>';
          
          if ( !empty($pi_html) ) {
            $pi_output .= '<div hidden>' . implode('', $pi_html) . '</div>';
          }          
        }

The top line seems to be behaving correctly - as I get <div class="piGal" data-imgcount="155">  written to the code.   But then nothing else generates?    



 

Link to comment
Share on other sites

JcMagpie - I think I've found it.  Just a forward slash was missing off the image destination in the copy I've got live. 
How easy it is for one character to muck up the code! 

Thank you for your help looking at this with me and it helped me check and double check everything!!

Link to comment
Share on other sites

:thumbsup: Glad you got it sorted.

code can be fickle even missing a space can stop it working! one works the other will not?

<?php echo "hello world";

<phpecho "hello world";

The difference one space! easy mistakes to make when copying and pasting or editing, we have all done it.

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...