| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Facebook like button on home page | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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. |
|||||||||
#3
|
|||||||
|
|||||||
![]() i tried the head.tpl
but no luck
__________________
X-cart 4.1.6 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() 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. |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|