pedrodonkey Posted June 22, 2010 Share Posted June 22, 2010 Hi, Does anyone know where i can modify this variable {$css_uri} for including the CSS files in the header.tpl file? It seems PS is loading my global.css file using the temporary URL like this: https://188.65.112.140/~neontech/themes/NeonTechnology/css/global.css Instead of /themes/NeonTechnology/css/global.css And it's causing issues with the security certificate. If i add the certificate exception it works fine but that has to be done manually and isn't convenient.Using PS 1.3.1.1Thanks for any help. Link to comment Share on other sites More sharing options...
Kaihaku Posted June 22, 2010 Share Posted June 22, 2010 New to PrestaShop, don't know the answer, but I'd recommend switching to the default theme and then switching back. Hopefully that would reset the path. Otherwise, you could hardcode the css path in header.tpl, not a perfect solution but it works, I've used it to add additional css files when I couldn't find where to add additional css to {$css_uri}. Link to comment Share on other sites More sharing options...
pedrodonkey Posted June 22, 2010 Author Share Posted June 22, 2010 Hey, thanks for the suggestion. I'll give it a shot tomorrow and see if switching themes makes a difference. You're right about hard coding it into the header.tpl file not being pretty but I ended up doing that for the time being and it works as an easy fix. Would be nice to know how that css_uri works and where it can be found though. Link to comment Share on other sites More sharing options...
bartman Posted June 22, 2010 Share Posted June 22, 2010 As far as I understand and my smarty knowledge is a bit sketchy here{$css_uri}is generatedfrom the following code {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach} I think $css_files comes from header.phphttp://www.smarty.net/manual/en/language.function.foreach.phphas some detail on smarty for each loops and keys + itemshope this helped in a little way Link to comment Share on other sites More sharing options...
bartman Posted June 22, 2010 Share Posted June 22, 2010 figured a bit more how this worksin header.php $css_files[_THEME_CSS_DIR_.'global.css'] = 'all'; sets the location of global cssnow looking at category.phpthis line adds the css needed for category.php$css_files = array(__PS_BASE_URI__.'css/jquery.cluetip.css' => 'all', _THEME_CSS_DIR_.'scenes.css' => 'all');so $cssfiles would now be an array containing three locations of css fileswhich is then translated into html by the foreach loop in header.tplso infact $css_uri is not an actual definition but the location is controlled by _THEME_CSS_DIR_this is defined in defines.inc.php in 1.3.1 Link to comment Share on other sites More sharing options...
pedrodonkey Posted June 23, 2010 Author Share Posted June 23, 2010 Hey bartman, You pointed me in the right direction. Can't believe i didn't browse through the header.php file before! The path to the CSS file was set to the URL i posted above by default. IT must have happened when i installed PS using the temp URL 188.65.112.140/~neontech/ whilst the domain name was in the process of being transferred. Thanks for clearing up how CSS files are defined in PS. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now