CubeCartForums.org for CubeCart third-party documentation, modifications, skins and services

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Pinterest Button, Adding a Pin it Button to the Product Pages
Richard
post Feb 4 2012, 04:30 PM
Post #1


Member
Group Icon

Group: Members
Posts: 102
Joined: 15-May 07
Member No.: 354



Hi,

Pinterest is yet another site which may add some visitors to your site - their site is here: http://pinterest.com/

Essentially members (its an invitation only site currently with 'only' about a million members where photos of loved items are uploaded and shared.

After numerous attempts to get the Pin It button to work (this is the button which is clicked to add the photo of your item to the visitors album) this is the result - for CC3.16 onwards:


1. Find a member to invite you - maybe me?

2. Go to the goodies page and get the code for the Pin It button.

3. Make the following alterations to the code:

<a href="http://pinterest.com/pin/create/button/?url=http://www.your_site.co.uk/prod_{PRODUCT_ID}.html&media=http://www.your-site.co.uk/{IMG_SRC}&description={TXT_PINIT}" class="pin-it-button" count-layout="horizontal">Pin It</a>
<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>

Add this code to the Viewprod.tpl at the place you wish the button to appear - its a small button so shouldn't use up much real estate.

4. Go to the file /includes/content/viewprod.inc.php and look for this line:

$view_prod->assign("TXT_DESCRIPTION",$prodArray[0]['description']);
add this line after:

$view_prod->assign("TXT_PINIT",$prodArray[0]['prod_metadesc']);

The {TXT_PINIT} placeholder should not have any HTML style attributes - HTML causes problems with the Pinterest code and will not upload successfully
AFAIK prod_metadesc is plain text (if not there could be problems) - it is on my version of CC3
Thats it!

I hope it brings your site some new visitors.

Regards

Richard

This post has been edited by Robsta: Feb 5 2012, 10:38 AM
Go to the top of the page
 
+Quote Post
Richard
post Feb 5 2012, 10:35 AM
Post #2


Member
Group Icon

Group: Members
Posts: 102
Joined: 15-May 07
Member No.: 354



Hi,
Ooops -

This line: url=http://www.your_site.co.uk/prod_{PRODUCT_ID}

Should be: url=http://www.your_site.co.uk/prod_{PRODUCT_ID}.html

Otherwise the link on the Pinterest Likes page will not work -

Richard
Go to the top of the page
 
+Quote Post
Hrs
post Mar 3 2012, 07:50 AM
Post #3


Member
Group Icon

Group: Members
Posts: 19
Joined: 13-February 12
Member No.: 28,051



Thank you for this. Is there any chance it will work on cubecart 5.


--------------------
Script Version 5.2.5

PHP Version 5.2.17

MySQL Version 50096

Browser user-agent Mozilla/5.0 (Windows NT 6.0; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0

Server Software Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 mod_perl/2.0.4 Perl/v5.8.8

Upgrade from 5.2.1
Go to the top of the page
 
+Quote Post
Richard
post Mar 4 2012, 09:17 PM
Post #4


Member
Group Icon

Group: Members
Posts: 102
Joined: 15-May 07
Member No.: 354



QUOTE (Hrs @ Mar 3 2012, 07:50 AM) *
Thank you for this. Is there any chance it will work on cubecart 5.

Hi,
I am sorry but I am stuck in the 'dark ages' of CC3 and have no idea of the coding changes needed for CC5 - I would imagine its not tricky - maybe a CC5 expert could help.

Regards
Richard
Go to the top of the page
 
+Quote Post
bkessler91
post Jul 26 2012, 07:58 PM
Post #5


Member
Group Icon

Group: Members
Posts: 28
Joined: 2-October 10
Member No.: 18,291



QUOTE (Richard @ Mar 4 2012, 05:17 PM) *
Hi,
I am sorry but I am stuck in the 'dark ages' of CC3 and have no idea of the coding changes needed for CC5 - I would imagine its not tricky - maybe a CC5 expert could help.

Regards
Richard


This is not working for me. Using 3.0.16

Any hints?


--------------------
CubeCart Version: 5.2.11
PHP Version: 5.4.29
MySQL Client API version: 5.5.33
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd August 2014 - 07:38 PM
CubeCart Developers Network
Get CubeCart!
© 2007 - 2014  CubeCartForums.org in association with Inspired Solutions. Sponsored by Devellion