Swedge Posted September 16, 2011 Share Posted September 16, 2011 Bonjour, Dans le module blockuserinfo, j'ai voulu insérer la valeur "livraison gratuite dans x €". Donc, dans le fichier blockuserinfo.php, j'ai mis ces lignes de code : $summary = $params['cart']->getSummaryDetails(); $total_free_ship = 0; if ($free_ship = Tools::convertPrice(floatval(Configuration::get('PS_SHIPPING_FREE_PRICE')), new Currency(intval($params['cart']->id_currency)))) { $discounts = $params['cart']->getDiscounts(); $total_free_ship = $free_ship - ($summary['total_products_wt'] + $summary['total_discounts']); foreach ($discounts as $discount) if ($discount['id_discount_type'] == 3) { $total_free_ship = 0; break ; } $smarty->assign('free_ship', $total_free_ship); } Puis dans blockuserinfo.tpl {if $free_ship > 0 AND !$isVirtualCart} <p class="cart_free_ship ajax_cart_free_shipping">{l s='Free delivery in' mod='blockuserinfo'} {displayPrice price=$free_ship}</p> {else} <p class="cart_free_ship ajax_cart_free_shipping">{l s='Free delivery' mod='blockuserinfo'}</p> {/if} J'utilise aussi le module modalcart (module de panier pop-up), toutes les valeurs s'actualisent (quantité, prix total), et la valeur avec la livraison gratuite ne s'actualise pas. Est ce que quelqu'un aurait une solution? Je pense que c'est un code en javascript à rajouter... Merci breaucoup Link to comment Share on other sites More sharing options...
Swedge Posted September 19, 2011 Author Share Posted September 19, 2011 Alors quelqu'un aurait une solution svp? 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