If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Set Product Listing Images to link to Image not Product Info

Set Product Listing Images to link to Image not Product Info

Locked

Started by ruts67 on 8 Feb 2010, 12:40 PM · Views: 1,366

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
8 Feb 2010, 12:40 PM
#1
ruts67 avatar

ruts67

New Zenner

Join Date:
Feb 2010
Posts:
15
Plugin Contributions:
0

Post #1 by ruts67

What I am endeavoring to do is have the link on the Product Image in all the listing pages be linked to the image in the same way the image on the info page is.

I am using SlimBox and from the info page I get a large overlayed example of the product image - I want to be able to do this from the listing so customers don't need to go to the info view just to get a bigger image.

I am thinking I need to integrate this code:

<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> 
<div id="productMainImage" class="centeredContent back">
<?php
  echo '<a href="' . $products_image_large . '" title="' . $products_name . '" rel="lightbox">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . '</span></a>';
?>
</div>

into these sections of code (from Product_Listing.php)

Line #165 : $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? 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_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
Line #167 : $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? 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_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';

Any help would be appreciated - the shop site currently is at http://www.thestickerfamily.com.au/shop/

Thanks,
Scott

8 Feb 2010, 3:10 PM
#2
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Post #2 by jasmel

Ruts67:

What I am endeavoring to do is have the link on the Product Image in all the listing pages be linked to the image in the same way the image on the info page is.

I am using SlimBox and from the info page I get a large overlayed example of the product image - I want to be able to do this from the listing so customers don't need to go to the info view just to get a bigger image.

I am thinking I need to integrate this code:

<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> <div id="productMainImage" class="centeredContent back"> <?php echo '<a href="' . $products_image_large . '" title="' . $products_name . '" rel="lightbox">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . '</span></a>'; ?> </div> ``` > > into these sections of code (from Product_Listing.php) > ``` Line #165 : $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? 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_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; ``` > > ``` Line #167 : $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? 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_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; ``` > > Any help would be appreciated - the shop site currently is at <http://www.thestickerfamily.com.au/shop/> > > Thanks, > Scott

I can't help with this question... but I LOVE your site!

~ jasmel : ** My Store** Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

13 Feb 2010, 11:35 PM
#3
ruts67 avatar

ruts67

New Zenner

Join Date:
Feb 2010
Posts:
15
Plugin Contributions:
0

Post #3 by ruts67

I have tried to cut and paste a few bits - but I am still struggling to get my head around which bit of code is writing which element - any advice here - I'd really like every image link to open the image as opposed to being the same link as the product title.:blink: