Antoniox Posted May 17, 2016 Share Posted May 17, 2016 Hola, a ver si podéis ayudarme, mis conocimientos son muy limitados. En el producto, en su ficha técnica se me muestras todas las características del producto. Pues me gustaría que no se mostrasen 2 caracteristicas concretas con id 5 y 6. parte del product.tpl que hace que se muestren las features: {if isset($features) && $features} <div id="idTab2" class="product_accordion block_hidden_only_for_screen"> <!-- product's features --> <a href="javascript:;" class="opener"> </a> <div class="product_accordion_title"> {l s='Data sheet'} </div> <div class="pa_content"> <table class="table-data-sheet table-bordered"> {foreach from=$features item=feature} <tr class="{cycle values="odd,even"}"> {if isset($feature.value)} <td>{$feature.name|escape:'html':'UTF-8'}</td> <td>{$feature.value|escape:'html':'UTF-8'}</td> {/if} </tr> {/foreach} </table> </div> </div> {/if} ¿Sabéis que tendría que poner para excluir estas dos características? Saludos Link to comment Share on other sites More sharing options...
Code-Plus Posted May 18, 2016 Share Posted May 18, 2016 Buenas, y no las puedes borrar y ya está? Saludos Link to comment Share on other sites More sharing options...
ventura Posted May 18, 2016 Share Posted May 18, 2016 Puedes excluir mediante codigo, utilizando el id de la caracteristicas, para excluir en todas en esas que necesitas, seria algo asi {if isset($features) && $features} <div id="idTab2" class="product_accordion block_hidden_only_for_screen"> <!-- product's features --> <a href="javascript:;" class="opener"> </a> <div class="product_accordion_title"> {l s='Data sheet'} </div> <div class="pa_content"> <table class="table-data-sheet table-bordered"> {foreach from=$features item=feature} {if $feature.id_feature == 5 || $feature.id_feature == 6 } <tr class="{cycle values="odd,even"}"> {if isset($feature.value)} <td>{$feature.name|escape:'html':'UTF-8'}</td> <td>{$feature.value|escape:'html':'UTF-8'}</td> {/if} </tr> {/if} {/foreach} </table> </div> </div> {/if} Link to comment Share on other sites More sharing options...
Antoniox Posted May 18, 2016 Author Share Posted May 18, 2016 (edited) Edito: No me funciona, bueno, primero probé en local y si me funcionó, pero en web me da error 500. ¿por qué puede ser? Saludos Edited May 18, 2016 by Antoniox (see edit history) Link to comment Share on other sites More sharing options...
Antoniox Posted May 21, 2016 Author Share Posted May 21, 2016 ¿Alguna idea de por qué no funciona?, Saludos. Link to comment Share on other sites More sharing options...
buhoplace Posted May 21, 2016 Share Posted May 21, 2016 ve a config/defines.inc.php; define('_PS_MODE_DEV_', true); define('_PS_DEBUG_PROFILING_', true); pon estas variables a true, recarga la pagina de producto, mira donde esta el error. Link to comment Share on other sites More sharing options...
Antoniox Posted May 23, 2016 Author Share Posted May 23, 2016 Hola, me da el siguiente error: Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "C:\xampp\htdocs\ntapliances\themes\nt-appliances\product.tpl" on line 230 "{/foreach}" unclosed {if} tag <-- thrown inC:\xampp\htdocs\ntapliances\tools\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 230 Link to comment Share on other sites More sharing options...
Antoniox Posted June 22, 2016 Author Share Posted June 22, 2016 ¿Alguna idea de lo que puede ser? Saludos Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now