Author Topic: Making Images in listing block redirect  (Read 7339 times)

Offline artist3412

  • Full Member
  • ***
  • Posts: 117
  • Karma: +16/-0
    • View Profile
    • In The Wind Creations
Making Images in listing block redirect
« 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
To send light into the darkness of men's hearts - such is the duty of the artist.  ~Schumann

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Making Images in listing block redirect
« Reply #1 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?
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline artist3412

  • Full Member
  • ***
  • Posts: 117
  • Karma: +16/-0
    • View Profile
    • In The Wind Creations
Re: Making Images in listing block redirect
« Reply #2 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.
To send light into the darkness of men's hearts - such is the duty of the artist.  ~Schumann

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Making Images in listing block redirect
« Reply #3 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>';



Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline artist3412

  • Full Member
  • ***
  • Posts: 117
  • Karma: +16/-0
    • View Profile
    • In The Wind Creations
Re: Making Images in listing block redirect
« Reply #4 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!
To send light into the darkness of men's hearts - such is the duty of the artist.  ~Schumann

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Making Images in listing block redirect
« Reply #5 on: August 24, 2013, 11:58:42 AM »
Glad I can help!  ;)
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod