Zen Cart Logo
Forums / Basic Configuration / Can I share product image folder between 2 stores on same server?

Can I share product image folder between 2 stores on same server?

Locked

Views: 7,805

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
18 Nov 2009, 3:23 PM
#1
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Can I share product image folder between 2 stores on same server?

Ok I have two stores (wholesale and normal) I'd want them both to use one single image folder.... since they both use the same images and it would be absurd to put them twice. How can I change the other store to use images from the other folder

normal store is .com/store/

and wholesale is .com/store/wholesale/

Both run independent zen cart but I'd like them both to use store/images/ folder for product images

PLEAAASE HELP!

20 Nov 2009, 11:50 AM
#2
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

Any tips even?

20 Nov 2009, 11:56 AM
#3
jcdk avatar

jcdk

Zen Follower

Join Date:
Oct 2009
Location:
Netherlands - NB
Posts:
144
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

Feature request section?

I have no idea how to share your image directories. I guess you have to synchronize the image folders manually.

Maybe some more experienced zencart coder can help you.

22 Nov 2009, 12:20 AM
#5
tino_schlegel avatar

tino_schlegel

Totally Zenned

Join Date:
Nov 2007
Location:
Melbourne, Australia
Posts:
532
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

The path to the image folder is specified in the configure.php file. You can try to link it to the same directory for both of yout zencart installations

Change

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

to

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

if you have an image folder at the same level as your zencart folders.

Not sure of there are other dependencies. Give it a try

24 Nov 2009, 2:19 PM
#6
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

Thanks Tino I'll give it a try tomorrow.. I'll try to avoid too complicated multisite structures with this project...

25 Nov 2009, 1:04 AM
#7
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

Have you tried doing a simlink at server?

30 Nov 2009, 12:04 PM
#8
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

Ok I tried the config.. But it did not work..

Changing the admin config file led to complete disaster of all admin icons etc disappearing..

Changing the includes config did not do actually anything.. Except the admin image upload does not work afterwards at all..

Simlink seems quite confusing and hard.. Is there ANY other way?

2 Dec 2009, 9:12 AM
#9
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

If I'd set the includes/config to ../images it might work EXCEPT the admin uploader wouldn't upload the images to right dir.. Could I somehow alter the admin product image uploader to another url.. I tried to alter the admin/product.php but the file didn't make ANY sense to me... thanks!

2 Dec 2009, 11:43 AM
#10
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

Basically I'd live with it if this would apply only to additional images? So product pictures were uploaded normally but additional pictures would be fetched from the other store folder? Could it be done?

2 Dec 2009, 11:57 AM
#11
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: Can I share product image folder between 2 stores on same server?

I've tried to add this to the configure file: (/store/wholesale/includes/configure.php)

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

And substituted DIR_WS_IMAGES with DIR_WS_ADDITIONALIMAGES in the modules/additional_images.php

But it won't work.. Any idea why?