Jump to content

[solved] how to get site baseurl?

Nishith Nesdiya

Recommended Posts



Use following code:


global $smarty;




global $smarty;






i need to get the site baseurl in my custom modules.

how can i get the baseurl in my custom modules?

i am using the PS


can anyone help me solve this problems......



  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

okay. thanks for confirmation

im going to mark this topic as [solved]


best regards

я не совсем вкурил, что и где надо поменять что бы по умолчанию был домен https ? 

- сертификат установил, вижу в настройках nginx появилось 2 строчки 

ssl_certificate /var/www/httpd-cert/site/site.com.chained.crt;
ssl_certificate_key /var/www/httpd-cert/site/site.com.key;

в настройках админки включена безопасность, по ссылке в админке перехожу - всё работает,

но по умолчанию обычный http адрес стоит

Link to comment
Share on other sites

  • 5 months later...
  • 7 months later...

Hey, I moddified "classes / Mail.php" addin one line to be able to use at templates a variable whis is the domain. But it appear 2 times instead of one.

$template_vars['{shop_inurl}'] = Tools::getHttpHost(false)._PS_BASE_URL_;

It appears like "mydomain.eshttp://mydomain.es"

But if I use this:

$template_vars['{shop_inurl}'] = Tools::getHttpHost(false).__PS_BASE_URI__;

It appears like "mydomain.es/" so I can't use it for emails for example "info@{shop_inurl}" or it will show "[email protected]/"

I think I may use _PS_BASE_URL_ but without the doubled url

Edited by rubenlodi (see edit history)
Link to comment
Share on other sites

  • 1 year later...
  • 9 months later...
  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...