Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Images from an outside web site


playy

Recommended Posts

Is it possible to have my product images on a different website and still have the rest of my images as normal? (I'm using a dropshipper and want all my product images poiting to the images on their host, so I don't have to upload all of them onto mine.)

 

Im guessing that I would need to change somthing in my /includes/configure.php file, but im not sure. Can someone tell me how to do this? Thanks a lot.

Link to comment
Share on other sites

First, check with your dropshipper to make sure that it is alright with them if you use their images. Some sites block people from linking to their images.

 

Second you would have to modify the code in admin to be able to mark whether the product image is local or on the remote site for each product. You would then need to modify the image display function with an if statement to determine if the image is local or not. If it is not you would use a different image path then the local one. Hope that makes sense...didn't get much sleep last night. <_<

 

Otherwise if you just change the path in configure.php it will look to remote site all the time. You have to modify the code to ensure it puts the right path in there, other wise you will end up with a bunch of red x's all over your site.

Link to comment
Share on other sites

I just want it to look to a remote site all the site, but only for the product images, is there anyway i can look to a remote site for my products, but keep my other images local? (such as category headings, account images etc.)

Link to comment
Share on other sites

I just want it to look to a remote site all the site, but only for the product images, is there anyway i can look to a remote site for my products, but keep my other images local? (such as category headings, account images etc.)

You could place all local images in a /images/local folder or something similar. You'll have to study the code to figure out how to set up the links properly.

 

Look at the configure.php file for an example

 

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

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

 

You see how icons are in their own directory?

 

They could be in just

 

define('DIR_WS_ICONS', 'icons/'); directly in the catalog folder and not in images/

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Ok, thats a good idea. The only thing is, how do i link my product images to an outside website? Whenevern i change the setting in the config file it still puts the www.yoursite.com/ infornt of it instead, what i want is www.dropshippersite.com/blahblah. The only way i have been able to fix this is by changing the http://yoursite and https://yoursite and changing those to the dropshippers adress, but the none of the imaghes on my site works.... I hope someone will understand what i just wrote. Its hard to describe.

Link to comment
Share on other sites

You can change the image file to be out side of the catalog no problem. But it messes up in the admin side when trying to upload the images. Does not work anymore. (pictures still show up in website, no problem). It does not upload anymore.

 

Yes, I changed in both places admin/includes/configure.php and catalog/includes/configure.php

 

Did I do something wrong or do you have to do something with the mo pic part?

 

Here is what I changed

 

catalog/admin/includes/configure.php

 

There is 3 places

 

define('DIR_WS_IMAGES', 'images/'); (left it alone other wise pictures used for admin do not show up.)

 

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . '../images/');

 

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . '../images/');

 

 

Catalog/includes/configure.php

 

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

 

Images are all showing up.

 

I can even go to admin to add a new product and type in the name of jpg or gif in the mo pics part of admin and it works. it just doesn't let you upload. When you click on the product image button to upload shows only a link for image root and nothing else. I clicked on the image root to see what it does it does nothing?? I tried several times to upload a picture to see where it will go but it does nothing. So, I tried uploading an image to my new image file with ftp and added a new product in admin and typed the name of the jpg file in the section and previewed it . it worked. I would just like to be able to upload them from admin instead of having to ftp every image then go back and a product.

 

Any help would be appreciated.

 

Micky

Link to comment
Share on other sites

Right, i have gotten that far, but it doesnt work for what i doing. Let me try to explain. I don't just want my images in a different directory, I want them on a different website. I would need to change these sections of the cnfigure.php to:

 

define('DIR_WS_IMAGES', 'http://asiteotherthanmine.com/images/');

 

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . ''http://asiteotherthanmine.com/images/');

 

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . ''http://asiteotherthanmine.com/images/');

 

 

To show you better what i mean, you can take a look at my site, right click on one of the images, go to properties, and you will see what i mean. Im trying to get the image form another site, but it puts my site infront of that one. So its looking like:

 

http://www.mywebsite.com/images/http://www...site.com/images

 

Basically I want to remove the "http://www.mywebsite.com/images/" and juts have it pointing to the other site.

 

 

Check out the images at: www.getawatch.com

Link to comment
Share on other sites

is the website getawatch.com owned by you? or is it where you buy products?

one of the things that can happen with this type of scenario, is people often click on images to see the names, etc and then they will see the other site and then they may not buy from you.

Link to comment
Share on other sites

No, this is my site.

 

Whew! I finally got it working!!!

 

I changes the things that Micky said to, and it worked. Unfortunatelly that made all of the icons, corners, etc point to /catalog/ instead of /catalog/images/ like it was before. So, what I did was move all of the images into the catalog file. That fixed all of the images, but now the only problem is that I am getting the message that the catalog directory is not writeable. And Im assuming I cant make it writeable or the public will be able to acess it... Anyone have any ideas?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...