Office56 Posted February 27, 2014 Share Posted February 27, 2014 Bonjour, Je souhaiterai savoir s'il était possible de changer le background du panier en fonction du nombre d'article que l'on a ajouté ? J'essaye de faire quelque chose en SMARTY mais je ne parviens à aucun résultat. Voici ce que j'essaye : <!-- Block user information module HEADER --> <div id="header_user" {if $PS_CATALOG_MODE}class="header_user_catalog"{/if}> <ul id="header_nav"> {if !$PS_CATALOG_MODE} <!-- CONDITION BACKGROUND DIFFERENT --> <li {if $cart_qties > 0} id="shopping_cart" {else} id="shopping_cart_2 {/if}> <!-- CONDITION BACKGROUND DIFFERENT --> <a href="{$link->getPageLink($order_process, true)|escape:'html'}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">{l s='Cart' mod='blockuserinfo'} <span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span> <span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span> <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span> <span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}"> {if $cart_qties > 0} {if $priceDisplay == 1} {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant} {convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)} {else} {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant} {convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)} {/if} {/if} </span> <span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='(empty)' mod='blockuserinfo'}</span> </a> </li> Merci d'avance pour vos réponses ! Link to comment Share on other sites More sharing options...
Mediacom87 Posted February 27, 2014 Share Posted February 27, 2014 Bonjour, il faut faire cela en javascript 1 Link to comment Share on other sites More sharing options...
Office56 Posted February 27, 2014 Author Share Posted February 27, 2014 Merci pour ta réponse. Aurais tu des exemples ? Ou pourrais tu me l'expliquer ? 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