Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pintrest Integration


douglaswalker

Recommended Posts

Hi there I have this code below to add the Pintrest button on my site and pick up the url and image.

However it will open up the box to add but then doesn't send anything.

Just wondered if anyone can see anything obvious

 

 

<a rel="nofollow" onclick="target='_blank'" <?php echo 'title="' . $product_info['products_name'] . '
- ' . '"'; ?> href="http://pinterest.com/pin/create/button/?url=<?php echo tep_href_link
(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL')?>&&media=<?php
echo 'http://www.mysite.com.au/images/' . $product_info['products_image'] ?>"></a>

 

Warm regards

Doug

Link to comment
Share on other sites

Hi i have been working on this. The code below returns everything as it should in the source code of my site.

However I think you cannot send a url to pintrest which has a ? in it.

as in product_info.php?cPath=

So I need to find a way to do this anyone have any ideas?

urlencode maybe I don't really know

Warm regards

Doug

 

 

<a href="http://pinterest.com/pin/create/button/?url=<?php echo tep_ref_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'])?>&media=<?php  echo 'http://www.mysite.com.au/images/' . $product_info['large_products_image'].'"'?>
class='pin-it-button' count-layout='none'><img border='0' src='//assets.pinterest.com/images/PinExt.png' title='Pin It' /></a>

Link to comment
Share on other sites

Hi this works for me

 

<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode (tep_href_link (FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id']))?>&media=<?php  echo 'http://www.mysite.com.au/catalog/images/' . $product_info['products_image'].'"'?>
class='pin-it-button' count-layout='none'><img border='0' src='//assets.pinterest.com/images/PinExt.png' title='Pin It' /></a>

Link to comment
Share on other sites

  • 2 months later...

Hi,

I am not a coder and I need to add the Pinterest button to my pages. Your solution looks the easier than the Social buttons addon

(my version of osc is old and does not contain the <?php echo TEXT_ENTER_QUANTITY . ":" . tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); ?> code).

 

Instead, my product_info.php page contains:

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'onSubmit="javascript:return isAllChanged();"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

Any idea if placing the following code, right after the above, will actually work for me?

 

<!-- social bookmarks start //-->

<?php

 

include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS);

 

?>

 

<!-- social bookmarks finish //-->

----------

Thanks so much for the help :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...