merlette Posted May 22, 2015 Share Posted May 22, 2015 (edited) Bonjour, Je voudrais rajouter une phrase de texte au dessus d'Ajouter à mon panier, dans la fiche produit. J'ai donc modifié le fichier product.tpl. http://www.traduction-assermentee-officielle.com/index.php?id_product=8&controller=product voici le code rajouté : <div class="box-cart-bottom"> <div>{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if} <!-- Ajout code pour Attention --> <img src="img/iconeAttention3.gif" width="35" height="32" alt="Attention" class="attention"/> <p class="texteAttention"> {l s='Vous devez <strong>envoyer vos fichiers</strong> à traduire avant d'Ajouter au panier.' mod='blockcart'}</p> <!-- Fin ajout code pour Attention --> <p id="add_to_cart" class="buttons_bottom_block no-print"> <button type="submit" name="Submit" class="exclusive"> <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span> </button> </p> </div> Et ça ne fonctionne pas.. ça plante l'accès à la page. Alors que si je note ça en 'dur', comme ça : <p class="texteAttention">Vous devez <strong>envoyer vos fichiers</strong> à traduire avant d'Ajouter au panier.</p> Ca fonctionne Quelqu'un sait-il quelle est l'erreur dans ce bout de code qui fait tout planter ??? Je suis allée ds localisation/modules installés/blockcart, et je ne vois pas mon texte non plus.. Merci! Edited May 22, 2015 by merlette (see edit history) Link to comment Share on other sites More sharing options...
heldz Posted May 22, 2015 Share Posted May 22, 2015 As-tu déjà essayé d'enlever les tags html? Link to comment Share on other sites More sharing options...
merlette Posted May 22, 2015 Author Share Posted May 22, 2015 Les balises de commentaires tu veux dire ? Oui, je viens d'essayer en ne laissant que : <img src="img/iconeAttention3.gif" width="35" height="32" alt="Attention" class="attention"/> <p class="texteAttention"> {l s='Vous devez <strong>envoyer vos fichiers</strong> à traduire avant d'Ajouter au panier.' mod='blockcart'}</p> et ça continue de planter la page.. alors que ça, c'est ok : <img src="img/iconeAttention3.gif" width="35" height="32" alt="Attention" class="attention"/> <p class="texteAttention">Vous devez <strong>envoyer vos fichiers</strong> à traduire avant d'Ajouter au panier.</p> mais du coup, pour une éventuelle localisation, ça ne va pas.. Link to comment Share on other sites More sharing options...
heldz Posted May 22, 2015 Share Posted May 22, 2015 (edited) J'ai trouvé ton problème: c'est l'apostrophe du verbe ajouter. Solution: tu dois mettre un slash avant l'apostrophe pour qu'il interprète comme tel. {l s='Vous devez envoyer vos fichiers à traduire avant d\'Ajouter au panier.' } Edited May 22, 2015 by heldz (see edit history) Link to comment Share on other sites More sharing options...
merlette Posted May 22, 2015 Author Share Posted May 22, 2015 Ah ok.. Hélas, ce n'est pas ça non plus le problème. Je viens de mettre ça en ligne : <div>{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if} <!-- Ajout code pour Attention --> <img src="img/iconeAttention3.gif" width="35" height="32" alt="Attention" class="attention"/> <p class="texteAttention"> {l s='Vous devez envoyer vos fichiers à traduire avant d'Ajouter au panier.' mod='blockcart'}</p> <!-- Fin ajout code pour Attention --> <p id="add_to_cart" class="buttons_bottom_block no-print"> <button type="submit" name="Submit" class="exclusive"> <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span> </button> </p> </div> Ca plante la page. Si je mets ça : <div>{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if} <!-- Ajout code pour Attention --> <img src="img/iconeAttention3.gif" width="35" height="32" alt="Attention" class="attention"/> <p class="texteAttention">Vous devez <strong>envoyer vos fichiers</strong> à traduire avant d'Ajouter au panier.</p> <!-- Fin ajout code pour Attention --> <p id="add_to_cart" class="buttons_bottom_block no-print"> <button type="submit" name="Submit" class="exclusive"> <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span> </button> </p> </div> C'est ok, cf http://www.traduction-assermentee-officielle.com/index.php?id_product=8&controller=product C'est fou, c'est bien écrit comme cela d'habitude pourtant.. Et mon texte n'apparait pas ds le module blockcart de localisation. Link to comment Share on other sites More sharing options...
heldz Posted May 22, 2015 Share Posted May 22, 2015 J'ai testé et ça marche! Copy ce code: <div>{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if} <!-- Ajout code pour Attention --> <img src="img/iconeAttention3.gif" width="35" height="32" alt="Attention" class="attention"/> <p class="texteAttention"> {l s='Vous devez envoyer vos fichiers à traduire avant d\'Ajouter au panier.' mod='blockcart'}</p> <!-- Fin ajout code pour Attention --> <p id="add_to_cart" class="buttons_bottom_block no-print"> <button type="submit" name="Submit" class="exclusive"> <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span> </button> </p> </div> Link to comment Share on other sites More sharing options...
merlette Posted May 22, 2015 Author Share Posted May 22, 2015 Yessss! mais oui, c'était à cause de l'apostrophe... Merci beaucoup!! 1 Link to comment Share on other sites More sharing options...
heldz Posted May 22, 2015 Share Posted May 22, 2015 Tu dois marquer ton post comme "résolu" Link to comment Share on other sites More sharing options...
merlette Posted May 22, 2015 Author Share Posted May 22, 2015 Il faut cliquer sur Mark Solved c'est ça ? Link to comment Share on other sites More sharing options...
heldz Posted May 22, 2015 Share Posted May 22, 2015 Oui tout a fait! Link to comment Share on other sites More sharing options...
Oron Posted March 7, 2016 Share Posted March 7, 2016 Tu dois marquer ton post comme "résolu" Il faut cliquer sur Mark Solved c'est ça ? Oui tout a fait! Bonjour Oui mais le post qui donne la bonne réponse et pas n'importe quel post donc je suppose ce que heldz a proposé a résolu le problème donc c'est son post qui devrait être marqué meilleur réponses. Je corrige. 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