ccc

Mostrando entradas con la etiqueta Prestashop Smarty. Mostrar todas las entradas
Mostrando entradas con la etiqueta Prestashop Smarty. Mostrar todas las entradas

request_uri y strpos en un fichero smarty de Prestashop

{if strpos($smarty.server.REQUEST_URI, 'gb') != false}
I accept the legal notice and <a href="http://midominio.com/es/content/2-aviso-legal-politica-privacidad" target="_blank" style="margin-left:4px;" >privacy policy</a>
{else}
Acepto el aviso legal y la <a href="http://midominio.com/es/content/2-aviso-legal-politica-privacidad" target="_blank" style="margin-left:4px;" >política de privacidad</a>
{/if}

Prestashop Smarty: Incluir código PHP en plantillas TPL

 En el prestashop modificar el fichero:
config/smarty.config.inc.php:

#require_once(_PS_SMARTY_DIR_.'Smarty.class.php');
require_once(_PS_SMARTY_DIR_.'SmartyBC.class.php');
 ...
#$smarty = new SmartyCustom();
$smarty = new SmartyBC();

Y ya en cualquier TPL para escribir php:

{php}
...
{/php}