Results 1 to 10 of 11

Hybrid View

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

    Default Additional Images on Product Listing Page

    I have searched the forums extensively and have tried numerous options and am at a total loss. Please let me know if this listing should be placed elsewhere - I thought this was the best place for this question.

    I am building a clothing store for a client. Many of the items have an additional image such as an image of a back of a shirt for instance. I am trying to figure out how to show the additional image to the right of the product main image on the product listing 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 of code if I can only just find where to paste it.

  2. #2
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Additional Images on Product Listing Page

    you can look at tpl_product_info_display.php .. there you can move the code block that calls tpl_modules_additional_images.php to any location you want.

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

    Default Re: Additional Images on Product Listing Page

    Quote Originally Posted by tony_sar View Post
    you can look at tpl_product_info_display.php .. there you can move the code block that calls tpl_modules_additional_images.php to any location you want.
    Tony, I have tried placing the following code from tpl_product_info_display.php ...

    PHP Code:
    require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?> 
    ...in several places within the tpl_modules_product_listing.php page to no avail. Where would I put this code to get the available additional image to display to the right of the main image on the product listing page?

  4. #4
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Additional Images on Product Listing Page

    you might want to move it , under Product Price ?? . however, once there , you need to use CSS to position additional images if they are not already aligned correctly . this is easier then using CSS to position where you want those images from default location.

    once you moved the code , supply us with link to your site , so we might be able to help out with CSS .

  5. #5
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Additional Images on Product Listing Page

    Quote Originally Posted by sundoggin View Post
    Tony, I have tried placing the following code from tpl_product_info_display.php ...

    PHP Code:
    require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?> 
    ...in several places within the tpl_modules_product_listing.php page to no avail. Where would I put this code to get the available additional image to display to the right of the main image on the product listing page?
    you have to modify tpl_product_info_display.php and NOT tpl_product_listing.php ..

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

    Default Re: Additional Images on Product Listing Page

    Quote Originally Posted by tony_sar View Post
    you have to modify tpl_product_info_display.php and NOT tpl_product_listing.php ..
    I have modified tpl_product_info_display.php. This only affects the main product page layout. I need the additional image to show up next to the main image on the category/product listing page (index.php?main_page=index&cPath=#_#)

  7. #7
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Additional Images on Product Listing Page

    ok , i misunderstood. if you can get additional images showing in product listing , then you need to use CSS to position them correctly .

  8. #8
    Join Date
    May 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Additional Images on Product Listing Page

    Hey, i know this isn't exactly the solution to your problem, but I spent most of the day trying to get the product listing image to popup the additional images, as it does on the product info page.
    It's not the exact solution your looking for but the code might help you figure it out. I'm also working on a clothing store, so maybe if you just want to adopt this it's fine.

    In tpl_modules_products_all_listing.php

    PHP Code:
    if (PRODUCT_ALL_LIST_IMAGE != '0') {
            if (
    $products_all->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
              
    $display_products_image str_repeat('<br clear="all" />'substr(PRODUCT_ALL_LIST_IMAGE31));
            } else {
              
    $display_products_image '<a href="' zen_href_link(FILENAME_POPUP_IMAGE'pID=' $products_all->fields['products_id']) . '" target="_blank">' '<div style="height:179px;width:170px;background-image:url(/zentemplates/images/bg2.png) ;background-position:center center;">' '<div style="height:150px;width:150px;padding-top:19px;">' zen_image(DIR_WS_IMAGES $products_all->fields['products_image'], $products_all->fields['products_name'], IMAGE_PRODUCT_ALL_LISTING_WIDTHIMAGE_PRODUCT_ALL_LISTING_HEIGHT) . '</div>' '</div>''</a>' .  str_repeat('<br clear="all" />'substr(PRODUCT_ALL_LIST_IMAGE31));
            }
          } else {
            
    $display_products_image '';
          } 
    and if you want it to work with a lightbox

    PHP Code:
    if (PRODUCT_ALL_LIST_IMAGE != '0') {
            if (
    $products_all->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
              
    $display_products_image str_repeat('<br clear="all" />'substr(PRODUCT_ALL_LIST_IMAGE31));
            } else {
            
    $display_products_image '<a href="' zen_lightbox(DIR_WS_IMAGES $products_all->fields['products_image'], $products_all->fields['products_name'] , LARGE_IMAGE_WIDTHLARGE_IMAGE_HEIGHT) . '" rel="' $rel '">' '<div style="height:179px;width:170px;background-image:url(/zentemplates/images/bg2.png) ;background-position:center center;">' '<div style="height:150px;width:150px;padding-top:19px;">' zen_image(DIR_WS_IMAGES $products_all->fields['products_image'], $products_all->fields['products_name'], IMAGE_PRODUCT_ALL_LISTING_WIDTHIMAGE_PRODUCT_ALL_LISTING_HEIGHT) . '</div>' '</div>''</a>' .  str_repeat('<br clear="all" />'substr(PRODUCT_ALL_LIST_IMAGE31));
            }
          } else {
            
    $display_products_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 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
  3. Adding Additional Images to Product Listing Page
    By sundoggin in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Jul 2009, 10:34 AM
  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

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