Presta make autoredirect from (no SSL with www to SSL with www)
http://www.domain.com/* to https://www.domain.com/* //and it's OK
and from (SSL without www to SSL with www)
https://domain.com/* to https://www.domain.com/* //and it's OK
and from (no SSL without www to SSL with www)
http://domain.com/* I expect the same result like two above examples - https://www.domain.com/*
but it isn't
example:
http://mydomain.com/category/123-product-name.html
redirect me to
https://www.mydomain.com//category/123-product-name.html
it's give me 404 page because there are double slashes after "mydomain.com" even if I put after (below) line "# ~~end~~ Do not remove this comment [...]" my own htaccess rules like this:
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^ https://www.mydomain.com%{REQUEST_URI} [L,R=301]
Still the same. And this piece of code is right, even on .htaccess test tool http://htaccess.mwl.be/ everything is OK - see https://www.dropbox.com/s/ns4238dmvwupinu/htaccess_Tester.png?dl=0 Maybe I'm wrong but I think the redirect rules are right so maybe something wrong on Presta side?
First of all thank you for your answer. Very helpful for me.
1. I was reading documentation but I had to miss this one
2. one thing - you said:
"But one thing to mention, hookheader is for linking css and js files."
you right but if I want to add something to HEAD section for example additional meta tags I can use hookDisplayHeader and my template will rendered in HEAD section.
Any way Thank you once again
Presta 1.6, my test module is installed and assign to displayHeader in BO
I know how to assign variable to hook but now I want to assign variable to my template
/modules/myModule/views/templates/front/myView.tpl
inside myView.tpl is:
{$myVariable}
and now I want into Header hook display my view where I can use {$myVariable}
this give my only opportunity display {$myVariable} into general header.tpl:
public function hookHeader()
{
$this->context->smarty->assign(array(
'myVariable' => 'myText'
));
}
but how assign my variable to my template and display it through {$HOOK_HEADER} in header.tpl?
Can someone explain me why according to many tutorials when I want to assign variable to hook I should do like this:
for example inside the public function hookHeader()
$this->smarty->assign(array(
'myvariable' => 'mytext'
));
but it doesn't works for me BUT works for me when I make like this:
global $smarty;
$smarty->assign(array(
'myvariable' => 'mytext'
));
Any ideas?
Thanks guys! Of course you were right! This site it's my client site and I assumed that all installed languages have full translation. I was wrong. The choosen language was totaly empty inside translation module - and that was the reason!
Anyway - thank's once again and Happy Easter.
Other languages are disabled. Default language is set. But still in FO is english.
I don't know why. Look at this answer there is described order for choosing users language.
cookie
browser language
default shop language
That's why I need to avoid cookie and browser language.
Maybe I need change something in some settings files or file?
Hi all
How to force front office language. I don't talking about set default language becouse it's done already. But not matter what language is set to default in front office I have english.
So the question is whare I have to change somethig (in which files) to force one of my installed languages in front office. Force it's mean don't care what is in cookie or what is browser language.
It's impossible! You have to do something wrong. Of course if we talking only about home page. It's only works for home page not for category products listing page.
You absolutly right, becouse if you make this theme for you it's doesn't matter but if you want, for example, sell this theme it's problem becouse you don't know absolute path of your future client server.
I read somewhere if you overwrite the tpl file from some folder in modules/ you can make in your theme folder folder modules and subfolder with module and there copy tpl file and try: {include file=$tpl_dir./modules/blocksearch/blocksearch.tpl}