Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8549343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:41:48+00:00 2026-06-11T13:41:48+00:00

I downloaded a script to create a CSV datafeed of my products and I

  • 0

I downloaded a script to create a CSV datafeed of my products and I would also like to include a url to the thumbnail. The code already has the following for the product image url:

$product_data['ImageURL']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();

So I tried to adjust this to:

$product_data['ThumbnailURL']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getThumbnail();

Which displays exactly the same image url (not the thumb). How would I fix this?

I did a var_dump($product); and the result was:

["image"]=> string(18) "/f/i/file_2_18.png" ["small_image"]=> string(18) "/f/i/file_2_18.png" ["thumbnail"]=> string(18) "/f/i/file_2_18.png"

I also need to get the subcategory for the product but I don’t know how to call this. How can I see which variables are possible? E.g. $product->getPrice or $product->getName?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:41:49+00:00Added an answer on June 11, 2026 at 1:41 pm

    I recently needed to do this as well… here’s how I got to it:

    $_product->getMediaGalleryImages()->getItemByColumnValue('label', 'LABEL_NAME')->getUrl();
    

    Or another example

    You should use the catalog product media config model for this purpose.

    <?php
    
    //your code ...
    
    echo Mage::getModel('catalog/product_media_config')
                ->getMediaUrl( $product->getImage() ); //getSmallImage(), getThumbnail()
    

    Edit After your comment.

    Update Answer

    See below URL

    Make all store images the base, small and thumbnail images in Magento?

    Try it

    $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
    foreach ($products as $product) {
        if (!$product->hasImage()) continue;
        if (!$product->hasSmallImage()) $product->setSmallImage($product->getImage());
        if (!$product->hasThumbnail()) $product->setThumbnail($product->getImage());
        $product->save();
    }
    

    Hope that helps you!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I downloaded bootstrap.zip and included in my html page like this <script src=bootstrap/js/bootstrap-alert.js></script> and
I am trying to create these two tables for a simple script I downloaded
I'd like to create a backup script for files and folders on my server
I'm trying to make a login script. I downloaded mysql, xampp, wamp. Already had
I've downloaded such script: $QUERY_STRING=login; if (file_exists(passwd.dat) && $QUERY_STRING != ): require (passwd.dat); if
I downloaded the File upload script called Simple Photo Manager. Since I'm more familiar
I've downloaded KivaJSON and I tryed to add UIActivityIndicator in this script but with
I am trying to make a Postgres PHP backup script. I have downloaded one
from a PHP script I'm downloading a RSS feed like: $fp = fopen('http://news.google.es/news?cf=all&ned=es_ve&hl=es&output=rss','r') or
I would like to install Kohana PHP framework. The site is on a shared

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.