Le prix est égal ? 0,00

28 posts in this topic

Posted · Report post

J'ai réussi !!!!! :) :) :) regardez la KAWASAKI VN Classic 900, elle affiche "vendu !" à la place de 0.00€ :)

http://www.lerupteur...at-motos-1.html

J'ai fait mes modifs entre la ligne 560 et 571 du fichier display_product.php

Comment j'ai procédé :

j'ai fait un var_dump sur la méthode

"$product_object->get_final_price(get_current_user_promotion_percentage(), $with_taxes, $reseller_mode, true, $display_with_vat_symbol)"

pour voir le résultat qu'elle retournait car ce n'était pas un chiffre (impossible de tester si < 1).

J'ai donc vu quand quand le prix est à zero, cette méthode retourne exactement " 0,00 € "

J'ai donc fait le test sur ce résultat pour savoir si je dois afficher "Vendu !" ou le prix :)

Cela donne :

$wt_test = $product_object->get_final_price(

get_current_user_promotion_percentage(),

$with_taxes,

$reseller_mode,

true,

$display_with_vat_symbol);

$wt_recherche = " 0,00 € ";

if ($wt_test == $wt_recherche) $wt_prix = "Vendu !";

else $wt_prix = $wt_test;

Merci pour vos conseils !

Négoce? Mr Simon? Cela vous convient comme explication? :)

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

et ton code modifie tout le site ou juste certains emplacement ?

RSS, fiche produit, accueil..

j'ai du faire page par page..

à plus..

Share this post


: post
Share on other sites

Posted · Report post

Cela modifie tous les produits des pages catégorie.

Du moments que tu met son prix à zero, vela affichera vendu

Share this post


: post
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

Twitter Advisto ecommerce

Facebook PEEL Shopping