View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005641 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2014-02-06 10:45 | 2014-03-04 11:25 |
Reporter | edip123 | Assigned To | |||
Priority | immediate | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.7.10 / 5.0.10 | ||||
Target Version | 4.7.11 / 5.0.11 | Fixed in Version | 4.7.11 / 5.0.11 | ||
Summary | 0005641: Fatal Error after activating oxskipdiscounts | ||||
Description | If the option oxskipdiscounts ("Alle neg. Nachlässe ignorieren.") is activated for an article, you get a Fatal Error on the details page of this article. Can be reproduced in demo shop. | ||||
Steps To Reproduce | Choose an article in the backend and activate oxskipdiscounts ("Alle neg. Nachlässe ignorieren."). In the frontend call the details page for this article. | ||||
Additional Information | The function _getAmountPriceList() in oxarticle returns an Array if oxskipdiscounts is activated, but in loadAmountPriceInfo() the result is accessed as an object. | ||||
Tags | Discount, Products | ||||
Attached Files | |||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | 5.3 | ||||
Database Version | any | ||||
|
This function works correctly: protected function _getAmountPriceList() { if ( $this->_oAmountPriceList === null ) { $oAmPriceList = oxNew( 'oxAmountPricelist' ); if ( !$this->skipDiscounts() ) { //collecting assigned to article amount-price list $oAmPriceList->load( $this ); // prepare abs prices if currently having percentages $oBasePrice = $this->_getGroupPrice(); foreach ( $oAmPriceList as $oAmPrice ) { if ( $oAmPrice->oxprice2article__oxaddperc->value ) { $oAmPrice->oxprice2article__oxaddabs = new oxField(oxPrice::percent( $oBasePrice, 100 - $oAmPrice->oxprice2article__oxaddperc->value ), oxField::T_RAW ); } } } $this->_oAmountPriceList = $oAmPriceList; } return $this->_oAmountPriceList; } |
|
I've added a module to override the function. |
|
Fixed as suggested. |