Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 images for multiple sites
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cristinalopo
Starting Member

19 Posts

Posted - January 26 2009 :  09:47:00  Show Profile  Reply with Quote
I have multiple sites and these share images and products form a common data base.

I would like to know if:

1 - there's a VPASP setting that allows me to define the image paths.

2 - transform the relative into absolute links to the database.

thanks

cayars
Starting Member

USA
49 Posts

Posted - January 26 2009 :  10:23:45  Show Profile  Visit cayars's Homepage  Reply with Quote
You can do this via IIS. Try looking up "Virtual Directory".

You can put the images on one website and then create a virtual directory on other sites pointing to the real directory.
Go to Top of Page

Steve2507
VP-CART Expert

590 Posts

Posted - January 28 2009 :  04:31:00  Show Profile  Reply with Quote
A word of advice on this.

We also have multiple sites (12 at the last count). We have some of the sites sharing the images and others where the image is held in the site folder.

You find that sites where the image is shared are slower than those which have the images in the site folder. This is okay for us as the shared sites are not traffic heavy. However we monitor it and as soon as the site begins to receive a certain amount of traffic we move the images to the actual site.

We've done this by creating a sub domain on our company domain where there isn't a website. Then in the VP files for the relevant sites we've hardcoded the domain where images are called.

lots of hassle to set up but means the heavy traffic sites aren't slowed down.


Steve
Sex toys from a UK sex shop
Go to Top of Page

cristinalopo
Starting Member

19 Posts

Posted - January 30 2009 :  10:30:42  Show Profile  Reply with Quote
Hello,

Thank you for your replies. If I give an example it may better clarify the situation.

We have a site where the products are uploaded to the vpasp database from our back end order processing system. This places the images in a relative file path:

e.g "\vpasp\images\imagedir\xxx.jpg"

The path is relative to the full domain and while a user is on that domain it can find all the images

On other sites that we are working on (using a central, shared vpasp database), we can find all the products information but our images are not found because it is looking for the relative image file url:

e.g "\vpasp\images\imagedir\xxx.jpg"

Which may or may not exist.

We can copy the entire image file directory structure over to the new website location, but this means that any updates from the backend software will not be reflected and over time images files will not be found.

Even a batch update to give the full URL path for images in the database is not viable as they will get overwritten by the back end software updates and changes.

The ideal would be for any 2nd or multi-other site to know the prefix part of the domain for image file look ups e.g:

Site 2 knows that images files are located at URL prefix :
"www.MYDOMAIN.com" and then the images filenames can remain relative.

Are there any such settings and if not how are existing multi site shops dealing with this situation?
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - January 30 2009 :  15:17:57  Show Profile  Visit devshb's Homepage  Reply with Quote
This is a bit tricky, because you also need to consider that you might be on ssl for some pages in which case the domain then changes and you also might get a "some items are not secure" message if some images point to a separate non-ssl area.

A while ago we created a "multi-directory" addon for vpasp (BYZ027), it has various template-fields you can use to turn a given image value from the database into something which has the relative path back to vpasp added to the front. It's not quite what you're after though, but it's close, I think what you're doing is a bit more tricky than it looks at first glance.

Included in BYZ127 is a separate module:
BYZ143 - Directory Path Calculator for ASP:
"I know where folder "x" is, and I know where folder "y" is, but I need to work out the relative path to get me from "x" to "y". How Can I do that?" - You can use the functions in this software to calculate that relative path for you:
http://www.bigyellowkey.com/mysoftware_product_details.asp?prdid=340&opu=n

BYZ143 was something we've found useful technically in the past for various things; it's a very specific little tool. Before we built it we looked to see if there was already someone else (generic asp, not just vpasp) who'd already created such a tool but we couldn't find one, so we created one because we needed that logic ourselves.

BYZ044 (domain tools) is also useful:
http://www.bigyellowkey.com/mysoftware_product_details.asp?prdid=213&opu=n

I don't think that any of these things on their own would fix/do exactly what you need, but I think they probably could be used in various combinations/configurations and with a bit of tweaking to achieve what you're after.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on January 30 2009 15:18:45
Go to Top of Page

cayars
Starting Member

USA
49 Posts

Posted - January 30 2009 :  16:37:32  Show Profile  Visit cayars's Homepage  Reply with Quote
I still think this is super simple. Just use virtual directories on all but the first site. It won't matter this way if it's a SSL browser or not. It won't matter if the URL starts with www.

Unlike Steve I've never seen any type of performance issues at all doing this.

Only piece of advice I'd give is to use a directory name unused by vpasp. Use vendorpics instead of images.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00