View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004851 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2013-01-14 21:58 | 2013-01-15 13:12 |
Reporter | knackig | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 4.7.2 / 5.0.2 revision 53018 | ||||
Summary | 0004851: Negative payment costs are not calculated in checkout process | ||||
Description | After difining of negative costs for a payment method (fe. 2% discount for cash in advice), the costs are not taken into consideration while calculating price in checkout process. On the other side positive costs are correctly calculated. | ||||
Additional Information | Problem can be reproduced in Version 4.7.1 and 4.7.2 (I have not tested 4.7.0 and below). | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
duplicate of | 0004712 | resolved | Linas Kukulskis | No discount in the order |
|
there is a module on github to fix this behaviour: http://forum.oxid-esales.com/showthread.php?p=113474 |
|
All I have changed in my module ist the function "calculate" in the class "oxpayment". I have deleted the following if-loop for calculating total price. I don't know, why you want to sort out negative payment costs for the price calculation. if ( $dPrice > 0 ) After this the payment costs are cerrectly calculated. This is my version of the function: public function calculate( $oBasket ) { //getting basket price with applied discounts and vouchers $dPrice = $this->getPaymentValue( $this->getBaseBasketPriceForPaymentCostCalc( $oBasket ) ); // calculating total price $oPrice = oxNew( 'oxPrice' ); if ( !$this->_blPaymentVatOnTop ) { $oPrice->setBruttoPriceMode(); } else { $oPrice->setNettoPriceMode(); } $oPrice->setPrice( $dPrice ); $oPrice->setVat( $oBasket->getAdditionalServicesVatPercent() ); $this->_oPrice = $oPrice; } |
|
Closed as duplicate of 0004712 |