Forums / Templates, Stylesheets, Page Layout / Making entire productListing div clickable

Making entire productListing div clickable

Started by pricediscrimination on 14 May 2012, 12:24 AM · Views: 920

Results 1 to 4 of 4
14 May 2012, 12:24 AM
#1
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Making entire productListing div clickable

What would need changed in /includes/modules/product_listing.php in order to make it so the href is wrapped around the entire productListing-odd and productListing-even divs? So the user doesn't have to click the link or image, instead the entire box will be clickable.

23 May 2014, 9:30 AM
#2
eavinu avatar

eavinu

New Zenner

Join Date:
Jan 2009
Posts:
37
Plugin Contributions:
0

Re: Making entire productListing div clickable

Did you manage to solve your issue?
If you didn't and still needs help with this let me know.

eavinu

3 Mar 2015, 3:26 PM
#3
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Making entire productListing div clickable

eavinu:

Did you manage to solve your issue?
If you didn't and still needs help with this let me know.

eavinu

Hi just saw this. Did not solve this yet. Thanks

3 Mar 2015, 3:44 PM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Making entire productListing div clickable

pricediscrimination:

What would need changed in /includes/modules/product_listing.php in order to make it so the href is wrapped around the entire productListing-odd and productListing-even divs? So the user doesn't have to click the link or image, instead the entire box will be clickable.

The theory is simple.

Find the <a href=............................................></a> line that deals with the clickable element of interest.

Remove the </a> part of the line, and re-insert it somewhere just before the closing <div>

In practice you'll probably need to experiment a little to find the optimal place to place the </a> tag so as to ensure that it (and all the other tags within the same code block) are correctly 'balanced'.

I suggest that you use a text editor with Syntax highlighting to help avoid mistakes.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.