Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default image issue - force images o be daved in sub-directory of main images folder

    Zencart 1.37 (php 4)

    The issue is this, the store works perfectly, no probs there, we have image handler installed works fine

    basically the main image directory has 5000 images in it, I would prefer that any new images that are added go into the images/products/ folder, however as it is not the default setting of the dropdown box in the add products screen nobody does it, is it possible to alter this so that on the dropdown box the products subdirectory is the default selection?

    Thanks
    Last edited by nigelt74; 30 Mar 2009 at 01:24 AM. Reason: Argh can't alter subject line

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: image issue - force images o be daved in sub-directory of main images folder

    You just need to edit the appropriate file in admin: for the standard product-general product type, edit admin/includes/modules/product/collect_info.php and find this line of code (about line 449):
    Code:
      $default_directory = substr( $pInfo->products_image, 0,strpos( $pInfo->products_image, '/')+1);
    and change it to:
    Code:
       $default_directory = (zen_not_null($pInfo->products_image) ? substr( $pInfo->products_image, 0,strpos( $pInfo->products_image, '/')+1) : 'products/');
    This makes the dropdown auto-selected as the images/products/ folder for new products, but retains the original folder name for existing products.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: image issue - force images o be daved in sub-directory of main images folder

    Cheers Bunyip that works fine

 

 

Similar Threads

  1. v151 Display images of Sub-Sub category in Main page while navigating.
    By Javier Romero in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 3 May 2013, 10:02 AM
  2. Replies: 1
    Last Post: 1 May 2013, 10:20 PM
  3. v150 Attribute Images & Additional Images Replace Main Image Onclick w/ Zoom
    By rbarbour in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 1 Mar 2013, 10:46 PM
  4. Update the Sub-images Directory Issue
    By jerry9920 in forum General Questions
    Replies: 0
    Last Post: 23 May 2010, 08:27 AM
  5. Images directory - Permissions issue?
    By Krusty in forum General Questions
    Replies: 3
    Last Post: 16 Feb 2008, 12:51 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