ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Facebook LIKE button
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Facebook LIKE button

 Post Reply Post Reply Page  <12
Author
Message
TrekLightGear View Drop Down
Newbie
Newbie


Joined: 24-April-2007
Location: Boulder, CO
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TrekLightGear Quote  Post ReplyReply Direct Link To This Post Posted: 12-July-2010 at 12:52pm
Sean - Curious to hear what you find out. I really hope there's a way to get it to work with the SEO product pages, it works great for everything else but obviously the product pages are the ones we want people to Like!!
Seth Haber
Back to Top
joshs View Drop Down
Newbie
Newbie


Joined: 07-April-2009
Location: Utah
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote joshs Quote  Post ReplyReply Direct Link To This Post Posted: 14-July-2010 at 12:57pm
here is a marketing idea that needs some sort of confirmation app.

Give discounts based on friend count. For example 1000 friends - %10 off with a wall post. "TrekLightGear.com just hooked me up with this x product!" Picture attached.

The app would allow the moderator to set discounts or give coupons based on friend network size. More friends equals more exposure equals more "word of mouth" advertising.
Josh Shirley
josh@windsurfutah.com
Back to Top
RedLeafDev View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers


Joined: 12-January-2010
Location: Portsmouth, NH
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote RedLeafDev Quote  Post ReplyReply Direct Link To This Post Posted: 16-September-2010 at 10:30am
Try this (it has worked for us on numerous sites):
 
1) Go here to get the code for the button: http://developers.facebook.com/docs/reference/plugins/like
 
2) Paste the code into the viewPrdC (or L or O) page.
 
3) Make a simple modification to the code where it starts like.php?href=...
 
Place as the URL the site followed by the product as such: http://[site url]/productcart/pc/viewPrd.asp?idproduct=<%=pIdProduct%>
 
And test...
 
Amy
Red Leaf Development

Certified ProductCart Developers

www.redleafdevelopment.com
Back to Top
Vincent View Drop Down
Newbie
Newbie


Joined: 23-October-2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vincent Quote  Post ReplyReply Direct Link To This Post Posted: 23-October-2010 at 7:26pm
For SEO enabled site I had to use a quick fix using the Replace function.
Based on Sean@WMS code example, thank you Sean.

With the SEO enabled on the site the original link was like the one shown below which created an error 404 while using the facebook link back to the site:

Example:
http://www.yoursite.com/productcart/pc/404.asp?404;http://www.yoursite.com/productcart/pc/Blue-Pinpoint-3p3.htm

I realized then the pattern with the recurring first half of the URL which created the error. I then just decided to use a replace function to get rid of it as it is always the same string.
replace(strLikeURL,"http://www.yoursite.com/productcart/pc/404.asp?404;","")

Here is the final version I implemented on one of my ProductCart Site using SEO (in ViewProdC.asp). Sean Thanks again.

<%
Dim strLikeURL
If Request.ServerVariables("HTTPS") = "ON" Then
      strLikeURL = "https://"
Else
      strLikeURL = "http://"
End If
strLikeURL = strLikeURL & Request.ServerVariables("SERVER_NAME")
strLikeURL = strLikeURL & Request.ServerVariables("SCRIPT_NAME")
If Len(Request.ServerVariables("QUERY_STRING") & "") > 0 Then strLikeURL = strLikeURL & "?" & Server.HTMLEncode(Request.ServerVariables("QUERY_STRING")) end if
strLikeURL = replace(strLikeURL,"http://www.yoursite.com/productcart/pc/404.asp?404;","")
%>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<%=strLikeURL%>" layout="button_count"></fb:like>


At the end I find myself with the appropriate URL, based on the example above, it will then return
http://www.yoursite.com/productcart/pc/Blue-Pinpoint-3p3.htm

Note that it is very important to use the SERVER.HTMLEncode()function while using the request object to obtain querystring values:
Server.HTMLEncode(Request.ServerVariables("QUERY_STRING"))

If not, you will then open your site to XSS vulnerabilities which will also affect the PCI Compliance of productcart.


Maybe not the best coding practice but it worked for me.

Edited by Vincent - 10-November-2010 at 1:38am
Back to Top
ProductCart View Drop Down
Admin Group
Admin Group

ProductCart Team

Joined: 01-October-2003
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote ProductCart Quote  Post ReplyReply Direct Link To This Post Posted: 04-December-2010 at 2:44am
FYI: We recently added an article to the ProductCart WIKI on how to add a Facebook LIKE button

http://wiki.earlyimpact.com/how_to/add_facebook_like_button_ecommerce_store
The ProductCart Team

Home of ProductCart shopping cart software
Back to Top
 Post Reply Post Reply Page  <12
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.