Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32
  1. #21
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: linking to external images, outside of 'images/'

    That's the base /images/ folder, directly in your store's folder.
    Using a folder named /LRG/ to hold product images is probably not the best idea, as "large" images are to be placed in the /images/large/ folder as versions of the "small" basic images in the /images/ folder. If you want a set of images that are specifically for off-site use, name the folder /froogle/ or something. If the images are the large versions of your regular product images, they should be in the /images/large/ folder and named with the _LRG suffix (like myimage_LRG.jpg, where the base image is myimage.jpg).
    You might want to read up on image use in the tutorials before you do something that will cause grief down the road.

  2. #22

    Default Re: linking to external images, outside of 'images/'

    Quote Originally Posted by webejant View Post
    Hello,

    I just migrated here from OsCommerce where I linked to external images for my products through a contribution I found and it worked perfectly. I am now using Zen Cart and have not figured out how to do it with Zen Cart. I found this post, but, as a "newbie" to Zen, I needed simple copy and paste instructions, so, this post did not help as of yet. The following is what I did in OsCommerce, and yes, I am aware that Zen and OsC are different, but, will something similiar work? And if so, can someone give me a simple copy and paste to make it work? And yes, I have permission from my online supplier to link to their image server, so, no etiquette is compromised.



    1.) Open catalog/includes/configure.php



    add the following line of code to the end of the file before the last ?>

    define('DIR_EXT_HTTP', 'http://');



    2.) Open catalog/product_info.php



    find the following line

    DIR_WS_IMAGES



    and replace it with:

    DIR_EXT_HTTP



    3.) Open catalog/includes/modules/new_products.php



    find the following line

    DIR_WS_IMAGES



    and replace it with:

    DIR_EXT_HTTP



    4.) Open catalog/includes/modules/product_listing.php



    find the following line

    $lc_text = '&nbsp;<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>&nbsp;';



    and replace with

    $lc_text = '&nbsp;<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_EXT_HTTP . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>&nbsp;';





    5.) Open catalog/includes/boxes/whats_new.php



    find the following line

    DIR_WS_IMAGES



    and replace it with:

    DIR_EXT_HTTP



    6.) Open catalog/includes/boxes/specials.php



    find the following line

    DIR_WS_IMAGES



    and replace it with:

    DIR_EXT_HTTP



    7.) Open catalog/includes/boxes/best_sellers.php



    find the following line

    DIR_WS_IMAGES



    and replace it with:

    DIR_EXT_HTTP



    8.) Open catalog/popup_image.php



    find the following line

    DIR_WS_IMAGES



    and replace it with:

    DIR_EXT_HTTP



    9.) Open catalog/shopping_cart.php



    find the following line

    DIR_WS_IMAGES



    and replace it with:

    DIR_EXT_HTTP



    It is best to follow the above replacements for all boxes files used on your site.


    Thanks in advance,
    WeBeJanT
    Hi ,

    I did that but doesn 't work . Because if you change the DIR_EXT_HTTP . It keeps looking on your internal server...
    Any other solution?

  3. #23
    Join Date
    Mar 2010
    Posts
    3
    Plugin Contributions
    0

    database error Re: linking to external images, outside of 'images/'

    Quote Originally Posted by micmed View Post
    I got this to work. Wherever there was a line number referenced I looked to see if there was similar code. If there was, then I replaced it with the code from the contribution. If there wasn't similar code then I inserted it at or near the code line that was referenced. Be sure to include comments and test after each change.

    I had to change the length of the database field "products_image". I set mine to 128 characters.

    My question now is how do I now get multiple images to display in the product page? For starters, I have created new database fields called "products_image02", "products_image03" etc. Using EP I have uploaded the URL's of the additional images and I can see them in the database fields. I do not know how to call them from the database to display in product page.

    Here is the site: http://www.micmed.com/simpsoncycles/

    The image names come from another application, so using common basename+ consecutive numbers will not be practical. The images HAVE to served from another location. There are hundreds of items that will be uploaded each week. There are 10 image field URL's that will be uploaded for each item via EP.
    The main page images are local. The additional images on the product page are in the HTML, but my client does not want to have to insert them into the HTML product description.

    I had an email exchange with the author. They were just experimenting with this about 4 years ago and has since moved away from PHP programming.
    I have changed the code but I cannot find the spot to change the database to take longer entries (I need my picture URL to be 128 characters). Could someone please help me?

  4. #24

    Default Re: linking to external images, outside of 'images/'

    You have to change it in your phpAdmin.

    Anyway . I still have the same problem!

  5. #25
    Join Date
    Nov 2010
    Posts
    16
    Plugin Contributions
    0

    red flag Re: linking to external images, outside of 'images/'

    How do we link external images to remote server? Do you have code that works? If you do could you please let me know the code? Preferably copy and paste or zip it if you can. I’m new to Zen Cart (php). Looks like many people have the same problem. Also, I’m authorized to use my supplier images. Thanks!

  6. #26
    Join Date
    Feb 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: linking to external images, outside of 'images/'

    Hello!

    All the pictures on my website is liked to the supplier (http://www.supplier.com/imagens/photo.jpg). But when i go online i am not able to see the pictures unless i do a right click on the picture and choose to "view image". If i do that for one all the rest will show too.

    I tested on IE, FF and Safari and happen the samething.

    I changed the DIR_WS_IMAGES path

    Do you have any idea what can i do?

    Thank you in advance.

  7. #27
    Join Date
    Dec 2010
    Posts
    25
    Plugin Contributions
    0

    Default Re: linking to external images, outside of 'images/'

    Quote Originally Posted by savchenko01 View Post
    How do we link external images to remote server? Do you have code that works? If you do could you please let me know the code? Preferably copy and paste or zip it if you can. I’m new to Zen Cart (php). Looks like many people have the same problem. Also, I’m authorized to use my supplier images. Thanks!
    Linking to external distributor websites is very common. It is NOT hot linking contrary to what some may think. Web services , eg. XML via PHP SOAP is required by some distributors. Some may not realize the fact that when you use PayPal for example, you are using SOAP to access their database.

    Almost all distributors use the same manufacture images. Distributors WANT you to link to their websites for the most up to date data INCLUDING Images.

    Zen Cart Moderators need to understand that this is a LEGITIMATE and SMART way of doing business.

    Sorry, Done ranting now.

    I suggest: The first thing that needs to be done is to backup your database. Second, Patch the database Image field to accept more length.

    Insert this code into: Admin CP> Tools> Install SQL Patches.

    ALTER TABLE `products` CHANGE `products_image` `products_image` VARCHAR( 150 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;


    The rest is simply a matter of cutting and pasting code from the WIKI contribution. Search using Developer Tool Kit for all PHP Modules and Templates. Find: DIR_WS_IMAGES and replace with: DIR_EXT_HTTP. There may be 20 or more files that need to be changed.

    BTY there is a free Zen cart Module Contribution that will install exactly what you need. pro-webs.net
    Last edited by Sigp220; 23 May 2011 at 10:11 PM.

  8. #28
    Join Date
    Jul 2011
    Posts
    27
    Plugin Contributions
    0

    Default Re: linking to external images, outside of 'images/'

    Hi

    I know this is a bit of a old thread but I had problems with the New zen and this and found only altering one file

    html_output.php and added this to line 170

    // use old method on template images by rl: test for http
    if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0' or strstr($src, 'http') != '0' ) {
    return zen_image_OLD($src, $alt, $width, $height, $parameters);
    }

    Worked fine on all pages as it was not working on every one before.

  9. #29
    Join Date
    Feb 2011
    Location
    Hong Kong
    Posts
    29
    Plugin Contributions
    1

    Default Re: linking to external images, outside of 'images/'

    I checked on the following link in ehow:
    http://www.ehow.com/how_8759326_modi...al-images.html

    The explanation is pretty straightforward. Basically: replace every occasion of DIR_WS_IMAGES by DIR_EXT_HTTP.

    If your local images have the full URL then they are found as well.

    I want to use a subdomain (http://images.jewels-n-pearls.com).

    Please correct me when I'm wrong: in that case using:
    define('DIR_EXT_HTTP', 'http://images.jewels-n-pearls.com/'); would work?

  10. #30
    Join Date
    Apr 2011
    Location
    Colonial Beach Virginia
    Posts
    10
    Plugin Contributions
    0

    Default Re: linking to external images, outside of 'images/'

    I have had to piece this together from several posts so for the benefit of those searching, here it is in full. This method is assuming a fresh install. Works like a charm. (Video Tutorial on you-tube. Search external images Zen Cart) Do not use this method on a secure installation as you will get errors from the images.

    Step 1
    Find: DIR_WS_IMAGES and replace with: DIR_EXT_HTTP in every file of your zencart distribution and any template.
    Now upload and run your install

    Step 2
    Line 29 on /includes/configure.php reads
    define('DIR_EXT_HTTP', 'images/');
    Change this to:
    define('DIR_EXT_HTTP', '');
    Note the page here doesn't show well so just remove images/ only from that line leaving ' ' intact.

    Step 3
    Open /includes/functions/html_output.php and replace what is there (and looks a lot like this) with this new code probably found at line 166-170

    // use old method on template images by rl: test for http if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0' or strstr($src, 'http') != '0' ) { return zen_image_OLD($src, $alt, $width, $height, $parameters); }

    Step 4
    Insert the following code into: Admin CP> Tools> Install SQL Patches.

    ALTER TABLE `products` CHANGE `products_image` `products_image` VARCHAR( 150 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;

    Your zen Cart will now display external images. I have used this method to load thousands of products with hotlinked images since that is the only way the supplier will have it.

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v152 external product images
    By chattunnel in forum Customization from the Admin
    Replies: 17
    Last Post: 10 Apr 2018, 07:53 AM
  2. Using external images
    By IAINMCG in forum General Questions
    Replies: 13
    Last Post: 16 Jan 2013, 09:03 PM
  3. External Images
    By yourguide in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Aug 2011, 02:14 PM
  4. Help with External Images
    By kclovis in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 12 Jun 2009, 07:33 PM
  5. linking images
    By first trading in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Sep 2008, 12:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg