|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
darktower777 Smarty n00b
Joined: 22 Aug 2012 Posts: 1
|
Posted: Wed Aug 22, 2012 8:15 am Post subject: Convertir Smarty a Javascript |
|
|
Hola, soy nuevo en el foro y prácticamente en Smarty y Java (im a loser). Suelo trabajar en PHP.
Estoy implementando una tienda online (Prestashop 1.4.7.3) y tiene archivos .tpl que contienen código en Smarty.
He añadido opciones con JavaScript (entre {literal}{/literal}) y funcionan perfectamente.
Ahora quiero poner dentro de una función java parte de código Smarty, concretamente un bucle para extraer y usas las variables, pero no se como convertir la nomenclatura Smarty a JavaScript.
El bucle es este:
{foreach from=$ordered_features item=feature}
{$feature.name|escape:'htmlall':'UTF-8'}
{foreach from=$products item=product name=for_products}
{assign var='product_id' value=$product->id}
{assign var='feature_id' value=$feature.id_feature}
{if isset($product_features[$product_id])}
{assign var='tab' value=$product_features[$product_id]}
{$tab[$feature_id]|escape:'htmlall':'UTF-8'}
{/if}
{/foreach}
{/foreach}
Cualquier idea, tutorial o hilo por donde tirar será muy bien recibido.
Mil gracias!!! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|