Display any Smarty template file directly from your PrestaShop module or controller for custom output rendering.

PrestaShop provides the Smarty engine through $this->context->smarty which can display or fetch any template file.

Walkthrough

// display it right away
$tpl = _PS_ALL_THEMES_DIR_ . "/my_theme/templates/index.tpl";
$this->context->smarty->display($tpl);
// or use it as html
$tpl = _PS_ALL_THEMES_DIR_ . "/my_theme/templates/index.tpl";
$html = $this->context->smarty->fetch($tpl);
echo $html;