Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2014
    Location
    New Orleans LA
    Posts
    26
    Plugin Contributions
    0

    image problem zen_image() and online documentation

    Having read this article on image handling in the ZC docs http://www.zen-cart.com/content.php?...-squished-help I had edited my widths in Images admin to zero

    However on looking at /includes/functions/html_output.php in zen_image() I see

    Code:
     // use old method on template images
        if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0') {
          return zen_image_OLD($src, $alt, $width, $height, $parameters);
        }
    And then in function zen_image_OLD() I see

    Code:
    if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
    Now the database value 0 with not cause PHP's empty() to return true.

    When I re-edited my widths in the admin and saved empty values the layout works as intended.

    I'd love an explanation for why the docs are like that.

    Thanks.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: zen_image() and online documentation

    Have you some URLs to a few of the Products that do not have the images sizing correctly?

    What settings are you using on Configuration ... Images ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Adding Downloadable Spec and Documentation to Product
    By truevision.co.za in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Feb 2010, 12:46 PM
  2. Mod and add-on documentation request
    By Wolfmont in forum Contribution-Writing Guidelines
    Replies: 13
    Last Post: 31 Jan 2010, 08:58 AM
  3. ALT and TITLE with zen_image code
    By Website Rob in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 15 Jul 2009, 04:28 AM
  4. Documentation for creating Mods and Contributions?
    By gluckfs in forum Contribution-Writing Guidelines
    Replies: 5
    Last Post: 16 Feb 2008, 01:22 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR