Forums / Templates, Stylesheets, Page Layout / Additional Images pull from other database field?

Additional Images pull from other database field?

Locked
Results 1 to 7 of 7
This thread is locked. New replies are disabled.
31 Dec 2009, 20:29
#1
micmed avatar

micmed

Zen Follower

Join Date:
Mar 2008
Posts:
165
Plugin Contributions:
0

Additional Images pull from other database field?

Can anyone steer me to how and what files to modify to direct "addition images" to pull from other database fields instead of detecting and displaying consecutive numbered images.

I have to upload image names using a csv file with 10 fields named "products_image, products_image02, etc. through products_image10". I already have the database fields created but don't know how to pull and display them.

PS - I do not have the option of naming the images. They come from the manufacturer and do not run consecutively.
31 Dec 2009, 20:41
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Additional Images pull from other database field?

The additional images are selected and processed in /includes/modules/your_template/additional_images.php.

You may not need to do any recoding; if your base product image name is always included in the additional image names, and they are all in the base /images/ folder (not subfolders), they will automatically work when you select the base image in admin.


Or are you saying that the image filenames have nothing to do with the csv fields? In that case, you can build a SQL query to look in those fields for the product.
Look at other files that do SQL queries for examples you can follow.
31 Dec 2009, 20:49
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Additional Images pull from other database field?

A final thought: there are batch image processors that can take your sets of images and rename them according to a system so they can be used in the stock images code. If you have the images on your server, you can rename them however you want.
31 Dec 2009, 20:56
#4
micmed avatar

micmed

Zen Follower

Join Date:
Mar 2008
Posts:
165
Plugin Contributions:
0

Re: Additional Images pull from other database field?

Thanks, but I know how it it works normally. That will not work for me. The images that I am given are named by the vendor and do not have unique base names that I can use for each item. All the image names have a base of IMG. For example their image names could be IMG_0345.jpg - IMG_0354.jpg for a single item. If I let additional images do it's default job then it would all of the files with the base IMG_xxxx.jpg. Correct?
31 Dec 2009, 21:07
#5
micmed avatar

micmed

Zen Follower

Join Date:
Mar 2008
Posts:
165
Plugin Contributions:
0

Re: Additional Images pull from other database field?

Whoops, I didn't see your other post.

This is the scenario. We use ChannelAdvisor to manage our ebay listings. We use Photobucket to store our images. We have thousands of listings already in the system and put up about 100 new ones every week. Photobucket names our images for us. Channeladvisor lets us download a csv that we then reformat to upload to ZC. The 10 image fields in the csv as well as the image names are provided for us and do not have anything in common with the product number other than being on the same line. Associating the 1st image "products_image" is not a problem because ZC associates it with the product number in the database.

I need ZC to associate 10 images with uncommon names with a single product number.

Renaming the images is not practical for us on a daily basis.
01 Jan 2010, 08:54
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Additional Images pull from other database field?

With the flurry of activity and amount of time and energy you've been spending on this topic in the last couple weeks, I might suggest you post an ad in the Commercial Help Wanted area to have someone bid on doing the custom coding requirements you need. And then after the hired work has been completed, consider sharing the finished product back with the community so others can benefit from it too.
03 Jan 2010, 02:03
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Additional Images pull from other database field?

Since you do need to do some new coding, the file to hook into is /includes/modules/your_template/additional_images.php, as I mentioned first. If you don't have the PHP/MySQL knowledge to adapt approaches from other files, you should go straight to Commercial Help Wanted. If you do, start looking and post back with your findings for advice.