View Issue Details

IDProjectCategoryView StatusLast Update
0004851OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2013-01-15 13:12
Reporterknackig Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version4.7.2 / 5.0.2 revision 53018 
Summary0004851: Negative payment costs are not calculated in checkout process
DescriptionAfter 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 InformationProblem can be reproduced in Version 4.7.1 and 4.7.2 (I have not tested 4.7.0 and below).
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Versionany
Database Versionany

Relationships

duplicate of 0004712 resolvedLinas Kukulskis No discount in the order 

Activities

ray

2013-01-15 09:02

reporter   ~0008264

there is a module on github to fix this behaviour:
http://forum.oxid-esales.com/showthread.php?p=113474

knackig

2013-01-15 10:00

reporter   ~0008265

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;
        
    }

jurate.baseviciene

2013-01-15 13:12

reporter   ~0008269

Closed as duplicate of 0004712