Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2008
    Location
    The Free South
    Posts
    175
    Plugin Contributions
    0

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

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.
    Last edited by gjh42; 31 Dec 2009 at 09:46 PM.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

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

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

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

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

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

 

 

Similar Threads

  1. v153 Image handler replacing additional images on other products.
    By joecooper in forum General Questions
    Replies: 6
    Last Post: 28 May 2015, 05:15 PM
  2. additional images link in other language...
    By importe in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Aug 2011, 11:41 AM
  3. Where does ZC pull the products in a category from database?
    By buddhaflow in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Aug 2011, 03:26 PM
  4. Pull product images from another server?
    By dwalk83 in forum General Questions
    Replies: 5
    Last Post: 25 Oct 2008, 02:48 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