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
    66,443
    Plugin Contributions
    279

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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. v151 How would I change default image from the small to the medium or large
    By l0st1 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 25 Apr 2014, 03:11 AM
  2. v151 Zen image preparation 3 (small, medium, large) images folder?
    By gsmsalers in forum General Questions
    Replies: 4
    Last Post: 4 Oct 2013, 05:01 PM
  3. Larer image popup is medium image not large image
    By xtracool in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 13 Mar 2009, 10:21 AM
  4. Why zencart does not choose medium and large image?
    By mahu in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Oct 2008, 10:33 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