Can any one help me? I need document_root variable value in tpl page. I am using presta shop as framework. Is there any way to get it?
Asked
Active
Viewed 2,705 times
1
-
please explain your purpose, and i may be able to help you and give you a way to use native prestashop code. – Altaf Hussain Jan 29 '14 at 13:01
2 Answers
4
You can get the absolute path to the shop with {$smarty.const._PS_ROOT_DIR_}

romainberger
- 4,563
- 2
- 35
- 51
3
You will need to assign a smarty variable in a Prestashop hook for that
$this->context->smarty->assign('document_root', $_SERVER['DOCUMENT_ROOT'])
Use it like this in your tpl file.
{$document_root}

Vikas Singhal
- 811
- 1
- 9
- 17