LeGhe Posted March 19, 2011 Share Posted March 19, 2011 quantity == 0 && $product->available_later == 'Arrêt commercial') || ($allow_oosp && $product->quantity == 0 && $product->available_later == 'Réimpression en cours') || ($allow_oosp && $product->quantity == 0 && $product->available_later == 'Manquant chez l\'éditeur') || ($allow_oosp && $product->quantity == 0 && $product->available_later == 'Sur commande uniquement')} style="display:none;"{/if} id="add_to_cart" class="buttons_bottom_block"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p> Bonjour,Ce code fonctionne parfaitement en V1.4, sauf lorsqu'il doit gérer un accent :$product->available_later == 'Réimpression en cours' avec champ BDD "available_later" = 'Réimpression en cours' ne fonctionne pas$product->available_later == 'Reimpression en cours' avec champ BDD "available_later" = 'Reimpression en cours' fonctionneComment corriger ce petit défaut, qui n'apparaissait pas dans les V1.3 ?Merci ! Link to comment Share on other sites More sharing options...
Broceliande Posted March 19, 2011 Share Posted March 19, 2011 Ca ressemble à un probleme d'encodage.que donne ($product->available_later|escape:'htmlall':'UTF-8') == 'Réimpression en cours' ?En principe les tpl sont en utf8, alors si jamais la base est en latin... Link to comment Share on other sites More sharing options...
LeGhe Posted March 21, 2011 Author Share Posted March 21, 2011 Cela ne change malheureusement rien, ni tenter le & eacute; ... Link to comment Share on other sites More sharing options...
Broceliande Posted March 21, 2011 Share Posted March 21, 2011 et ça ? $product->available_later|escape:'quotes':'UTF-8' == 'Réimpression en cours' si ça ne marche pas je ferais un test avec {assign var=compare value='Réimpression en cours'} {if $product->available_later|escape:'quotes':'UTF-8' == $compare|escape:'quotes':'UTF-8'} .... Link to comment Share on other sites More sharing options...
LeGhe Posted March 21, 2011 Author Share Posted March 21, 2011 Dans les 2 cas : Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "D:\xampp\htdocs\prestashop/themes/prestashop/product.tpl" on line 297 "<p{if ($allow_oosp && $product->quantity == 0 && ($product->available_later|escape:'quotes':'UTF-8' == 'Arr�t commercial') || ($allow_oosp && $product->quantity == 0 && ($product->available_later|escape:'htmlall':'UTF-8') == 'R�impression en cours') || ($allow_oosp && $product->quantity == 0 && ($product->available_later|escape:'htmlall':'UTF-8') == 'Manquant chez l\'�diteur') || ($allow_oosp && $product->quantity == 0 && $product->available_later == 'Sur commande uniquement')} style="display:none;"{/if} id="add_to_cart" class="buttons_bottom_block"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p>" - Unexpected "}"' in D:\xampp\htdocs\prestash in D:\xampp\htdocs\prestashop\tools\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 431 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