Jump to content

Message "Montant à atteindre pour avoir le port gratuit"


Recommended Posts

Bonjour,

 

J'ai trouvé un script à intégrer dans le récapitulatif du panier avant de valider la commande client qui affiche le montant à ajouter en achat pour obtenir le port gratuit.

Cela fonctionne nickel mais j'ai un soucis, quand le produit bénéficie du port gratuit par défaut, le message s'affiche quand-même.

 

Modification à faire dans votre_theme/default/shopping-cart.tpl :

cherchez la ligne

<div id="HOOK_SHOPPING_CART">{$HOOK_SHOPPING_CART}</div>

et intégrez le script suivant juste avant cette ligne :

{* Specify the amount needed for a Free Shipping *}
{assign var='freeshipping_price' value=Configuration::get('PS_SHIPPING_FREE_PRICE')}
{if $freeshipping_price}
    {assign var='freeshipping_price_converted' value={toolsConvertPrice price=$freeshipping_price[spam-filter]
    {math equation='a-b' a=$total_price b=$total_shipping assign='total_without_shipping'}
    {math equation='a-b' a=$freeshipping_price_converted b=$total_without_shipping assign='remaining_to_spend'}
 
    {if $remaining_to_spend > 0}
		<h2>{l s='Obtenez le Port Gratuit pour cette commande !!'}</h2>
        <p><strong>{l s='Obtenez votre livraison gratuite en augmentant votre commande de'} {convertPrice price=$remaining_to_spend}</strong></p>
    {/if}
{/if}

3 soucis :

1) Le montant à atteindre n'est pas rafraichit automatiquement quand on change le nombre d'article dans le panier.

2) Le script reste visible quand l'article bénéficie du port gratuit par défaut.

3) Les accents dans le texte à afficher rendent le texte non visible

 

2014-12-14_1532.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...