Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2009
    Posts
    11
    Plugin Contributions
    0

    Default Remove hyperlinks from products in product listing

    I have what is, probably, a very unusual question:

    Is it possible to un-link products when you are looking at a product listing page?

    I run a not-for-profit theatre group website and I would like to remove all the hyperlinks for each ticket (the first is "7:30pm Wednesday 17th June Disco Inferno Adult") on this page: http://www.smptheatre.co.uk/zen/inde...=index&cPath=1

    For simplicity's sake, the tickets don't have descriptions and there's no point in them leaving the product listing page (it will only cause confusion as most of our customers are silver surfers).

    Thanks in advance! This is the first question I've had to ask - the forums have helped enormously in customising my site.

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Remove hyperlinks from products in product listing

    Make an override copy of includes/modules/product_listing.php and edit that new copy by changing this line (line 100 in unmodified v1.3.8 file):
    Code:
              $lc_text = '<h3 class="itemTitle"><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']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
    to this:
    Code:
              $lc_text = '<h3 class="itemTitle">' . $listing->fields['products_name'] . '</h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Mar 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: Remove hyperlinks from products in product listing

    Thanks! Worked a treat.

  4. #4
    Join Date
    Jun 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Remove hyperlinks from products in product listing

    Hey Bunyip, great fix on this one. Can you tell me where I can remove the link around the thumbnail as well?

  5. #5
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Remove hyperlinks from products in product listing

    Quote Originally Posted by gunnerdaddy View Post
    Hey Bunyip, great fix on this one. Can you tell me where I can remove the link around the thumbnail as well?
    Oops - totally misread that: put 'breadcrumb' in place of 'thumbnail'. Better put mind in gear before engaging fingers in future.
    Will post another response, as edit timeout will expire before I get done typing it
    Last edited by bunyip; 3 Mar 2009 at 09:24 PM. Reason: gave incorrect info
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  6. #6
    Join Date
    Jun 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Remove hyperlinks from products in product listing

    Thanks Bunyip. Getting rid of breadcrumbs might come in handy too, but I need to get rid of the thumbnail link that goes to the product page. Similar to the name link that you killed in your fix above.

  7. #7
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Remove hyperlinks from products in product listing

    Quote Originally Posted by gunnerdaddy View Post
    Hey Bunyip, great fix on this one. Can you tell me where I can remove the link around the thumbnail as well?

    Again, this requires editing of an override copy of includes/modules/product_listing.php

    Change this section of code at line 168
    Code:
                $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>';
    to this
    Code:
                $lc_text = zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"');
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  8. #8
    Join Date
    Jun 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Remove hyperlinks from products in product listing

    Outstanding results. Thanks so much Bunyip.

  9. #9
    Join Date
    Mar 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: Remove hyperlinks from products in product listing

    Along similar lines: how do you remove the hyperlinks from the shopping cart?

    I was trying to find the code you removed:
    Code:
    <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']) . '">'
    with a
    Code:
    </a>
    further along in checkout_process.php, but I couldn't see it there. Am I thinking along the right lines?

    Thanks!

  10. #10
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Remove hyperlinks from products in product listing

    The link on the shopping cart images is compiled a little differently from the others - in fact the single link encompasses both the image and the product name. In this case, you need to edit an override copy of the template file tpl_shopping_cart_default.php

    Change this line of code:
    Code:
    <a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
    to:
    Code:
    <span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><a href="<?php echo $product['linkProductsName']; ?>"><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
    You'll see by comparing the two sets of code that this change isn't deleting the link, but simply moving the opening a tag so the link doesn't include the image.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Remove CENTRE from product listing
    By smndvy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Feb 2013, 09:58 AM
  2. Remove "New Products" from Product Listing
    By TurtleDove in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Aug 2009, 05:45 AM
  3. Remove Logo from Product listing
    By cxdmedia in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Dec 2008, 01:12 AM
  4. Remove Products Catagory Listing From Mainpage.
    By weezee in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 15 May 2006, 02:43 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