Replace go to product link with go to "buy now" link

Hello,

I have enabled ‘catalogue mode’ and I need that when clients click on product photo on grid view, to send the client to the same destination as ‘buy now’ link. Or to make a separate button called ‘details’ where the client can actually go to the product description, but when he click on thumbnail to go o buy now url like this sample taken from other website:
Capture

But adding a button like that I think it will be a custom job, I need at least to replace image link with buy now url link…

You can use the “products:product_detail_view_url” hook here to change the link

design/themes/responsive/templates/views/products/components/product_icon.tpl

Thank you but how to change it to buy_now url (only if the product have a buy_now url) ? I don’t know how to use the hooks.

@ecomlabs I created product_icon.override.tpl inside folder /var/themes_repository/responsive/templates/addons/catalog_mode/hooks/buttons

with the following content but it has no effect.

{$product_detail_view_url = $product.buy_now_url}

I even tried to completely delete content of design/themes/responsive/templates/views/products/components/product_icon.tpl and cleared the cache , the grid page view is still showing detailed page link for all detailed product images.