X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Facebook like button on home page (https://forum.x-cart.com/showthread.php?t=62542)

Waleed 02-04-2012 05:07 AM

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?

totaltec 02-04-2012 02:06 PM

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.

Waleed 02-05-2012 02:12 AM

Re: Facebook like button on home page
 
i tried the head.tpl

but no luck

totaltec 02-05-2012 10:54 AM

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.

JWait 02-05-2012 12:03 PM

Re: Facebook like button on home page
 
forum.x-cart.com/showthread.php?t=37247


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.