Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Posts
    11
    Plugin Contributions
    0

    help question Common product images directory question

    Hi,

    I recently installed Zencart for the first time as the first step in making multiple web portals to sell product. When all is said and done, there will be multiple sites all selling the same products, geared towards different audiences (wholesale, retail, etc.). Our product image database is already between 2 and 3 gig, and growing every day, so I want to have one central image server for all sites to access, instead of having vast quantities of redundant image data. All servers are in-house, so there are absolutely no restrictions in what can be done, I just have to figure out the best way to handle it.

    I have been searching all the documentation I've been able to get my hands on for information on changing the default product images directory, and I have had no luck. Is this question addressed someplace already, and I'm just missing it? If so, where? If not, is this possible without touching the core code? This is a rather time sensitive issue, as we're looking at going from 0 to done inside of a month. Any input would be greatly appreciated. Thank you.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Common product images directory question

    While I have not attempted this - I believe that you can replace the relative reference for the image directory with another in the configure.php files and this should take care of it.
    Code:
      define('DIR_WS_IMAGES', 'images/');
    to:
    Code:
      define('DIR_WS_IMAGES', 'htpp://some_domain/some directory/');
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Mar 2007
    Posts
    11
    Plugin Contributions
    0

    Default Re: Common product images directory question

    I found the variable and changed it, however it still displays a broken image with a path of:

    "http://zencart.domain.com/images/http://imageserver/images" etc.

    I don't know how to force an absolute path.

    I tried putting a php file in the zencart template images directory, that simply picked up the variable passed in the $_GET and built a source path for an image tag, but it comes up with a 404 page. Not sure on that one.

    Do you know of any way to define an absolute product image path, or to make it recognize the .php file in the zencart/includes/templates/template/images directory?

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Common product images directory question

    OPPS!! -

    Try a href there -

    define('DIR_WS_IMAGES', <a href="htpp://some_domain/some directory/"</a>);

    Not sure on the syntax of using/enclosing this in the single quotes also??? Or if this will actually drop the default addition of the store url

    This is the method to attack and get correct(remember I said that i have not done this) as searching the files this reference 'DIR_WS_IMAGES' is used 321 times in the files. Match Lines found: 321

    If when you get this square you find that the admin cannot find it's, images move these to your central server also.

    Maybe a dev with more intimate knowledge of the cart code will offer some specific advice
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Mar 2007
    Posts
    11
    Plugin Contributions
    0

    Have a Drink Re: Common product images directory question

    After working this for a while, I came up with the following:

    CONFIG FILE:
    define('DIR_WS_IMAGES', 'http://webaddress/images/');

    PRODUCT IMAGE SETTINGS:
    filename.jpg

    I continued chasing this one for long after it was fixed, because I wasn't paying attention to the discrepancy between the admin console and the website itself.

    I believe it would have taken me a significantly longer period of time to find the correct value to change in the config file than it did if you hadn't pointed me in the right direction. Thank you very much.

    I would post a link to the site so you could see it and such, but we are still behind the firewall with it at this point. I will give good links as they become available.

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Common product images directory question

    Didn't this become what I first posted?? Where you posted that that you got a repeated url??
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Mar 2007
    Posts
    11
    Plugin Contributions
    0

    Default Re: Common product images directory question

    Correct.

    I still see the odd URL in the admin section, and it does not display unless the image is local.

    However, when I view it in the cart, the image displays correctly with the right source path. Sorry for the confusion on my end, and thank you again for the assistance. I am still very new to zencart.

 

 

Similar Threads

  1. Replies: 6
    Last Post: 16 Nov 2009, 02:03 PM
  2. Upload directory for product images
    By chakotay2 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Nov 2008, 08:26 AM
  3. Lots of Seemingly Unnecessary Images in the images directory tree?
    By zcnb in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Sep 2008, 04:20 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