Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Posts
    1
    Plugin Contributions
    0

    bug Large image not correct shown when there is only a small and medium image

    When there is not an image for a product in the 'large' folder, but there is an image in the 'medium' folder, the small image is shown in the popup instead of the 'medium' image.

    In `includes\modules\pages\popup_image\header_php.php` (version 2984 2006-02-07 22:00:25Z drbyte) line 53 and 56 should use "$products_image_medium" and not "DIR_WS_IMAGES . 'medium/' . $products_image_medium".

    PHP Code:
      if (!file_exists(DIR_WS_IMAGES 'large/' $products_image_large)) {
        if (!
    file_exists(DIR_WS_IMAGES 'medium/' $products_image_medium)) {
          
    $products_image_large DIR_WS_IMAGES $products_image;
        } else {
          
    $products_image_large DIR_WS_IMAGES 'medium/' $products_image_medium;
        }
      } else {
        
    $products_image_large DIR_WS_IMAGES 'large/' $products_image_large;
      } 
    PHP Code:
     if (!file_exists(DIR_WS_IMAGES 'large/' $products_image_large)) {
        if (!
    file_exists($products_image_medium)) {
          
    $products_image_large DIR_WS_IMAGES $products_image;
        } else {
          
    $products_image_large $products_image_medium;
        }
      } else {
        
    $products_image_large DIR_WS_IMAGES 'large/' $products_image_large;
      } 
    time is my only fear
    an enemy of sand

  2. #2
    Join Date
    Jan 2004
    Posts
    58,257
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: Large image not correct shown when there is only a small and medium image

    Or even better:
    Code:
      // check for a large image else use medium else use small
      if (!file_exists(DIR_WS_IMAGES . 'large/' . $products_image_large)) {
        $products_image_large = $products_image_medium;
      } else {
        $products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large;
      }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Apple Zen Support Thread
    By jettrue in forum Addon Templates
    Replies: 3036
    Last Post: 26 Mar 2013, 03:35 PM
  2. HOW-TO: Image Preparation
    By Ryk in forum Templates, Stylesheets, Page Layout
    Replies: 296
    Last Post: 3 Jul 2012, 10:10 AM
  3. Why no support on this site - Sidebox image size question - need help please
    By JLA in forum Templates, Stylesheets, Page Layout
    Replies: 30
    Last Post: 17 Aug 2006, 10:08 PM

Bookmarks

Posting Permissions

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