Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Make entire product listing box a link to product info

    Hi

    I'm trying to make the div container around the products link through to the product info page. I think the best way is to use javascript but the code I have tried does not appear to work. http://css-tricks.com/snippets/jquer...div-clickable/

    I've tried playing around with /includes/modules/specials_index.php without success. Some help with this would really be appreciated.

    Name:  screengrab.jpg
Views: 155
Size:  20.0 KB
    UK based Zen Cart Web Designer here www.handcoded.co.uk

  2. #2
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Re: Make entire product listing box a link to product info

    So to do this you have to create a new javascript file in your templates jscript folder named jscript_WHATEVER.js

    In this file paste this code

    $(document).ready(function(){
    $(".centerBoxContentsSpecials.centeredContent a").click(function(e){
    e.stopPropagation();
    });
    $(".centerBoxContentsSpecials.centeredContent").click(function(){
    document.location=$(this).find('a:first').attr('href');
    });

    $(".centerBoxContentsNew.centeredContent a").click(function(e){ e.stopPropagation(); });
    $(".centerBoxContentsNew.centeredContent").click(function(){ document.location=$(this).find('a:first').attr('href'); });

    $(".centerBoxContentsFeatured.centeredContent a").click(function(e){ e.stopPropagation(); });
    $(".centerBoxContentsFeatured.centeredContent").click(function(){ document.location=$(this).find('a:first').attr('href'); });
    $(".categoryListBoxContents a").click(function(e){ e.stopPropagation(); });
    $(".categoryListBoxContents").click(function(){ document.location=$(this).find('a:first').attr('href'); });
    });

    That's it
    UK based Zen Cart Web Designer here www.handcoded.co.uk

 

 

Similar Threads

  1. v151 On the product listing make product image link do somewhere else
    By DannyVarley in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Jul 2013, 04:22 PM
  2. Set Product Listing Images to link to Image not Product Info
    By Ruts67 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Feb 2010, 12:35 AM
  3. Product listing more info link
    By 121webconsultancy in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Jan 2009, 12:26 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