Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

,text on images


zpupster

Recommended Posts

hello,

 

i use to add text to images in html box in admin section.

 

then you could not do that anymore. 

 

so i found this script :

<script type="text/javascript">
$(function() {
  $('#piGal').css({
    'visibility': 'hidden'
  });

  $('#piGal').photosetGrid({
    layout: '<?php echo $photoset_layout; ?>',
    width: '200px',
    highresLinks: true,
    rel: 'pigallery',
    onComplete: function() {
      $('#piGal').css({ 'visibility': 'visible'});

      $('#piGal a').colorbox({
        maxHeight: '90%',
        maxWidth: '90%',
		title: '<?php echo $product_info['products_name']; ?>',
        rel: 'pigallery'
      });

      $('#piGal img').each(function() {
        var imgid = $(this).attr('id').substring(9);

        if ( $('#piGalDiv_' + imgid).length ) {
          $(this).parent().colorbox({ inline: true, href: "#piGalDiv_" + imgid });
        }
      });
    }
  });
});
</script>

and that added the product name to image in colorbox, when added to product_info page

 

 

that script does not work in oscommerce 234 responsive(bootstrap).

 

How are people adding text to their images for bootstrap??

 

thanks..

Link to comment
Share on other sites

If you're talking about image captions, I have just developed an addon for this for a current project, but it relies on the work that's been done so far for Modular Product Info, which is currently in development.

 

My addon has some changes in admin/categories to input the text (in each language of the store), outputs these as a title attribute on the images, and has an amended version of the photogrid script which feeds them through to colorbox.

 

If you're comfortable with using github, you can get both the modular product info work and my addon from branches in my fork of the responsive osc repository: https://github.com/BrockleyJohn/Responsive-osCommerce

 

The whole thing is driven from the content module, so it wouldn't be easy to backport a version to bootstrap gold, but I suppose it would be possible: lift the admin side, take the content edits from the module and build the script changes into a header tags module instead.

 

This is the sort of thing it does:

 

post-220375-0-16155800-1432148146_thumb.jpg

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Text as in alt tag (the text that appears when you hover over the image)?

 

That should only happen in Internet Explorer (and similar) browsers. The "alt" text should not be displayed when you hover over the image, but IE will do that (wrongly!) if there is no "title" text. All browsers display "title" text when hovered over. "alt" is only supposed to be displayed if the image is not displayed for some reason.

Link to comment
Share on other sites

  • 1 month later...
  • 7 months later...

I'm using the bs-version but I also experience the same problem: 

 

If the condition in product_info.php:

 

          if (tep_not_null($pi['htmlcontent'])) {
            $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
          }
 
is fulfilled (that means, that $pi['htmlcontent'] is not empty and that there is a description), the image is not shown.
 
In short words: If there is a description of a image, it is not shown, otherwise it is.  
 
Is there a solution besides commenting the snippet?
 
best 
 
cupidare
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...