Results 1 to 10 of 32

Hybrid View

  1. #1
    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?

  2. #2
    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.

 

 

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