Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / product_listing.php display large image

product_listing.php display large image

Views: 996

Results 1 to 5 of 5
16 Oct 2012, 1:12 PM
#1
jonnyboy22 avatar

jonnyboy22

Zen Follower

Join Date:
Jun 2008
Location:
Sheffield South Yorkshire
Posts:
165
Plugin Contributions:
1

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

   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_WIDTH, IMAGE_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_WIDTH, IMAGE_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

' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '

to

' . zen_image($products_image_large, $products_values->fields['products_name'] . '

but no joy.

Any ideas?

17 Oct 2012, 3:15 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: product_listing.php display large image

jonnyboy22:

I'm trying to display the large image in product_listing.php.
Why ?

18 Oct 2012, 4:24 PM
#3
jonnyboy22 avatar

jonnyboy22

Zen Follower

Join Date:
Jun 2008
Location:
Sheffield South Yorkshire
Posts:
165
Plugin Contributions:
1

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

<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?

18 Oct 2012, 5:13 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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.

21 Oct 2012, 5:53 PM
#5
jonnyboy22 avatar

jonnyboy22

Zen Follower

Join Date:
Jun 2008
Location:
Sheffield South Yorkshire
Posts:
165
Plugin Contributions:
1

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