View Issue Details

IDProjectCategoryView StatusLast Update
0004758OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2012-12-07 15:07
Reporterhenrik.steffen Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
PlatformallOSallOS Versionall
Product Version4.5.8 revision 42471 
Summary0004758: Discount which applies only to one product category doesn't affect payment surcharge/discount
DescriptionIf you add a 10% discount which is only valid to a certain product category, and you buy products from this category, and choose payment in advance with 3% allowance (skonto), OXID calculates the 3% based upon the order total amount, not upon the discounted amount.
Additional Informationsee screenshot from our customer shop attached
TagsDiscount
Attached Files
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

duplicate of 0004757 resolvedLinas Kukulskis Still wrong item discount calculations 

Activities

itsabug

2012-11-29 10:27

reporter   ~0008024

Don't know where/when this was fixed but here's a fix by module:

in oxpayment:

    public function getBaseBasketPriceForPaymentCostCalc( $oBasket ) {
        $price = parent::getBaseBasketPriceForPaymentCostCalc($oBasket);

        $iRules = $this->oxpayments__oxaddsumrules->value;
        if (count($oBasket->getItemDiscount()) > 0 && ($iRules & self::PAYMENT_ADDSUMRULE_DISCOUNTS) ) {
            foreach ($oBasket->getItemDiscount() as $key => $discount) {
                $price -= $discount->dDiscount;
            }
        }

        return oxUtils::getInstance()->fRound($price);
    }


where $oBasket->getItemDiscount() is a method, that returns _aItemDiscounts of oxbasket array.

jurate.baseviciene

2012-12-07 10:49

reporter   ~0008071

Closed as duplicate of 0004758