Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

html content in popup (Large Image)


Dnj1964

Recommended Posts

<strong><em>Product Name</em><br/><u>blah blah blah blah blah blah blah blah</u></strong>

Adding this into the large image html popup - nothing shows up.

Adding just text breaks the colorbox and only shows the text and no image.

 

Link to comment
Share on other sites

That is the way colorbox works.  You either have an image or html.  You could use <img> to show the image, though I've not tried that.  I did change the php code to utilise the html, and show in a title.

Mike

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

  • 2 weeks later...
On 3/8/2019 at 6:34 AM, Mikepo said:

That is the way colorbox works.  You either have an image or html.  You could use <img> to show the image, though I've not tried that.  I did change the php code to utilise the html, and show in a title.

Mike

That doesn't make any sense to me. Why would you add HTML only? It seems the HTML is so you can create a caption for the image. Also, if you add one with just HTML and no image it removes that image item when you save the product. If you add an image and HTML, as the first poster said, only the HTML appears. The thumbnail appears correctly on the product page, but the color box only has the HTML, which looks horrendous by the way.

image_with_html.png

Link to comment
Share on other sites

  • 7 months later...
         $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>';
//            }

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

            $pi_output .= tep_image('images/' . $pi['image'],  $irgendwas , '', '', 'id="piGalImg_' . $pi_counter . '"');


//            $pi_output .= tep_image('images/' . $pi['image'], . $pi['htmlcontent']. ' '', '','id="piGalImg_' . $pi_counter . '"');
          }          
          $pi_output .= '</div>';
          
          if ( !empty($pi_html) ) {
            $pi_output .= '<div hidden>' . implode('', $pi_html) . '</div>';
            $pi_output .= '<div>' . implode('', $pi_html) . '</div>';
          }          
        }
        else {
          $pi_output .= '<div class="piGal">';
          $pi_output .= tep_image('images/' . $product_info['products_image'], htmlspecialchars($product_info['products_name']));
          $pi_output .= '</div>';          
        }

changes in cm_pi_gallery.php

only to use htmlcontent for alt and title and avoid image collapse

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...