Jump to content

How get the name of currently shown product image for Pinterest


FluffyCat

Recommended Posts

Hi

 

I am trying to add a Pinterest button to my product page. I have added this code in product.tpl:

 

<a href="//pinterest.com/pin/create/button/?url=http%3A%2F%2Fgivensa.com&media={$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')}&description={$product->name|escape:'htmlall':'UTF-8'}" data-pin-do="buttonPin" data-pin-config="above" target="_blank"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a>

 

This works almost perfectly except for that it does not select the currently showed image but the default one which might not be the one the user wants to pin.

 

Is there any way to modify the getImageLink command above so it selects the product image that is currently shown?

 

Thanks in advance

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...