Jump to content

Getting Product Main Picture URL


rseigel
 Share

Recommended Posts

I've tried to figure this out (found a few kinda sorta threads that didn't quite get me there) for a while now.

 

What I need to do is, using php, get the URL of the main picture for a given product. I'm using 1.5.3.1.

 

Does anyone have the snippet that would get that?

 

This is for a custom script that I use to create product feeds for different marketplace sites.

 

TIA

 

Ron

Share this post


Link to post
Share on other sites

Wicked. Thanks for that.

 

Now, I'm a bit confused.

 

How do I use that on the fly in a loop (the loop part I have - no issues there). Basically, I want to get the URL for each product as I loop through them. I can simply add it to my CSV file after the SELECT has grabbed everything else and written the CSV file. So, I'm looking to look each main image URL up by SKU (or ID or whatever).

 

Does that make sense?

Edited by rseigel (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More