سؤال

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?

هل كانت مفيدة؟

المحلول 2

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}

نصائح أخرى

You can get the absolute path to the shop with {$smarty.const._PS_ROOT_DIR_}

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top