Greetings,
I have been doing many modifications to my v139f zen-cart as time goes on. Recently I decided I would like social icons that will display on each product page so I used and slightly modified the Social Media Icons Add-on as seen in this screenshot
Each button, when clicked shares that particular product that is being viewed at the time and they all work except for the pinterest button. I have it almost working 100% proper but I cannot seem to get the URL generated on click to include the URL for the product image.
Pinterest's "Pin It" URL has this structure to make the pin-it page load properly:
Code:
http://pinterest.com/pin/create/button/?url=http%3A//www.yoursite.com/whatever/page.html&media=http%3A//www.yoursite.com/images/image.jpg&description=Whatever%20you%want
So the code for the pinterest button I have is as follows
PHP Code:
$tw_image = zen_image(DIR_WS_IMAGES . 'pinterest-32x32.png', 'pinterest', '32', '32', 'class="socialImage"');
$media_icons .= '<a class="pinterest" href="http://www.pinterest.com/pin/create/button/?url='.urlencode(zen_href_link(zen_get_info_page($products_id),'cPath='.(int)$_GET['cPath'].'&products_id=' . $products_id)).'&media='.$products_image_large.'" target="_blank"/>'.$tw_image.'</a>'.' ';
So like I said, the button works, but I am obviously not using the right variable to generate the product image url because the URL on the pin-it page ends with "&media=" without the image URL ... so what code do I need to put in place of .$products_image_large. ??
I used that variable because that is what I saw in the code that displays the main product image so I thought it would work for this too. Thanks in advance for the help!
**Edit** I forgot to mention I am using the Image Handler2 Add-on for the product images.
Bookmarks