VL10 Posted February 21, 2014 Share Posted February 21, 2014 Bonjour à tous, J'ai un soucis avec mon bouton "Ajouter au panier" dans la page product.tpl alors que dans la page product-list.tpl il marche niquel, quelqu'un aurait une idée ? Merci Viktor Link to comment Share on other sites More sharing options...
VL10 Posted February 21, 2014 Author Share Posted February 21, 2014 mon code dans product-list.tpl <div class="clear noneclass"></div> {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="ajax_add_to_cart_button exclusive btn_add_cart" 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>{l s='Add to cart'}</span> </a> {else} <a class="ajax_add_to_cart_button exclusive btn_add_cart" 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>{l s='Add to cart'}</span> </a> {/if} {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if} <a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> </div> Link to comment Share on other sites More sharing options...
VL10 Posted February 21, 2014 Author Share Posted February 21, 2014 ùmon code dans product.tpl (celui qui ne fonctionne pas!) <p id="add_to_cart" class="buttons_bottom_block"> <a class="exclusive" href="javascript:document.getElementById('add2cartbtn').click();"> <span>{l s='Add to cart'} </span></a> <input id="add2cartbtn" type="submit" name="Submit" value="{l s='Add to cart'}" /> </p> Link to comment Share on other sites More sharing options...
Bulles et Paillettes Posted March 8, 2014 Share Posted March 8, 2014 Juste pour te remercier d'avoir poster ton code pour le product-list.tpl,il m'a permis d'ajouter un bouton fonctionnel sur mon site. 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