Community Forums

[MOD] Facebook Like Button on Product Page

Free manual modifications can be contributed here. Modifications are manual snippets of code that are pasted into the forums for others to use.

Re: [MOD] Facebook Like Button on Product Page

Postby jimmyharwood » Sat Jan 07, 2012 11:47 am

I have been playing around with this, and I have go this far , first go to http://developers.facebook.com/docs/ref ... gins/like/ where you can get the code in either HTML5 IFRAME or XFBML.

You ca place the code in any tpl file in catalog/view/theme/default/template/common, and as long as there are no css stylesheets attached then all the buttons are active and clickable.

Once I add

#facebook {
position: absolute;
top: 10px; /* JH Changed for Currency position */
left: 500px;
}

Then the buttons stop being active, although the like numbers are returned.

This is as far as I can go, anybody know how to sort out the links so they are clickable?

Cheers
Jimmy
jimmyharwood
 
Posts: 41
Joined: Wed Dec 28, 2011 4:55 pm

Re: [MOD] Facebook Like Button on Product Page

Postby jimmyharwood » Sat Apr 28, 2012 6:27 pm

Hi I have solved this on our site, I add the following code

Code: Select all
<div id="facebook">
  <div id="fb-root"></div><script src="//connect.facebook.net/en_US/all.js#appId=YOUR ID;xfbml=1">
      </script><fb:like href="scootssuitsandboots.com" send="true" width="75" show_faces="false" font=""></fb:like></div>
      <div id="twitter">
    <a target="_blank" href="http://twitter.com/scootsuitsboots" title="Follow Scoots Suits and Boots on twitter"><img alt="" src="catalog/view/theme/default/image/followme.png"/></a>
</div>
      </php>


Use you FB id, href and twitter name, and place the code where you want in
catalog/view/theme/YOUR THEME/template/common/header.tpl

I then added the following to my stylesheet

Code: Select all
div#twitter{   
      
   position: absolute;
   top: 02px;     /*  CHANGED BY JH */
   right:460px;  /*  CHANGED BY JH */
   z-index: 0;
   
    }
#header #facebook {
    background: url('//connect.facebook.net/en_US/all.js#appId=[b]YOUR ID[/b]&amp;xfbml=1') center center no-repeat;
   position: absolute;
   top: 07px;     /*  CHANGED BY JH */
   right: 530px;  /*  CHANGED BY JH */
   z-index: 0;
   }


Obviously you will need to make changes to suit your store.

I know very little about coding, and managed this with a bit of trial and error, I hope it is useful to someone.
;D

Jimmy
jimmyharwood
 
Posts: 41
Joined: Wed Dec 28, 2011 4:55 pm

Re: [MOD] Facebook Like Button on Product Page

Postby mrjave » Mon Aug 13, 2012 7:06 am

Good day all,

is this available in VQMOD and for V1.5.3.1??
someone pleaseeee.

kind regards,
Jave
mrjave
 
Posts: 101
Joined: Wed Jun 13, 2012 8:22 am

Re: [MOD] Facebook Like Button on Product Page

Postby jimmyharwood » Tue Aug 14, 2012 7:26 pm

Works for me on V1.5.3.1, unfortunately I am a pure hands novice, and do not know how to r
write VQmod's - sorry
jimmyharwood
 
Posts: 41
Joined: Wed Dec 28, 2011 4:55 pm

Re: [MOD] Facebook Like Button on Product Page

Postby pooks » Wed Mar 06, 2013 9:02 pm

Almost got this to work meta is coming nicely to header when looking at the source BUT getting this error

Notice: Undefined variable: result in /public_html/vqmod/vqcache/vq2-catalog_controller_product_product.php on line 410

Any idea?
pooks
 
Posts: 39
Joined: Mon Mar 26, 2012 5:42 pm

Previous

Return to Modifications

Who is online

Users browsing this forum: No registered users and 11 guests

Hosted by Arvixe Web Hosting