| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to add statements to head section | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to add statements to head section
Hi,
I need add some script statements to the Head section of the page so that i can can utilise typekit fonts.... pretty basic stuff but can't work out how to do it ... can anyone help?
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#2
|
|||||||||
|
|||||||||
Re: How to add statements to head section
Hello!
Is it X-Cart 4, or X-Cart 5?
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: How to add statements to head section
xcart 5.1.5
just trying to find my way around the new architecture ... Also I will need to add some custom javascript as well. I don't want to edit the common.js can I add a new js.file Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#4
|
|||||||
|
|||||||
Re: How to add statements to head section
I have tried adding a tpl via custom skin in default/en/header/parts as follows:
Code:
Then rebuilding the cache, but this just generates an internal error. If I comment out the script statements all is fine .... How should I include these? Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#5
|
|||||||||
|
|||||||||
Re: How to add statements to head section
Hello Jan,
This is because the templater finds "{" and "}" and decides that it is an instruction to him that he doesn't know. Try this: Code:
Does this help? A better way would be decorating the getJSFiles() method in the \XLite\View\Controller widget and adding a new JavaScript file that does the job on the page load.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions Last edited by qualiteam : 08-21-2014 at 11:22 PM. |
|||||||||
#6
|
|||||||
|
|||||||
Re: How to add statements to head section
Thanks Alex,
This did the trick but could you explain how I would go about using the other method, as I will have other javascript to add and would prefer to do it properly! I have another question about removing the sidebars ..... but I will start a separate thread for that! Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#7
|
|||||||||
|
|||||||||
Re: How to add statements to head section
Hi Jan!
There is a guide how you can attach JS file to your module: http://kb.x-cart.com/display/XDD/Adding+CSS+and+JS+files You can simply use Custom Skin module in order to apply this change.
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
#8
|
|||||||
|
|||||||
Re: How to add statements to head section
Thanks I have implemented it that way now .... much better!
Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
|
|||
X-Cart forums © 2001-2020
|