Results 1 to 10 of 32

Hybrid View

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

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

    I tried this today and can't make it work. When I impl'd it all images disappeared. I immediately restored my backup files and I can get images from my server normally just as before.

    I know I've done something wrong, but I can't see what. I agree that for those of us who are not php gurus the implementation of a mod like this will be traumatic. Too many files to change, many changes in each file, no easy way to tell if a line should be replaced or the new lines just added. The implementation instructions could be more clear as to where to make the changes and if a change replaces an existing line or is an addition.

    I use Notepad as my editor, so just giving me line numbers as a way to point to the change doesn't always come out right.

    I did look at the author's website and it appears that he is able to get images from both his local server and use linked images from another server at the same time, so if he's using the same changes he posted in the wiki I guess we're too dumb to understand.

    It's probably impossible to do, but if the author could zip up the live files needing changed from his website and let me look at them to compare to what I did, I'm sure I could make it work .. and also write sensible instructions that anyone could follow.

    The best solution tho, would be for the Zen programmers to add this into their next point release and the entire issue would completely go away.

    I promise that when I get more familiar with the Zen Programs (and PhP) I'll quit asking noob questions ..
    Last edited by mb01a; 27 Dec 2009 at 12:13 AM.

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

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

    Just a note.

    The original wiki article was posted on 4 November 2006. Since it's three years old I wonder if the changes are still valid for the current release of Zen Cart?

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

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

    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.
    www.theCableStation.com
    "If we restrict liberty to attain security we will lose them both."

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

    Default 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.
    That's what I did. I probably didn't do my "inserts" in the same places you did. Most likely that's the problem.

    Have you given any thought to sending the files you changed to me so I can look at them and then do a complete writeup of the implementation instructions?

    Quote Originally Posted by micmed View Post
    I had to change the length of the database field "products_image". I set mine to 128 characters.
    I made mine 256. (I know .. but that's what I wanted)

    Not related to this, but I found that the product name field and the product description field were also too short for my use and were being truncated. I increased the size on them too.


    Quote Originally Posted by micmed View Post
    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.
    Nice looking website! I don't ride, but I do appreciate sports cycles.

    From what I see, making external images work with Zen Cart would be a major change. It's just not set up to allow external images.

    I'm not a good PhP coder so I'm not the one to even think about it. expect that there are a lot of PhP gurus out there who could do it without much anxiety, tho ..

    Thanks for responding. I've decided that if I can't make this "linked Image" thing work I'll upload all 10000+ images to my server and use them the Zen Cart way. The only other choice I have is to find a different shopping cart where 'bandwidth' is not so much of an issue ..
    (blatant reference to post number 2 in this thread)*grin*

    Last edited by mb01a; 29 Dec 2009 at 01:49 AM.

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

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

    I found another source for micmed's code. What he's posted is apparently not quite complete.

    The code at tumblr.com/tagged/remote+images states:
    Quote Originally Posted by tumblr site
    Basically you assign the constant DIR_WS_IMAGES to a variable $imagepath.

    Then add the short method to check if the image starts with http.
    If it does up then set imagepath to blank. else use DIR_WS_IMAGES.
    You must also insert $imagepath in place of DIR_WS_IMAGES in the zen_image function calls.

    In addition to these files a number of other files need
    to be updated. All products, featured, new, cart, listing, product info and maybe others.


    Make sure to pay attention to the file product being referenced
    for example:
    $featured_product->fields['products_image']
    $new_product->fields['products_image']
    $listing->fields['products_image']

    etc.

    The shopping cart also must be updated.

    I have installed the micmed(tumblr.com) code (don't really know where it originated) on my test site and have everything working except Categories. When I click on a category, I get no products and no images for that category. I expect I have a few more files to modify.

    Clicking on 'Specials', 'New Products', 'Featured Products', and 'All Products' works fine.

    So .. I will continue looking and testing. When I have everything working ok, I'll post the results. If anyone would like to add anything to this, please do.

    mike
    ####################____
    zen-cart-v1.3.8a
    12/15/2009

  6. #6
    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!

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

  9. #9

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

    You have to change it in your phpAdmin.

    Anyway . I still have the same problem!

 

 

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