pitchart Posted December 20, 2015 Share Posted December 20, 2015 (edited) Bonjour Je suis sous 1.6.1.3 et j'aimerais savoir comment remplacer le bouton ''Ajouter au Panier'' par le bouton ''Aperçu'' tout en gardant l'aspect du bouton ''Ajouter au panier'', voir pièces jointes. Je me doute bien que sa doit bien être dans product-list.tpl..... je pense que c'est sur la partie du code que j'ai mis en bas où cela se joue non ? Merci <div class="button-container fly_3 clearfix"> {if isset($FIELD_quickView) && $FIELD_quickView || !isset($FIELD_quickView)} <a class="quick-view grid" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}"> <span class="wrap_bg"> <i class="icon-search"></i> <span class="wrap_text">{l s='quick view'}</span> </span> </a> {/if} <div class="tab_button"> {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <a class="exclusive button ajax_add_to_cart_button title_font " href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}"> <span class="wrap_bg"> <i class="icon-shopping-cart icon-0x icon-mar-lr2"></i> <span class="wrap_text">{l s='Add to cart'}</span> </span> </a> {else} <a class="exclusive ajax_add_to_cart_button " href="{$link->getPageLink('cart',false, NULL, 'add=1&id_product={$product.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" data-id-product="{$product.id_product|intval}"> <span class="wrap_bg"> <i class="icon-shopping-cart icon-0x icon-mar-lr2"></i> <span class="wrap_text">{l s='Add to cart'}</span> </span> </a> {/if} {else} <a href="#" class="exclusive button ajax_add_to_cart_button title_font"> <span class="wrap_bg"> <i class="icon-bitbucket icon-0x icon-mar-lr2"></i> <span class="wrap_text">{l s='Out of stock'}</span> </span> </a> {/if} {/if} Edited December 25, 2015 by pitchart (see edit history) Link to comment Share on other sites More sharing options...
YopixelAE Posted December 20, 2015 Share Posted December 20, 2015 (edited) Bonjour, Passez en commentaire l'actuel bouton add-to-cart puis insérer un nouvel élément (<a + texte) en lui affectant la Class CSS "exclusive" (permettant le rendu visuel) et la Class "quick-view" + attributs rel / href (permettant l’événement aperçu) (et passez en commentaire l'actuel élément (<a>) portant la Class "quick-view". Ceci pour le template par défaut (le votre n'est pas visible). Edited December 21, 2015 by Yopixel (see edit history) Link to comment Share on other sites More sharing options...
pitchart Posted December 20, 2015 Author Share Posted December 20, 2015 Désoler mes connaissances ne sont pas assez poussé pour comprendre ton message. Link to comment Share on other sites More sharing options...
YopixelAE Posted December 21, 2015 Share Posted December 21, 2015 (edited) <div class="tab_button"> {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <!-- <a class="exclusive button ajax_add_to_cart_button title_font " href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}"> <span class="wrap_bg"> <i class="icon-shopping-cart icon-0x icon-mar-lr2"></i> <span class="wrap_text">{l s='Add to cart'}</span> </span> </a> --> <a class="exclusive quick-view" rel="..." href='...'> <span class="wrap_bg"> <span class="wrap_text">{l s='View'}</span> </span> </a> {else} <!-- <a class="exclusive ajax_add_to_cart_button " href="{$link->getPageLink('cart',false, NULL, 'add=1&id_product={$product.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" data-id-product="{$product.id_product|intval}"> ... </a> --> <a class="exclusive quick-view" rel="..." href='...'> <span class="wrap_bg"> <span class="wrap_text">{l s='View'}</span> </span> </a> {/if} {else} <!-- <a href="#" class="exclusive button ajax_add_to_cart_button title_font"> <span class="wrap_bg"> <i class="icon-bitbucket icon-0x icon-mar-lr2"></i> <span class="wrap_text">{l s='Out of stock'}</span> </span> </a> --> <a class="exclusive quick-view" rel="..." href='...'> <span class="wrap_bg"> <span class="wrap_text">{l s='View'}</span> </span> </a> {/if} {/if} Edited December 21, 2015 by Yopixel (see edit history) Link to comment Share on other sites More sharing options...
pitchart Posted December 21, 2015 Author Share Posted December 21, 2015 Merci je vais test de suite. Link to comment Share on other sites More sharing options...
pitchart Posted December 21, 2015 Author Share Posted December 21, 2015 Non pas ça, voilà en pièce jointe ce que cela rend Link to comment Share on other sites More sharing options...
YopixelAE Posted December 21, 2015 Share Posted December 21, 2015 (edited) Vérifiez dans un premier temps que l’aperçu fonctionne. Si le design n'est pas bon, mettez le "exclusive" sur le <a> parent du <span>. Ou postez une url vers votre template, ce sera beaucoup + pratique. Edited December 21, 2015 by Yopixel (see edit history) Link to comment Share on other sites More sharing options...
pitchart Posted December 21, 2015 Author Share Posted December 21, 2015 Yes je viens de t'envoyer en mp. Link to comment Share on other sites More sharing options...
YopixelAE Posted December 21, 2015 Share Posted December 21, 2015 (edited) Le visuel est attaché à une sélection trop précise, comprenant notamment la class spécifique du bouton ajout au panier ".left-block .button-container .tab_button .button.ajax_add_to_cart_button". Récupérez les valeurs CSS correspondantes et affectez les par exemple à une class "full_view" qui vous donnerez à la nouvelle balise. Ajoutez "quick-view" et reprenez les attributs rel et href de la balise initiale (plus haut dans votre product-list.tpl) (sinon vous n'aurez pas l'aperçu). Edited December 21, 2015 by Yopixel (see edit history) 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