mass43 Posted March 4, 2013 Share Posted March 4, 2013 (edited) Bonjour, Tout est dans le titre. Sur la product-list.tpl est-il possible de remplacer le bouton "ajouter au panier" par "personnaliser", et de changer le lien pour pointer vers le produit, dans le cas où un produit est personnalisable. Ce remplacement de bouton s'effectue déjà si les quantités sont nulles, le bouton est changé en "voir le produit". Merci pour votre aide ! Voici mon code : {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="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", true)}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", true)}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {/if} {else} <a class="button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {/if} {else} <a class="button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {/if} Edited March 10, 2013 by mass43 (see edit history) Link to comment Share on other sites More sharing options...
Bondaty and Co Posted March 5, 2013 Share Posted March 5, 2013 (edited) - Edited March 5, 2013 by Muche (see edit history) Link to comment Share on other sites More sharing options...
Tibo Tel Posted March 5, 2013 Share Posted March 5, 2013 Salut, Je souhaite faire exactement la même chose....et là je sèche aussi. Quelqu'un à la solution ? Merci d'avance ! Link to comment Share on other sites More sharing options...
Bondaty and Co Posted March 6, 2013 Share Posted March 6, 2013 Cela devrait faire l'affaire {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)} {if $product.customizable == 1} <a class="exclusive" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='Customized'}">{l s='Customized'}</a> {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {/if} {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", false)} title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {/if} {else} <a class="exclusive" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> {/if} {/if} Link to comment Share on other sites More sharing options...
mass43 Posted March 9, 2013 Author Share Posted March 9, 2013 Parfait, merci beaucoup pour votre aide !!! 1 Link to comment Share on other sites More sharing options...
Bondaty and Co Posted March 10, 2013 Share Posted March 10, 2013 Merci de passer le post en résolu Link to comment Share on other sites More sharing options...
Tibo Tel Posted March 15, 2013 Share Posted March 15, 2013 C'est niquel, merci beaucoup. 1 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