Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default Adding Additional Images to Product Listing Page

    Does anyone know of a way to get the additional image from the product info page to appear as a thumbnail next to the main product image thumb on the product listing page?

    I am building a clothing store for a client. Many of the items have an additional image of the back of a shirt for instance. I am trying to figure out how to show the additional image next to the right of the product main image on the product listing page (not the product info page). I have tried modifying code on tpl_modules_product_listing.php, tpl_modules_main_product_image.php, additional_images.php, tpl_modules_additional_images.php, and product_listing.php and I am having no luck on locating the code where I can make this happen.

    Can anyone tell me how to accomplish this? It seems like it should be a simple copy and paste of this code...
    PHP Code:
    PHP Code:
    require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?> 
    ...if I can only just find where to paste it.

    Your help is greatly appreciated.

    Original Thread http://www.zen-cart.com/forum/showth...d=1#post752491

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Adding Additional Images to Product Listing Page

    Just a suggestion:

    Why not edit the two images together in a graphics program? Then they would both be displayed.

    Just an idea.

    You are going to need to get stuck into product_listing.php to do it the php route. And it won't be as simple as a easy require statement I don't think.
    Last edited by niccol; 21 Jul 2009 at 10:28 PM.

  3. #3
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: Adding Additional Images to Product Listing Page

    Niccol, i have played around with both product_listing.php, and tpl_modules_product_listing.php and still can not get the image to appear. I think it might work if I can add an extra field definition for the additional image in this block of code from product_listing.php. However I've tried several times and don't know how exactly to write the code. Let me know if you have a suggestion.

    PHP Code:
              if (isset($_GET['manufacturers_id'])) {
                
    $lc_text '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>'
    Also,

    Why not edit the two images together in a graphics program? Then they would both be displayed.
    the idea behind displaying the front(default) and back(additional) images side by side is to make it easy for the client to upload new products to the shopping cart, and to keep the image system clean.

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Adding Additional Images to Product Listing Page

    OK,well that makes sense, it was just a suggestion of an easy work around.

    You are going to have to try and merge the code from additional_images.php (this creates an array of the additional images which is used by tpl_columnar_display) with the ' case 'PRODUCT_LIST_IMAGE' section of product_listing.php (which also produces an array that is then used by tpl_columnar_display).

    Or thats how I would start to think about it...

    You can probably simplify the code quite a bit if you know that there is going to be only a single additional image

 

 

Similar Threads

  1. v139h Additional Images on Product Listing Page
    By rbarbour in forum Templates, Stylesheets, Page Layout
    Replies: 21
    Last Post: 11 Dec 2012, 11:41 PM
  2. Additional Images on Product Listing Page
    By sundoggin in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 6 May 2010, 10:49 PM
  3. Additional Images to be displayed in Product listing page
    By deepti in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Sep 2009, 03:50 PM
  4. Add Additional images on product listing page
    By sundoggin in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Jul 2009, 07:43 PM
  5. Adding additional column to product listing?
    By slugo in forum General Questions
    Replies: 2
    Last Post: 11 Feb 2007, 01:21 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