Re: creinold Pinterest Button Addon
opps I forgot to strip the html from the description... here the correct code:
Code:
<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
Re: creinold Pinterest Button Addon
Quote:
Originally Posted by
creinold
opps I forgot to strip the html from the description... here the correct code:
Code:
<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
Now the image doesn't work. lol
Re: creinold Pinterest Button Addon
Okay try this now:
Code:
<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo $pt_image; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
Re: creinold Pinterest Button Addon
I also don't see this in your codes/ Make sure it's added to the jscript_main.php
Code:
<?php
if (isset($_GET['products_id'])) { // use products_image if products_id exists
$pinterest_image = $db->Execute("select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$_GET['products_id'] . "'");
$pt_image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $pinterest_image->fields['products_image'];
}
?>
Re: creinold Pinterest Button Addon
I think something is wrong with the pintrest servers. Nothing loading even on my site were it works... Hmmm
Re: creinold Pinterest Button Addon
Quote:
Originally Posted by
creinold
I think something is wrong with the pintrest servers. Nothing loading even on my site were it works... Hmmm
I changed the code above and I made sure the code was in my jscript_main.php. I don't know if the pintrest servers are still down but I don't see my description and image yet. I am going to be gone for the day but will check back once I am home. Thanks again!
Re: creinold Pinterest Button Addon
Okay just got home and noticed that the image and description doesn't show up at all. Not sure if pintrest servers are still down but that's where I am at.
Re: creinold Pinterest Button Addon
Just found out Pinterest update the codes. So now my codes will have to be update also. So tomorrow I will update to the newest codes. Geez you think they keep some kind of backward compatibility at least...
Re: creinold Pinterest Button Addon
Quote:
Originally Posted by
creinold
Just found out Pinterest update the codes. So now my codes will have to be update also. So tomorrow I will update to the newest codes. Geez you think they keep some kind of backward compatibility at least...
Yeah you would think they would.
Re: creinold Pinterest Button Addon
I added your code to our shopping cart and although it is working somewhat I have a few questions. The "Pin It" words are showing up on each product but not the PinIt image like on your page. Also, the link on the URL stops after "/index.php?main_page=product_info&" so it cuts off the end of my URL and then when posted on pinterest.com it does not have the correct link.
http://www.fishid.com/nwp/index.php?...&products_id=1
Thanks, Eric