View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006176 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2015-06-22 12:01 | 2024-07-05 08:55 |
Reporter | Kovalsky | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 4.9.3 / 5.2.3 | ||||
Summary | 0006176: Discounts on Article level don't display correctly | ||||
Description | Discounts 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 Reproduce | For 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. | ||||
Tags | Product domain and basket rewrite | ||||
Attached Files | |||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | 5.3 | ||||
Database Version | Not defined | ||||
|
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) |
|
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 |
|
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. |