Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    28
    Plugin Contributions
    0

    Default Adding an option for a separate close-up image

    Hi all,

    So I want to have the ability for products in my store to have one image for the thumbnail/product image, and a second image for a close-up. I'm having trouble getting the admin "New Product" form to upload the second image.

    I added a "products_image_large" field after the existing "products_image" field in the "products" table in the database with the same exact parameters (data type, etc.). I even added a second field for uploading the second image file.

    But when the item is added to the database, "products_image_large" remains empty.

    Can somebody tell me what I am supposed to edit in the update_product.php file? I've made the following changes:

    * Below:
    Code:
    $sql_data_array['products_image'] = zen_db_prepare_input($_POST['products_image']);
    ...I added:
    Code:
    $sql_data_array['products_image_large'] = zen_db_prepare_input($_POST['products_image_large']);
    * Below:
    Code:
        if ($_POST['image_delete'] == 1) {
          $sql_data_array['products_image'] = '';
          $new_image = 'false';
        }
    ...I added:
    Code:
        if ($_POST['image_large_delete'] == 1) {
          $sql_data_array['products_image_large'] = '';
          $new_image_large = 'false';
        }
    I'm not sure what else I need to edit.
    Last edited by TerranRich; 4 Jun 2010 at 12:13 AM.

  2. #2
    Join Date
    Jun 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: Adding an option for a separate close-up image

    Never mind, I figured it out. I didn't change anything in the "preview_info.php" file, which I guess is where the image is uploaded, not "update_product.php".

    Of course, if the documentation for Zen Cart were better, instead of forcing us to stumble into hurdles as we blindly go along, I'd have known this already.

 

 

Similar Threads

  1. Separate Image Size for Specials
    By ---kate--- in forum General Questions
    Replies: 4
    Last Post: 21 Feb 2009, 08:37 AM
  2. Using Separate Image for Shopping Cart Header
    By Craig Robbo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Feb 2009, 11:06 AM
  3. Separate Image for Featured Product List?
    By msmith29063 in forum General Questions
    Replies: 1
    Last Post: 12 Nov 2008, 10:43 PM
  4. Adding an Image for PAYPAL payment option?
    By finestimaginary in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Oct 2007, 06:41 PM
  5. Adding separate AND different image to product page.
    By shannonlynch in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 28 Oct 2006, 02:53 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
  •  
disjunctive-egg