AbanteCart Community

AbanteCart Development => Customization help => Topic started by: artist3412 on August 23, 2013, 09:24:29 AM

Title: Making Images in listing block redirect
Post by: artist3412 on August 23, 2013, 09:24:29 AM
I made a listing block that I named "Products" to replace the Categories block on the home page. The reason was so that customers could see an image of each product category. The links above the image redirect to the category just fine, but I was wondering if there was a way to make each image redirect to the corresponding product page as well. right now if you click the image, it just redirects back to the home page and some of my customers have mentioned it would be nice to just click the image, not the underlined text link to get to the products.
Thanks. I am using default 1.1.6
Title: Re: Making Images in listing block redirect
Post by: abantecart on August 23, 2013, 11:50:44 PM
Is this on default or default_html5 template?

This sounds like a small bug, I just can not catch it. :) Can you post a link?
Title: Re: Making Images in listing block redirect
Post by: artist3412 on August 24, 2013, 09:44:36 AM
Sure it's inthewindcreations dot com slash AbanteCart I am using default 1.1.6 for now, I know default5 is more responsive, but I don't have the time right now to redesign the site and I do like the simplistic look of the original default version. Thanks for all your help.
Title: Re: Making Images in listing block redirect
Post by: abantecart on August 24, 2013, 10:59:59 AM
Below is the fix:

Locate file(s) and open for edit:
storefront/view/default_html5/template/blocks/listing_block_column_left.tpl
storefront/view/default_html5/template/blocks/listing_block_column_right.tpl
(This is depends where block is shown)

Locate code to edit:
Code: [Select]
$image = '<a '.($item['image']['resource_type']=='image'? 'class="thickbox" rel="gallery"': '').' title="'.$item['image']['title'].'" href="'.$item['image']['main_url'].'">'.$item['image']['thumb_html'].'</a>';


Replace with:
Code: [Select]
$image = '<a '.($item['image']['resource_type']=='image'? 'class="thickbox" rel="gallery"': '').' title="'.$item['image']['title'].'" href="'.$item['url'].'">'.$item['image']['thumb_html'].'</a>';



Title: Re: Making Images in listing block redirect
Post by: artist3412 on August 24, 2013, 11:51:44 AM
Worked perfectly! You guys are incredible! Thank you so much! Can't wait to make enough to start donating!
Title: Re: Making Images in listing block redirect
Post by: abantecart on August 24, 2013, 11:58:42 AM
Glad I can help!  ;)