Results 1 to 10 of 304

Threaded View

  1. #11
    Join Date
    Jul 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: HOW-TO: Image Preparation

    Crestien.

    Liked your addition to upload.php suggested in #195 (page 20) but have made a couple of changes:

    First, I replaced the /your/path/to/shop/ or whatever with the ZenCart constant DIR_FS_CATALOG_IMAGES

    Second, some image editors insist on using .JPG as an extension, which causes problems with the medium & large images (which you give a .jpg extension). The code substr($file['name'], -4) simply replicates the original extension.

    Code:
    $larLoc = DIR_FS_CATALOG_IMAGES . 'large/' . substr($file['name'], 0, -4).'_LRG' . substr($file['name'], -4);
    
    $medLoc = DIR_FS_CATALOG_IMAGES . 'medium/' . substr($file['name'], 0, -4).'_MED' . substr($file['name'], -4);
    Thanks.
    Last edited by pannerrammer; 4 Aug 2008 at 02:26 PM. Reason: forgot to quote the post #

 

 

Similar Threads

  1. 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
  2. v150 How do I swap main product image with an attribute image?
    By bazza_87 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 May 2012, 08:30 AM
  3. how to modify the image SRC for image-handler images?
    By jason1116 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 2 Sep 2009, 01:00 PM
  4. Preparation advice for upgrade v1.3.7.1 to 1.3.8a
    By Computer Candy in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 19 Feb 2008, 11:07 PM
  5. Replies: 2
    Last Post: 21 Dec 2007, 09:59 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR