Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Plugin Contributions
    0

    image problem linking to external images, outside of 'images/'

    I am having a small problem. I was able to link to external images (commercially hosted), by putting the URL in the products table in the product_image field. Then by editing the '$src' variable in the 'zen_image' function, (use the developer toolkit to find it, then use the php function str_replace() to strip DIR_WS_IMAGES from the $src variable), I can get the product pictures to show in all places but the main product page (inside of <!--bof Main Product Image -->). What I'm wondering is why the developer's use javascript to serve the php code that puts the product photo on the product detail page?

    btw the popup works and shows the picture as well. Also, the <img> tag is formatted properly and should work since the src attribute is the correct one in the final HTML output.

    I'm assuming it's a load order issue.

    Any suggestions.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

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

    My suggestion is one of web ettique...it is not normally nice and in some cases allowed to steal another websites bandwidth serving images to your site. Consider, if you have your site setup this way and they configure to dis-allow linking...BAM your site is compromised. JMO
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Dec 2006
    Posts
    3
    Plugin Contributions
    0

    image problem Re: linking to external images, outside of 'images/'

    i'm sorry, maybe I wasn't completely clear. THE IMAGES ARE COMMERCIALLY HOSTED! As I mentioned in my original post. This means I have PAID for them to be hosted REMOTELY. Also please notice that I mention the picture SHOWS UP everywhere else but the main product page. (if it were a hotlink protection issue, none of the pics would be showing) Sorry for confusing you.

    Anyone else???

    btw, a lesson in web ettiquette, it is customary to READ THE ENTIRE POST, twice if neccessary for clarity. (I mean you basically accuse me of theft, even though my post says otherwise ... uncouth to say the least.)

  4. #4
    Join Date
    Dec 2006
    Posts
    3
    Plugin Contributions
    0

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

    Should haveknown it would be something simple!!!!! The URL's involved are so long, I hadn't noticed that Zen appends things to the product_image field. (For me the appended text is _MED. I've seen this mentioned in a few places in the forum as well.) Should be simple to fix.

    Fixed. Same fix as above. Thanks anyway.
    Last edited by emphatic; 29 Dec 2006 at 06:13 PM.

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

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

    emphatic,
    btw, a lesson in web ettiquette, it is customary to READ THE ENTIRE POST, twice if neccessary for clarity. (I mean you basically accuse me of theft, even though my post says otherwise ... uncouth to say the least.)
    Sorry that you took this personally, I was referring to "bandwidth" and this is done, and probably too much.
    I was able to link to external images (commercially hosted)
    Reading 50 times would not have altered my post as you only state "commercialy hosted", and this can refer to any images that are on the web as I consider all my sites to be commercially hosted as are the images. I know now, that you knew what you meant and hope that you can see that this is not fully clear by what you stated.
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jun 2009
    Posts
    5
    Plugin Contributions
    0

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

    CAn someone explain exactly how this is done and where to make the changes? I have the same need -external images.

  7. #7
    Join Date
    Jun 2009
    Posts
    1
    Plugin Contributions
    0

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

    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
    Last edited by webejant; 2 Jul 2009 at 03:38 PM. Reason: Forgot to paste the info

  8. #8
    Join Date
    Dec 2009
    Posts
    5
    Plugin Contributions
    0

    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 didn't want to quote the entire post, since I might chew up some extra bandwidth. I'm using Zen Cart 1.3.8a and also need to use external images.

    The product images I need to use are located on a separate server and although I am allowed to use them, I must link to them - not copy them to my server. Rules are rules .. I just do whatever comes next.

    So, if anyone has solved this issue or knows that the changes indicated in webejant's post will work ok with Zen Cart could you please let us know?

    Thanks.
    Mike

  9. #9
    Join Date
    Mar 2008
    Location
    The Free South
    Posts
    175
    Plugin Contributions
    0

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

    Welcome!

    I was successful using this method:

    http://www.zen-cart.com/wiki/index.php/Contribution:Web_images

    I however need to be able to display multiple images on the product page.

    Here is the thread that I describe it in:

    http://www.zen-cart.com/forum/showth...361#post821361
    www.theCableStation.com
    "If we restrict liberty to attain security we will lose them both."

  10. #10
    Join Date
    Jun 2009
    Posts
    63
    Plugin Contributions
    0

    help question Re: linking to external images, outside of 'images/'

    Do you know if this will work if i load my product using easy populate?

    Thanks lexxie

 

 
Page 1 of 4 123 ... 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