Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Convertir Smarty a Javascript

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish
View previous topic :: View next topic  
Author Message
darktower777
Smarty n00b


Joined: 22 Aug 2012
Posts: 1

PostPosted: Wed Aug 22, 2012 8:15 am    Post subject: Convertir Smarty a Javascript Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP