Post by codywood » Thu Sep 24, 2015 2:24 am

I want to create a virtual directory so multiple websites can share the same images. I have a dedicated server with hostgator but they will not assist claiming that this is a programming issue and not something they need to deal with. So hostgator is of no help.

Please, I've been struggling with this for months. I even tried posting jobs on freelancer sites with no help.

Previous programmers did create a virtual folder for one of the sites. I'm basically trying to tap into that same folder. I thought I could search the downloaded files, including thephp and htaccess files, and would find the name of the virtual folders they created but I've had no luck. One would think that they would have to use the shared folders name however they created the virtual folder.

I'll restate what I'm looking for. I want multiple stores to share the same images. This is done using a virtual directory. I have a dedicated hostgator server with Apache and cPanel. Can anyone help?

New member

Posts

Joined
Mon Sep 15, 2014 10:42 am

Post by IP_CAM » Thu Sep 24, 2015 12:43 pm

A shared Image Folder has absolutely nothing to do with a Virtual Folder, as you call it.
A shared image Folder exists, in real, or it could not store images. The only THING,
what could be made VIRTUAL on all this, would be a specific URL, directly be linked to
this 'real' HD-Folder, because a User would not KNOW, to wich FOLDER the Server is linked.
Like on any Server... 8)

Just about everything about images, or other Files, such as commonly used Scripts, Stylesheets,
centrally hosted on any NO COOKIE linked (usually http:// only) HTTP Domain,
preferrably within a 'common Host' - Network:

http://forum.opencart.com/viewtopic.php?f=20&t=139614
http://forum.opencart.com/viewtopic.php?f=121&t=138802
http://forum.opencart.com/viewtopic.php?f=183&t=144435
http://forum.opencart.com/viewtopic.php?f=190&t=146503
http://forum.opencart.com/viewtopic.php?f=190&t=137782

Good Luck
Ernie
openshop.li/shop/

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by markjacks » Sat Sep 26, 2015 11:17 pm

This looks like a tough job Cody, but you should be able to go through this. Good luck!

New member

Posts

Joined
Sun Nov 30, 2014 1:48 pm

Post by codywood » Wed Sep 30, 2015 11:02 am

I'm still studying this, I haven't had much time. I was wondering about word press. I have open cart and a WordPress site which is basically my corporate website.

I wanted to use the same images folder with WordPress, actually multiple WordPress sites. I would like all of the sites to be able to share the same images.

As I indicated, I'm still trying to wrap my head around what Ernie submitted below and I was wondering how it would work with WordPress.

Thanks

New member

Posts

Joined
Mon Sep 15, 2014 10:42 am

Post by IP_CAM » Wed Sep 30, 2015 1:28 pm

strictly technically, you could use the same images, linked from a COMMON Sub.
But OC creates still it's own images, out of the ORIGINAL, in it's admin-predefined Sizes, and Subs, placed in the SOURCE IMAGE Folders, because OC does not/cannot handle/shrink Images every time they are called, so, it creates Copies in every Size, pre-defined, in order to speed up loading time.

But I recall a Mod, enabling OC to display the FULL VIEW images in their DEFAULT Size, still, OC creates it's own File, in addition to it's custom title-extension, to identify the image for it's own use.

So, technically, it is NO Problem to share the IMAGE SUB-Directory with anyone else, then, modify the few lines, where IMAGES are Called, or SENT - when uploading an image by Opencart, the ONLY RULE MUST BE, to avoid WHITE-SPACE containing Title Names, line: some nice girl.jpg, or something... ;)

I made several Postings, explaining OC Image Sub-Domain Settings, so, I would just try! :)
Good Luck!
Ernie
openshop.li/shop/

PS: It works, as long as BOTH SITES are located within the same server HOME ROOT (as I call it here!),
as shown as sample below, exept, one plan's to rewrite ALL internal 'path-routed' OC+Mod Image/pic links as well ! :o

Code: Select all

// HTTP
define('HTTP_CATALOG', 'http://www.openshop.li/cart/');
define('HTTP_IMAGE', 'http://bigmax.ch/shop/image/');
// DIR
define('DIR_CONFIG', '/home/jacob/www/openshop/cart/system/config/');
define('DIR_IMAGE', '/home/jacob/www/bigmax/shop/image/');

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by codywood » Wed Oct 07, 2015 5:17 pm

I see that you spelled out the site URL so will this work with multi-store? If so, can you show me how I would list multiple sites?

Thanks Ernie, I knew so far have been very helpful. You seem to know this subject well.

New member

Posts

Joined
Mon Sep 15, 2014 10:42 am

Post by IP_CAM » Wed Oct 07, 2015 7:48 pm

After investing 2K+ hours, slowly, I'm beginning to understand the System, that's all. But I never worked with MULTISTORE, I just USE different Stores, each one for itself, I just SHARE Images, Scripts, Stylesheets, in order to speed up the Browser Pagebuilding process. And all my Test Sites are located on the same Host-Server, to allow INTERNAL SERVER PATH Routing as well , like:
home/jacob/www/whateversite/shop/.....
to make it Image/CSS/Script-Calls fully cross-domain usable.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by codywood » Fri Oct 09, 2015 9:46 am

Thanks Ernie. Does anyone know how to configure the .htaccess file for multi-store? For reference, I'm using OpenCart 2.0, and just install 2.1.0.1.

// HTTP
define('HTTP_CATALOG', 'http://www.openshop.li/cart/');
define('HTTP_IMAGE', 'http://bigmax.ch/shop/image/');
// DIR
define('DIR_CONFIG', '/home/jacob/www/openshop/cart/system/config/');
define('DIR_IMAGE', '/home/jacob/www/bigmax/shop/image/');

The code Ernie offered above may work for single websites but will not work with MULTI-STORE. Can anyone help?

New member

Posts

Joined
Mon Sep 15, 2014 10:42 am

Post by IP_CAM » Fri Oct 09, 2015 11:51 pm

But just be aware, that v.2.1.0.1 + 2 (already out!) is still MARKED, as beeing a TESTER Version.
And the config.php content lines, you published above, have nothing to do with a .htaccess file.
just to mention it!
Good Luck! :)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by codywood » Sun Oct 11, 2015 4:20 am

Can anyone help with setting up a sub domain to host images as shown above but for multi-store? Following is what Ernie provided but this will not work with multi-store:

// HTTP
define('HTTP_CATALOG', 'http://www.openshop.li/cart/');
define('HTTP_IMAGE', 'http://bigmax.ch/shop/image/');
// DIR
define('DIR_CONFIG', '/home/jacob/www/openshop/cart/system/config/');
define('DIR_IMAGE', '/home/jacob/www/bigmax/shop/image/');

New member

Posts

Joined
Mon Sep 15, 2014 10:42 am
Who is online

Users browsing this forum: No registered users and 167 guests