m.notheber Posted July 25, 2014 Share Posted July 25, 2014 (edited) Bonjour à tous, Je viens vers vous après avoir cherché partout une solution à mon problème. Je souhaite personnaliser la page "shopping-cart-product-line.tpl" et conserver le bouton "delete" qui permet de supprimer le produit du panier. Cependant, il n’apparaît pas. Cela doit être dû à ces lignes de code : {if (!isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0) && empty($product.gift)} <div> <a rel="nofollow" title="{l s='Delete'}" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$token_cart}")|escape:'html':'UTF-8'}"><i class="icon-trash"></i></a> </div> {else} La condition "!isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0)" pose problème. A quoi correspond-elle ? Dois-je activer quelques choses dans le backoffice ?Si j'enlève cette condition, le bouton apparaît, l'animation de suppression s'effectue bien (ligne supprimée) mais l'action n'est pas exécuté : montant qui reste le même et panier conservé si je rafraîchis la page. Je travaille sur Prestashop 1.6 et mes produits possèdent deux déclinaisons et des personnalisations (boostées avec le module "Personnalisations avancées"). Si vous avez besoin d'autres infos, pas de soucis. J'ai besoin de votre aide. Si une âme charitable aurait un peu de temps à m'accorder, ce serait parfait. A bientôt. Edited July 29, 2014 by m.notheber (see edit history) Link to comment Share on other sites More sharing options...
m.notheber Posted July 25, 2014 Author Share Posted July 25, 2014 Personne pour m'aider ? Si vous avez besoin de plus d'information sur mon problème, n'hésitez pas. Link to comment Share on other sites More sharing options...
m.notheber Posted July 26, 2014 Author Share Posted July 26, 2014 Un petit up, j'ai vraiment besoin d'un petit coup de main, s'il vous plait. Link to comment Share on other sites More sharing options...
m.notheber Posted July 28, 2014 Author Share Posted July 28, 2014 Bonjour, encore un petit up pour ce problème qui persiste. Personne pour m'aider ? Si j'ai oublié quelques précisions, demandez moi. Merci. Link to comment Share on other sites More sharing options...
m.notheber Posted July 28, 2014 Author Share Posted July 28, 2014 Toujours personne ? Bon tant pis, je vais me débrouiller tout seul. Merci quand même. A bientôt. Link to comment Share on other sites More sharing options...
ChDUP Posted July 28, 2014 Share Posted July 28, 2014 commencez par afficher ces 3 conditions pour voir lesquelles renvoient true ou false. Link to comment Share on other sites More sharing options...
m.notheber Posted July 28, 2014 Author Share Posted July 28, 2014 Merci. J'ai affiché les valeurs. $quantityDisplayed = 0 $customizedDatas.$productId.$productAttributeId = array $product.gift est vide. La condition !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0 est donc toujours à false. A quoi correspondent $quantityDisplayed et $customizedDatas.$productId.$productAttributeId ? Merci de vous intéresser à mon problème. Link to comment Share on other sites More sharing options...
ChDUP Posted July 28, 2014 Share Posted July 28, 2014 je ne sais pas mais je regarderai du coté de $quantityDisplayed à votre place. Regardez comment il est defini. Quelles modifications avez-vous effectuées ? Repartez d'un shopping-cart-product-line.tpl de base, et voyez après quelle modif ce bouton n'apparait plus Link to comment Share on other sites More sharing options...
m.notheber Posted July 29, 2014 Author Share Posted July 29, 2014 Alors j'ai continué mes recherches et même en prenant le fichier shopping-cart-product-line.tpl de base, l'erreur est toujours là. Cependant, j'ai remarqué que si j'utilise le fichier shopping-cart.tpl d'origine, cela fonctionne. L'erreur vient du fait que j'utilise des personnalisations et donc deux lignes se créent pour chaque produits dans le panier, et donc il y a deux boutons "delete". Celui pour le produit ne fonctionne pas (d'où le fait qu'il n’apparaît pas). Seul celui sur la ligne personnalisations fonctionne. J'ai donc bidouillé pour faire afficher mon tableau comme je souhaitais (en ne passant plus par shopping-cart-product-line.tpl). Merci beaucoup pour ton aide. 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