Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Facebook like button on home page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-04-2012, 05:07 AM
 
Waleed Waleed is offline
 

Newbie
  
Join Date: May 2007
Posts: 9
 

Default Facebook like button on home page

Dear all

I need to add the Facebook like button on my home page, I have added the JavaScript part in home.php, and I am unable to know where and how to place the other code?
__________________
X-cart 4.1.6
Reply With Quote
  #2  
Old 02-04-2012, 02:06 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Facebook like button on home page

Waleed, I would not add JS to home.php. What you need to do is add the JS in customer/service_head.tpl or whtever template controls the <head> content of your version. You can find out what templates are called by using webmaster mode.

Then you would add the facebook button itself in another tpl, depending on where you want it to display. On current versions, I would suggest customer/left_bar.tpl or customer/head.tpl. I don't have quick access to your version at the moment. But it can be determined fairly quick in webmaster mode.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 02-05-2012, 02:12 AM
 
Waleed Waleed is offline
 

Newbie
  
Join Date: May 2007
Posts: 9
 

Default Re: Facebook like button on home page

i tried the head.tpl

but no luck
__________________
X-cart 4.1.6
Reply With Quote
  #4  
Old 02-05-2012, 10:54 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Facebook like button on home page

Can you verify that head.tpl is being displayed? Try putting some simple text like "hello world" in the tpl. Can you see that showing up?

Where in the page does facebook want you to put the JS? Does it need to be between the <head> and </head> tags, or just in the body of the page?

Wen you include JS in a Smarty template, sometimes you need to wrap the script in {literal} and {/literal} tags. Since Smarty and JS both use "{" they tend to conflict with each other. View the source of the complied page, and see if the JS is being delivered to the browser in its entirety, or if parts are being stripped by Smarty.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #5  
Old 02-05-2012, 12:03 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Facebook like button on home page

forum.x-cart.com/showthread.php?t=37247
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:33 PM.

   

 
X-Cart forums © 2001-2020