- Posts: 190
- Thank you received: 0
Re: Round Pb with a discount
- codewarrior
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
Pourriez vous changer les lignes:
$round = $this->getRounding(@$price->price_currency_id);
en:
$round = 5;
dans la fonction addDiscount du fichier administrator/components/com_hikashop/classes/currency.php et réessayer ?
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
Cela donnera t'il lieu à une correction dans la prochaine version, ou faudra t'il refaire la manip ?
Cordialement
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
Je sais bien que cette autre question n'est pas technique, mais pour la France, faut-il appliquer la réduction avant ou après les taxes ?
Merci
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
j'ai à nouveau ce problème d'arrondi depuis le passage à la version 1.5.9
Prix HT : 32.00669
Prix TTC : 38.28
Discount : 29.46%
Prix TTC final : 27.00 dans l'affichage du produit ==> OK
Une fois dans le Caddy, j'obtiens les prix corrects, sauf pour le TOTAL TTC = 27.01
Vous m'aviez fait modifier la vue Checkout / Cart ainsi pour afficher le prix TOTAL TTC :
<td class="hikashop_cart_product_price_value">
<?php
$this->params->set('price_with_tax',1);
$this->row=&$row;
$this->unit=true;
echo $this->loadTemplate();
?>
<span class="hikashop_product_price_before_discount">
<?php
$LBprice = $this->currencyHelper->format($row->prices[0]->price_value_without_discount_with_tax/$row->cart_product_quantity,$row->prices[0]->price_currency_id);
if (!$LBprice) {echo $LBprice; }
?>
</ span>
</td>
PS : pour 2 articles, le prix Total TTC passe à 54.02€
Par avance merci de votre aide, pour corriger :
1) le problème d'arrondi
2) l'affichage de la TVA (négative et valeur incorrecte)
Cordialement
Please Log in or Create an account to join the conversation.
Nous avons pu reproduire le problème de notre coté. Nous allons voir pour corriger cela en début de semaine.
Please Log in or Create an account to join the conversation.
Après reproduction du bug nous avons résolut le problème.
Pour le corriger, remplacer le fichier currency.php dans administrator\components\com_hikashop\classes par celui ci-dessous.
Nous sommes encore en train de tester cette modification mais cela devrait résoudre votre soucis.
Attachment not found
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
Merci
Mais pouvez-vous m'aider avec l'affichage de la TVA qui est comme vous pouvez le voir sur l'image, à -1.96€ quel que soit le Total TTC
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
La TVA apparait à la saisie du coupon.
Please Log in or Create an account to join the conversation.
Pourriez vous fournir un accès au back end pour que nous regardions cela ?
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Remplacez voir le code:
$coupon2->total->prices[0]->price_value_with_tax = $totalnondiscount_with_tax;
$coupon2->total->prices[0]->price_value = $totalnondiscount;
$currency->addCoupon($coupon2->total,$coupon2);
par:
if($coupon2->discount_flat_amount>$totalnondiscount_with_tax){
$coupon2->discount_flat_amount=0;
}
$total = null;
$obj=null;
$total->prices = array($obj);
$total->prices[0]->price_value_with_tax = $totalnondiscount_with_tax;
$total->prices[0]->price_value = $totalnondiscount;
$currency->addCoupon($total,$coupon2);
dans le fichier administrator/components/com_hikashop/classes/discount.php
Cela résoud le problème de notre coté.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
I'm sorry, but I have product at 79€ ttc and a coupon of 10€ ttc
with your modification I have the following displays :
1) with no coupon
Attachment Capture1.PNG not found
2) with the 10€ coupon
Attachment Capture2.PNG not found
Obviously, coupon, VAT and Total (should be 69€) are all false !
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
Please Log in or Create an account to join the conversation.