Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need to display correct alt text for additional images on product info page

    Quote Originally Posted by GillS View Post
    Thankyou Phil - even "Justicia carnea_a.jpg" would do, perhaps you could point me in the right direction for doing this? I'd like it to be more obvious to the prospective customer to see that there are different varieties of the same plant, in most cases different flowers colours. I think this is more important to them, than it is to me. Just a thought - on our home page the featured plants (products) at the bottom have the correct alt text, that's what put me in mind for doing the same on the prod info page.
    you could just use the filename and use string replace to remove the .jpg ?

    but as schoolboy has pointed out, additinal images are intended as additional views of the same item generally, but I guess if you are selling different variations using attributes that could work too. I am assuming this is what you are trying to do? trying to match the image to an attribute option?

    if so, it would probbaly be better to as well as using alt text maybe output some text under the image aswell.

    so for your alt you probably want to do something like:

    PHP Code:
    $products_name str_replace(".jpg","",$file);

    $script_link '<script language="javascript" type="text/javascript"><!--' "\n" 'document.write(\'' . ($flag_display_large '<a href="javascript:popupWindow(\\\'' str_replace($products_image_largeurlencode(addslashes($products_image_large)), $large_link) . '\\\')">' $thumb_slashes '<br />' TEXT_CLICK_TO_ENLARGE '<br />' $products_name '</a>' $thumb_slashes) . '\');' "\n" '//--></script>';

        
    $noscript_link '<noscript>' . ($flag_display_large '<a href="' zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL'pID=' $_GET['products_id'] . '&pic=' $i '&products_image_large_additional=' $products_image_large) . '" target="_blank">' $thumb_regular '<br /><span class="imgLinkAdditional">' TEXT_CLICK_TO_ENLARGE '</span><br />' $products_name '</a>' $thumb_regular ) . '</noscript>'
    not tested.. backup before you try this..
    Phil Rogers
    A problem shared is a problem solved.

  2. #2
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need to display correct alt text for additional images on product info page

    alternativly, never used it before but pretty sure you can assign images to attributes and display them? maybe someone else that has done that before can advise you on that one..
    Phil Rogers
    A problem shared is a problem solved.

  3. #3
    Join Date
    Jan 2009
    Location
    Ipswich, Suffolk UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: Need to display correct alt text for additional images on product info page

    As per my reply to schoolboy, I'm using the additional images to display different plants/products rather then attributes of one product. These plants are separate entities, just biologically related.

    I'll try the code - in which file and where do I put the code? I will back up first!

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Need to display correct alt text for additional images on product info page

    I don't think the "alt" tag is populated within attribute image swatches - so it is not a viable alternative.

    I still think the best way to go is a cross-sell module. Mainly because it is good for business. You can showcase related products against each other and either up-sell the customer, or point them to the second / third / fourth variant.

    As Cross-sell uses product data, it will create an appropriate ALT tag for its image.
    20 years a Zencart User

  5. #5
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need to display correct alt text for additional images on product info page

    swguy stuff is the way forward, I use a few I the mods he does and they are the bees knees!

    I also use better together in connection with multi cross sell, so it allows me to cross sell in more than one way.
    Phil Rogers
    A problem shared is a problem solved.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Need to display correct alt text for additional images on product info page

    If your additional images are not referring to other actual products you sell, but are relevant as alternatives or whatever to the current product, you could use Additional Image Titles from Plugins to assign titles to each additional image. This is not related to alt tags; it gives text output above or below each additional image as desired.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 3 Sep 2013, 10:19 PM
  2. Alt text for product images
    By Kyra in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Feb 2011, 01:44 AM
  3. Error in product info display additional images
    By ilmarchez in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 17 Dec 2010, 12:49 AM
  4. Different product info display page for each category
    By pjb923 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Sep 2008, 07:33 AM
  5. How to remove alt tag of additional image in product info page
    By opelben in forum Basic Configuration
    Replies: 1
    Last Post: 11 May 2006, 06:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg