Bonjour PaddyBl et merci pour ta contribution ecotaxe !
Par contre moi j'ai un soucis , j'ai une boutique OSC 2.3, j'ai des bug de prix, surtout dans le panier, les totaux sont bon, mais le détail est faux.
Voila, j'ai installé sppc customers group, dandling carrot et récemment ta contribution ecotaxe.. dans le panier si j'ajoute un objet à 35 euros, il m'affiche dans le détail du panier 48.00€ et le total est à 35 euros.. si je remet une vieille sauvegarde de class/currencie.php (donc je désinstalle ta contribution), le calcul se fait correctement, mais je n'ai plus l'ecotaxe.
Voici donc la ou çà coince (enfin pour ce bug):
Code d'origine
Code
function display_price($products_price, $products_tax, $quantity = 1) {
return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
}
}
remplacer par :
Code
//debut modif by paddybl for ecotax
function display_price($products_price, $products_tax, $ecotax_rates_id = 0, $quantity = 1) {
if ($products_price==0) {
return "Nous contacter";
} else {
global $currencies, $tag;
/* if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){echo "<br />".$currencies->display_price(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id']), $order->products[$i]['ecotax_taxe_rate'], $order->products[$i]['qty']) . ' </td>' . "\n";}else{echo ' </td>';}
echo ' </tr>';*/
if (MODULE_ORDER_TOTAL_ECOTAX_INCLUDE=="False" || $ecotax_rates_id == 0 || MODULE_ORDER_TOTAL_ECOTAX_STATUS=="False"){
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}else{
return $this->format(tep_add_ecotax(tep_add_tax($products_price, $products_tax)* $quantity,-1,$ecotax_rates_id, $quantity));}
}}
}
//fin modif by paddybl for ecotax
et voici mon adaptation:
Code
//debut modif by paddybl for ecotax
function display_price($products_price, $products_tax, $ecotax_rates_id = 0, $quantity = 1) {
if ($products_price==0) {
return "0 €";
} else {
global $currencies, $tag;
if (MODULE_ORDER_TOTAL_ECOTAX_INCLUDE=="False" || $ecotax_rates_id == 0 || MODULE_ORDER_TOTAL_ECOTAX_STATUS=="False"){
return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
}else{
return $this->format(tep_add_ecotax($this->calculate_price($products_price, $products_tax, $quantity),-1,$ecotax_rates_id, $quantity));}
}
}
}
//fin modif by paddybl for ecotax
Il faut donc une autre adaptation ? non ? je me suis planté ou exactement, merci