Forums / Templates, Stylesheets, Page Layout / Common product images directory question

Common product images directory question

Locked

Views: 1,880

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
26 Mar 2007, 8:08 PM
#1
monkle avatar

monkle

New Zenner

Join Date:
Mar 2007
Posts:
11
Plugin Contributions:
0

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.

26 Mar 2007, 8:18 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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.

  define('DIR_WS_IMAGES', 'images/');

to:

  define('DIR_WS_IMAGES', 'htpp://some_domain/some directory/');

Zen-Venom Get Bitten

26 Mar 2007, 8:52 PM
#3
monkle avatar

monkle

New Zenner

Join Date:
Mar 2007
Posts:
11
Plugin Contributions:
0

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?

26 Mar 2007, 9:20 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

27 Mar 2007, 5:01 PM
#5
monkle avatar

monkle

New Zenner

Join Date:
Mar 2007
Posts:
11
Plugin Contributions:
0

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.

27 Mar 2007, 9:10 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

28 Mar 2007, 12:04 AM
#7
monkle avatar

monkle

New Zenner

Join Date:
Mar 2007
Posts:
11
Plugin Contributions:
0

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.