View Issue Details

IDProjectCategoryView StatusLast Update
0002938OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2012-12-07 15:07
Reportercpjolly Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.0 revision 34568 
Fixed in Version4.5.1 revision 38045 
Summary0002938: isBelowMinOrderPrice does not add getNotDiscountProductsPrice to getDiscountedProductsBruttoPrice
DescriptionIn oxubase->isLowOrderPrice() calls oxbasket->isBelowMinOrderPrice().
This calls oxbasket->getDiscountedProductsBruttoPrice, but it does not call oxbasket->getNotDiscountProductsPrice, so it ignores the price of non discounted items.

This is the same as fix 0001905 in oxbasket->getPriceForPayment().
oxbasket->isBelowMinOrderPrice() needs to add oxbasket->getNotDiscountProductsPrice() before calculating the total. Fix is as follows:

public function isBelowMinOrderPrice()
{
    $blIsBelowMinOrderPrice = false;
    $sConfValue = $this->getConfig()->getConfigParam( 'iMinOrderPrice' );
    $dPrice = $this->getDiscountedProductsBruttoPrice();
    if ( $oPriceList = $this->getNotDiscountProductsPrice() ) {
        $dPrice += $oPriceList->getBruttoSum();
    }
    if ( is_numeric($sConfValue) && $this->getProductsCount() ) {
        $dMinOrderPrice = oxPrice::getPriceInActCurrency( ( int ) $sConfValue );
        $blIsBelowMinOrderPrice = ($dMinOrderPrice > $dPrice);
    }

    return $blIsBelowMinOrderPrice;
}
TagsDiscount
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

birute_meilutyte

2011-06-03 11:21

reporter   ~0004683

bug: if minimal order price is set up, products that cant have discounts will not be included in order calculation, which is not correct.

@developers: check from source code side if offered solution is correct for fixing this problem