View Issue Details

IDProjectCategoryView StatusLast Update
0007325OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2024-08-15 14:22
Reporteraggrosoft Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Summary0007325: Discount calculation ignores scale prices
DescriptionWhen discounts are calculated for basket that have a defined price range then the scale prices will be ignored.
Steps To ReproduceCreate a product like this:

base price: 10 €

scale price from amount: 2
scale price to amount: 99999
scale price: 1 €

Create discount:

from amount: 1
to amount: 99999
from price: 50 €
to price: 99999 €
discount: 5%

[QS edit:]
add article to discount

Now put the product into basket with quantity 5 - discount will be applied even though basket total is 5€
Additional InformationThe problem lies in \OxidEsales\EshopCommunity\Application\Model\Discount function isForBasketAmount which uses this:

if (($oPrice = $oBasketArticle->getPrice())) {
    $dAmount += ($oPrice->getPrice() * $oBasketItem->getAmount()) / $dRate;
}

instead of using the basket price

if (($oPrice = $oBasketArticle->getBasketPrice($oBasketItem->getAmount(), $oBasketItem->getSelList(), $oBasket))) {
    $dAmount += ($oPrice->getPrice() * $oBasketItem->getAmount()) / $dRate;
}
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Relationships

duplicate of 0006657 confirmedSvenBrunk Product and category coupon's value calculated from article's basket price instead of actual basketitem price 

Activities

QA

2022-06-20 13:23

administrator   ~0013825

Dear aggrosoft,

this behavior cannot be reproduced in my reference shop of 6.4 and 6.3.

I documented my behavior here (link is valid for 7 days):
https://oxidesalesag.sharepoint.com/:f:/s/Support/EjFR7g4UpDFBiW3794hXSKoBOue7wxApZVQ7YArer5HB9w?e=3OxJCJ

Which shop version do you have? do you have any modul active?

Best Regard
QA -SG-

aggrosoft

2022-06-20 16:15

reporter   ~0013826

Sorry my bug report missed a little detail, this will only happen if the discount is assigned to either the product directly or to one of the categories of the product.

QA

2022-06-20 16:24

administrator   ~0013827

Dear aggrosoft,

thank you for your feedback!

I could reproduce the issue.

Best Regards
QA -SG-

SvenBrunk

2024-08-15 14:22

administrator   ~0017432

Duplicate of 0006657