Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2008
    Location
    Sheffield South Yorkshire
    Posts
    165
    Plugin Contributions
    1

    Default product_listing.php display large image

    Hello,

    Wonder if anyone can help me. I'm trying to display the large image in product_listing.php.

    at the moment I have

    PHP Code:
       case 'PRODUCT_LIST_IMAGE':
            
    $lc_align 'left';
            if (
    $listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
              
    $lc_text '';
            } else {
             if (isset(
    $_GET['manufacturers_id'])) {
                
    $lc_text '
                '
    ;
              } else {
                
    $lc_text '<a href="#' $listing->fields['products_id'] . '" name="modal">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>
                

    <div class="boxes">
    <div id="' 
    $listing->fields['products_id'] . '" class="window">
    <a href="#" class="close">Close this window</a>
    <br />
    zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '
    <br />
    <b>' 
    $listing->fields['products_name'] . '</b> | <br />
    Product id ' 
    $listing->fields['products_id'] . '<br />
    zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'], PRODUCT_LIST_DESCRIPTION) . '
        </div>
    </div> 
    Ive tried changing
    PHP Code:
    ' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . ' 
    to

    PHP Code:
    ' . zen_image($products_image_large, $products_values->fields['products_name'] . ' 
    but no joy.

    Any ideas?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: product_listing.php display large image

    Quote Originally Posted by jonnyboy22 View Post
    I'm trying to display the large image in product_listing.php.
    Why ?
    .

    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.

  3. #3
    Join Date
    Jun 2008
    Location
    Sheffield South Yorkshire
    Posts
    165
    Plugin Contributions
    1

    Default Re: product_listing.php display large image

    Hi Byte

    Thanks for your reply.

    It was for this site

    Wanted the image and description in a popup lightbox which was also in the page so we can increase the amount of text on the page for SEO

    p.s. we got it working with
    HTML Code:
    <img src="http://www.SITEURL.co.uk/images/large/' . substr($listing->fields['products_image'], 0, -4) . '_LRG.jpg">
    for now but could do without the substr. If you could lend me some of your knowledge id appreciate it?
    Last edited by jonnyboy22; 18 Oct 2012 at 05:27 PM.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: product_listing.php display large image

    Seriously? That page is massive. You said this was about SEO, but the sheer size of your page makes it NOT seo-friendly. Pushing larger images to the page just makes it even worse.
    Haven't you read all the buzz from Google in the last few years about the importance of small page sizes and fast page loading speed? The sheer size of your page makes it horribly slow. And brings my browsers to a near crash.
    .

    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.

  5. #5
    Join Date
    Jun 2008
    Location
    Sheffield South Yorkshire
    Posts
    165
    Plugin Contributions
    1

    Default Re: product_listing.php display large image

    Hi byte
    Yes im aware of the seo page size issue and smaller other pages are used for the main keywords etc. I'm open to suggestions regarding not loading the images until needed etc but redirecting the user to another page is not an option (client is specific about this).

 

 

Similar Threads

  1. force featured products to display large image rater than standard image?
    By bonnit in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 17 Oct 2012, 05:46 AM
  2. Large image display problem
    By Raina in forum Customization from the Admin
    Replies: 5
    Last Post: 29 Aug 2009, 03:09 AM
  3. Additional_Images.php Line 16-display link if no large
    By Donn in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 18 Oct 2007, 05:10 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