Results 1 to 8 of 8
  1. #1
    Action Jackson - King of the World
    Join Date
    January 18th, 2005
    Posts
    2,201
    Easy Populate
    Anyone ever used it to add feeds? I tried tonight and finally succeeded getting the product links to ork (had to remove the http://) but no luck on the images. Trying to use it with Creloadedwhich is an extension of OsCommerce.

  2. #2
    http and a telephoto
    Join Date
    January 18th, 2005
    Location
    NYC
    Posts
    17,708
    **sigh** look at the readme jack, lol. No I didn't write it, but I helped a little... The image problem was my panacea a couple years ago...

    Images won't work, they can't be called from offsite without an additional function being written for image calls. I almost had it written for me a couple years ago, but decided against it at the time. If you search the creloaded forums you will find posts by "merlin" asking for programmers or advice, or at the oscommerce forums loxly looking. I might be able to dig up my pm from the programmers that were willing to write the image code, but they were a bit expensive.
    Deborah Carney
    TeamLoxly.com BookGoodies.com ABCsPlus.com

  3. #3
    Full Member
    Join Date
    September 10th, 2005
    Posts
    369
    I asked this question in the Creloaded forum. I was referred to this thread. You will have to edit a number of files. Not a big deal, just time consuming. Another option which I did was to use the description and use the hotlink image there. I also added a "add to cart" button in the desc. That button and the image I made link to the merchants site using my aff link. I also made the add to cart in Crealoaded 1 pixel. If you use a few formulas and the goto feature in Excel it's not that difficult to make the Easy Populate feed. Of course, this leaves the products on pages like a category without images. You could use a generic image.

  4. #4
    Full Member
    Join Date
    September 10th, 2005
    Posts
    369
    Well, I should have checked the link to the zip d/l. Doesn't work anymore. It was just a text file. Be sure to check the Crealoaded thread for a few updates. Below is everything from that file:

    External Image URL Links V1.1

    I take no major credit for this as I only put together many different peices of information that that was posted on the forums. A big thanks to Zip1 as most of the information was from him. I simply am putting it all together so everyone will know how to do it.

    What this does - This contrib allow you to have external links for your images. With this you should be able to use a link off any other site(with there permission of course) and still use your own links on your webserver. You will also still be able to use the easypopulate froogle download feature. This contrib is easy to do but is very time consuming as there are quite a few different files to modify.

    Why did I do this? - Simple alot of people have asked for this but there has never been a real solution to it for some reason. I myself use many different distributors and it was very time consuming to upload each and every product image.

    For forum support please visit the following link http://www.creloaded.com/Forums/viewtopic/t=9004.html

    Before using this please backup all files that are going to be affected. Also read this entire document before making any changes. I take no responsability for any problems. As with any other contrib this is a use at your own risk.


    Files that need to be modified...

    catalog/popup_image.php
    catalog/includes/configure.php
    catalog/includes/functions/html_output.php
    catalog/includes/modules/additional_images.php
    catalog/includes/modules/default_specials.php
    catalog/includes/modules/featured.php
    catalog/includes/modules/featured_products.php
    catalog/includes/modules/new_products.php
    catalog/includes/modules/product_listing.php
    catalog/includes/modules/product_listing_col.php
    catalog/includes/modules/xsell_products_buynow.php
    Catalog/includes/modules/mainpage_modules/default_specials.php
    Catalog/includes/modules/mainpage_modules/featured.php
    Catalog/includes/modules/mainpage_modules/new_products.php
    catalog/templates/content/product_info.tpl.php
    catalog/templates/content/product_reviews.tpl.php
    catalog/templates/content/product_reviews_info.tpl.php
    catalog/templates/content/product_reviews_write.tpl.php
    catalog/templates/content/products_new.php
    catalog/templates/content/reviews.php
    catalog/templates/content/shopping_cart.php
    catalog/templates/content/specials.php
    catalog/templates/content/wishlist.php
    catalog/templates/YOUR TEMPLATE/boxes/featured.php
    catalog/templates/YOUR TEMPLATE/boxes/reviews.php
    catalog/templates/YOUR TEMPLATE/boxes/specials.php
    catalog/templates/YOUR TEMPLATE/boxes/whats_new.php
    catalog/templates/YOUR TEMPLATE/boxes/wishlist.php
    catalog/templates/YOUR TEMPLATE/mainpage_modules/default_specials.php
    catalog/templates/YOUR TEMPLATE/mainpage_modules/featured.php
    catalog/templates/YOUR TEMPLATE/mainpage_modules/new_products.php
    catalog/admin/specials.php
    catalog/admin/reviews.php
    catalog/admin/featured.php
    catalog/admin/categories.php - This file has the most edits to do
    catalog/admin/includes/functions/html_output.php
    catalog/admin/epconfigure.php

    In each of these files you will be changing the same coding. Just open the files in word or notepad and use the "Find" feature.

    1.) Open you catalog/includes/functions/html_output.php file and look for the following code...


    ////
    // The HTML image wrapper function
    function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
    if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

    return false;
    }

    // alt is added to the img tag even if it is null to prevent browsers from outputting
    // the image filename as default
    $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) {
    $image .= ' title=" ' . tep_output_string($alt) . ' "';
    }

    if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
    if ($image_size = @getimagesize($src)) {
    if (empty($width) && tep_not_null($height)) {
    $ratio = $height / $image_size[1];
    $width = $image_size[0] * $ratio;
    } elseif (tep_not_null($width) && empty($height)) {
    $ratio = $width / $image_size[0];
    $height = $image_size[1] * $ratio;
    } elseif (empty($width) && empty($height)) {
    $width = $image_size[0];
    $height = $image_size[1];
    }
    } elseif (IMAGE_REQUIRED == 'false') {
    return false;
    }
    }

    if (tep_not_null($width) && tep_not_null($height)) {
    $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
    }

    if (tep_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= '>';

    return $image;
    }


    add the following code after the above code...

    ////
    // The HTML image wrapper function for external images
    function tep_item_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
    if ( (empty($src) || ($src == DIR_WS_ITEM_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

    return false;
    }

    // alt is added to the img tag even if it is null to prevent browsers from outputting
    // the image filename as default
    $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) {
    $image .= ' title=" ' . tep_output_string($alt) . ' "';
    }

    if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
    if ($image_size = @getimagesize($src)) {
    if (empty($width) && tep_not_null($height)) {
    $ratio = $height / $image_size[1];
    $width = $image_size[0] * $ratio;
    } elseif (tep_not_null($width) && empty($height)) {
    $ratio = $width / $image_size[0];
    $height = $image_size[1] * $ratio;
    } elseif (empty($width) && empty($height)) {
    $width = $image_size[0];
    $height = $image_size[1];
    }
    } elseif (IMAGE_REQUIRED == 'false') {
    return false;
    }
    }

    if (tep_not_null($width) && tep_not_null($height)) {
    $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
    }

    if (tep_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= '>';

    return $image;
    }

    Save and close this file

    2.) Open you catalog/admin/includes/functions/html_output.php file and look for the following...

    ////
    // The HTML image wrapper function
    function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {
    $image = '<img src="' . $src . '" border="0" alt="' . $alt . '"';
    if ($alt) {
    $image .= ' title=" ' . $alt . ' "';
    }
    if ($width) {
    $image .= ' width="' . $width . '"';
    }
    if ($height) {
    $image .= ' height="' . $height . '"';
    }
    if ($params) {
    $image .= ' ' . $params;
    }
    $image .= '>';

    return $image;
    }


    add the following code after the above code...

    ////
    // The HTML image wrapper function for external images
    function tep_item_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
    if ( (empty($src) || ($src == DIR_WS_ITEM_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

    return false;
    }

    // alt is added to the img tag even if it is null to prevent browsers from outputting
    // the image filename as default
    $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) {
    $image .= ' title=" ' . tep_output_string($alt) . ' "';
    }

    if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
    if ($image_size = @getimagesize($src)) {
    if (empty($width) && tep_not_null($height)) {
    $ratio = $height / $image_size[1];
    $width = $image_size[0] * $ratio;
    } elseif (tep_not_null($width) && empty($height)) {
    $ratio = $width / $image_size[0];
    $height = $image_size[1] * $ratio;
    } elseif (empty($width) && empty($height)) {
    $width = $image_size[0];
    $height = $image_size[1];
    }
    } elseif (IMAGE_REQUIRED == 'false') {
    return false;
    }
    }

    if (tep_not_null($width) && tep_not_null($height)) {
    $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
    }

    if (tep_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= '>';

    return $image;
    }

    Save and close this file.

    3.) Open catalog/includes/configure.php and find the following...

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

    add the following code right after the above code...

    define('DIR_WS_ITEM_IMAGES', '');


    Save and close this file

    4.) Open catalog/admin/includes/configure.php and find the following...

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

    add the following code right after the above code...

    define('DIR_WS_ITEM_IMAGES', '');


    Save and close this file

    5.) Now comes the long boring time. You need to open each of the above files excluding the one you just edited and the admin/specials.php, admin/featured.php & admin/reviews.php and look for the following peices of code...

    tep_image and DIR_WS_IMAGES


    and replace them with the following code...

    tep_item_image and DIR_WS_ITEM_IMAGES


    6.)In the above 3 files (specials.php, reviews.php & featured.php) you will need to look for alittle different coding. You will need to find the follwoing code...

    tep_info_image

    and replace them with the following code...

    tep_item_image


    6a.)Then in reviews.php and featured.php look for the following code...

    DIR_WS_CATALOG_IMAGES . DIR_WS_IMAGES


    and replace them with the following code...

    DIR_WS_ITEM_IMAGES



    Now the thing is you DO NOT want to change every peice of code you see. You will have to look at the coding around it to see if it has to do with a product image or some other type of image. They are pretty easy to spot as most of the time you will see something that says product..., if you see something saying button or categorie then DO NOT change them. Now the one file that will look alittle different is the admin/categories.php file. The reason for this is it will have the tep_image code but will also have the DIR_WS_CATALOG_IMAGES code after it. This is the only file I noticed that was different in this way (Don't worry you will know that it is for the image code as it has mostly to do with all the extra images that can be added). All you need to do for this bit of code is the following...

    Change...

    DIR_WS_CATALOG_IMAGES

    to

    DIR_WS_ITEM_IMAGES


    You will also need to look for the following....

    $contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);

    add change it to the following...

    $contents[] = array('text' => '<br>' . tep_item_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);


    If you do not do the last step you will not see the image in the category listing on the admin side.


    7.)The next peice of coding is to allow the correct image link to be show in the easypopulate froogle download file.

    Look for the following in catalog/admin/epconfigure.php

    // **** Froogle product image path ****
    // Set this to the path to your images directory
    global $froogle_image_path;
    $froogle_image_path = HTTP_SERVER . DIR_WS_CATALOG . "images/";

    and change to...

    // **** Froogle product image path ****
    // Set this to the path to your images directory
    global $froogle_image_path;
    $froogle_image_path = DIR_WS_ITEM_IMAGES . "";




    After your all done upload the files back to your server and edit your products.The big downfall to this is that you will have to go into each products and edit the image link now because it is wriiten in the database as /images/1234/1234.jpg now. All you have to do is add the rest of the URL to it. Be sure you put the full url including the http:// or your images will not show up.

    Good luck and remember again to backup before you start to play.

  5. #5
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    I did this for a client a few months back and there were a few files that needed to be changed. I can't recall all of them, but one key file is in the /templates/content folder and it's called product_info.tpl.php. You need to find the part where the image is displayed and do something like this:

    PHP Code:
    <?php
    $prod_image 
    $product_info['products_image'];

    if(
    preg_match("/http\:\/\//"$prod_image) == 1)
    {
        print 
    "<img border=none src='$prod_image'>";
    }
    else
    {
        
    $products_image DIR_WS_IMAGES.$prod_image;
        print 
    "<img border=none src='$products_image'>";
    }
    ?>
    This will check the image URL for "http://". If it's part of the URL it won't append the local path to the img src tag.

    You can probably find the other spots in the script just by doing "grep -r DIR_WS_IMAGES *" in the directory with the script. This will show you everywhere that a product image is used. You just need to include this snippet instead of the print statement that uses DIR_WS_IMAGES.

    - Scott
    Last edited by Snib; June 14th, 2006 at 03:04 PM.
    Hatred stirs up strife, But love covers all transgressions.

  6. #6
    http and a telephoto
    Join Date
    January 18th, 2005
    Location
    NYC
    Posts
    17,708
    I'm glad that people finally figured out how to make this all work Wish it had been done back when I needed it

    If either of you is willing to share the set of modified files, please let me know!
    Deborah Carney
    TeamLoxly.com BookGoodies.com ABCsPlus.com

  7. #7
    Full Member
    Join Date
    September 10th, 2005
    Posts
    369
    I didn't actually do the file modifications. I just used the descriptions and then came across across mydatafeedscripts.com.

  8. #8
    Newbie
    Join Date
    June 23rd, 2006
    Posts
    16
    dpl882 would you be willing to give me instruction on how you customized your cre to accept data feed info? I am having trouble with that and not sure what to look for to ask the right questions.

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Populate Shopping Cart
    By nicjohn in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 5
    Last Post: February 20th, 2014, 09:14 AM
  2. How do you populate a forum, blog, or community?
    By JeremyHFSykes in forum Virtual Family and Off-Topic
    Replies: 5
    Last Post: July 3rd, 2009, 05:55 PM
  3. Populate My Site / Blog?
    By ChrisMonty in forum Affiliate Window - AW
    Replies: 4
    Last Post: February 20th, 2009, 12:09 AM
  4. Pre-populate Affiliate Tracking Links? Possible?
    By skuba in forum Commission Junction - CJ
    Replies: 6
    Last Post: September 15th, 2007, 05:59 PM

Posting Permissions

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