stephforum Posted August 13, 2011 Share Posted August 13, 2011 Bonjour, avec prestashop 1.3, les champs reduction_price , reduction_percent, reduction_from et reduction_to etait dans la "table product" mais, depuis la 1.4, ceux-ci se retrouve dans une nouvelle table, la "specific_price" et du coup, je n'arrive pas à faire le "raccord" dans mon bout de code entre ces deux tables mon bout de code en 1.3 etait : { if($product['reduction_percent']<>0 && $product['reduction_price']==0 && date('Y-m-d ') <= $product['reduction_to'] or $product['on_sale']>0 ){ $price_final=$product['price']*(1.0-($product['reduction_percent']/100.0)) * (1 + $product['tax_rate'] / 100); $product['price_inc'] = number_format(round($price_final,2),2,".",""); } je l'ai modifié pour la version 1.4 comme ceci mais, il doit me manquer un bout pouvant permettre la liaison, voici le code en cours de modif : { if($specific_price['reduction_type']<>0 && $specific_price['reduction']==0 && date('Y-m-d ') <= $specific_price['to'] or $product['on_sale']>0 ){ $price_final=$product['price']*(1.0-($specific_price['reduction']/100.0)) * (1 + $product['tax_rate'] / 100); $product['price_inc'] = number_format(round($price_final,2),2,".",""); } Auriez vous une sugestion ? Merci beaucoup pour votre aide Steph Link to comment Share on other sites More sharing options...
stephforum Posted August 13, 2011 Author Share Posted August 13, 2011 J'ai trouvé Il suffisait de remplacer mon vieux bout de code par celui-ci trouvé dans un autre fichier : $price_final = Product::getPriceStatic($product['id_product'],true,NULL,2); Il existe un endroit ( forum ou tuto) ou l'on pourai trouver ce genre de code racourci indiquant la fonction ? Cela pourait etre pratique pour les p'tits "bricolo" comme moi Link to comment Share on other sites More sharing options...
lozit Posted January 5, 2012 Share Posted January 5, 2012 Salut, moi je cherche à faire apparaitre reduction_from et reduction_to si quelqu'un a une idée 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