View Issue Details

IDProjectCategoryView StatusLast Update
0006176OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2024-02-07 11:35
ReporterKovalsky Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.9.3 / 5.2.3 
Summary0006176: Discounts on Article level don't display correctly
DescriptionDiscounts with no categorys/article assignment will be displayed in basket summary. If you assign this discount one article, discount will be not displayed in basket summary.

$oxcmp_basket->getDiscounts() = NULL
$oxcmp_basket->getTotalDiscountSum() = float(0)
Steps To ReproduceFor Example Article 1203 in demoshop - add to basket
In basket you dont see discount in summary.
Now remove article assigment in shop-admin - discounts and you see discount information in basket summary.
TagsProduct domain and basket rewrite
Attached Files
screen6176.png (48,586 bytes)   
screen6176.png (48,586 bytes)   
ThemeNot defined
BrowserNot defined
PHP Version5.3
Database VersionNot defined

Activities

QA

2015-06-25 15:30

administrator   ~0011061

Last edited: 2015-06-25 15:31

I attached a screenshot to clarify which discount information is meant.
The discount will be displayed when the following requirements are given:

quantitiy | assigned | shown in basket
    1     |     1    |       0
    1     |     0    |       1
    0     |     1    |       0
    0     |     0    |       0


(assigned to an article or category)

bjoerk

2015-06-25 16:38

reporter   ~0011062

Discounts are only shown if the discount is _not_ assigned to a product or category.
If the discount is assigned the discount-value is not shown in the basket.

Would be nice to have a mechanism to display the discount-sum if there is an assignment to specific products or categories which is more usual imho

gerldental

2018-03-29 15:42

reporter   ~0012430

The reason ist probably that's the oxbasket::_aItemDiscounts has an initial value = array() thats never changes.

Array merging in oxbasket::getDiscounts(), Z. 2158:

...
return array_merge($this->_aItemDiscounts, $this->_aDiscounts);

works only if basket discount exists. Array with article discounts is always empty.

Seems to be - it was forgotten to save article discounts in oxbasket::_calcItemsPrice() method.