Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2014
    Location
    Arizona
    Posts
    9
    Plugin Contributions
    0

    Default image handling code in update_product.php

    I've been fighting with developing procedures for support personel on resizing images for zencart and then placing the images in the correct locations. I then stumbled upon image handling code already in the update_product.php file. However, the "code defines" prevent the code from ever being used. I am wondering why and is this code safe? I do not see any obvious problems from a very quick look. I believe image quality would be better by resizing down from original image to small, medium and large, IMHO! -- at cost of upload bandwidth!

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: image handling code in update_product.php

    Have you looked at the Image Handler plugin?

  3. #3
    Join Date
    Sep 2014
    Location
    Arizona
    Posts
    9
    Plugin Contributions
    0

    Default Re: image handling code in update_product.php

    Not really! Being new to the zencart community, I thought I should explore inherit functions before diving into the addon pool. I was just wondering why the code was included in the module but not used?

  4. #4
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: image handling code in update_product.php

    Quote Originally Posted by giftsaloft View Post
    I've been fighting with developing procedures for support personel on resizing images for zencart ...
    This code requires one to add the relevant defines in a new file such as "/admin/includes/extra_configures/image_handler.php"... This method would require the following on the server: ImageMagick binary files and libraries installed, PHP exec enabled (and allowed to call the ImageMagick binary), and knowledge of the installation location / path for the ImageMagick binaries.

    Here is a link to the 3rd party plugin Image Handler v4 for Zen Cart 1.5.x if you want to give it a try (it works well in my experience). Make sure to create a backup of your site and read the readme before installing or using IH4.
    Last edited by lhungil; 3 Nov 2014 at 06:11 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  5. #5
    Join Date
    Sep 2014
    Location
    Arizona
    Posts
    9
    Plugin Contributions
    0

    Default Re: image handling code in update_product.php

    Thanks for that bit of info. I knew to check for the ImageMagick binaries but I did not know to check for php exec. Not that I'm favoring ImageMagick over Image Handler v4 or GD. I was just curious and had thought about replacing the ImageMagicK code with code I thought about writing. However, I also was not keen on toying with the zencart internals at this time. Again! Thanks

  6. #6
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: image handling code in update_product.php

    As an FYI, IH4 does most if not all that you have identified wanting to do, including a user (admin) interface that once is understood a little is easy to use and to quickly apply images and to downsize photos as you are looking for. Certainly it takes away from hourly work, but it would free you up to do more withthat time. Heaven forbid some improvements get identified, if there are any possible. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 0
    Last Post: 12 Feb 2013, 03:45 PM
  2. Replies: 7
    Last Post: 4 Jan 2013, 09:21 PM
  3. Adding an Image inside PHP code?
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 9 Oct 2009, 10:56 PM
  4. Command line run of update_product.php
    By liderbug in forum General Questions
    Replies: 0
    Last Post: 12 Jul 2009, 04:19 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