| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
java script help | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I want to add some java scripts to my store front page. I have code to put in the <head> section, the <body> tag and the body section. How do I do this with xcart?
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#2
|
|||||||
|
|||||||
![]() Open up customer/home.tpl and add them in. Note that you will need to use {literal} tags:
{literal} javascript code {/literal}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() Thanks
I don't see customer/home.tpl but I have customer/home.php - same thing?
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#4
|
|||||||
|
|||||||
![]() Nope, whenever we are talking about templates, we mean the skin1 directory. So in this case it would be skin1/customer/home.tpl.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() oops I found it skin1/customer/home.tpl
Thanks for your help balinor, you always come through!
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#6
|
|||||||
|
|||||||
![]() I try
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#7
|
|||||||
|
|||||||
![]() because the script I'm using only effects the front page, I'm getting an error on all my other pages because the <head> section has code referring to code in the <body> section that's not there.
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#8
|
|||||||
|
|||||||
![]() Surround the JS with this and it will only show for the home page:
{if $main eq "catalog" and $current_category.category eq ""} Javascript here {/if}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|