View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001655 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2010-02-16 09:53 | 2012-12-07 15:20 |
Reporter | aggrosoft | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | suspended | ||
Product Version | 4.2.0 revision 23610 | ||||
Summary | 0001655: Calling oxArticle::loadAmountPrice befor oxArticle::getBasketPrice leads to price = 0 | ||||
Description | Following test code: public function getProduct($loadVariants=true) { $myConfig = oxConfig::getInstance(); $myUtils = oxUtils::getInstance(); if ( $this->_oProduct === null ) { //this option is only for lists and we must reset value //as blLoadVariants = false affect "ab price" functionality $myConfig->setConfigParam( 'blLoadVariants', $loadVariants ); $myConfig->setConfigParam( 'blPerfLoadPrice', true ); $sOxid = oxConfig::getParameter( 'anid' ); // object is not yet loaded $this->_oProduct = oxNew( 'oxarticle' ); $this->_oProduct->load( $sOxid ); } return $this->_oProduct; } $oProduct = $this->getProduct(); //$oProduct is a multi variant article with amount prices //I just cut out the fetching of the select lists (POST), the basket (SESSION) and the quantity (POST) $oPrice = $oProduct->getBasketPrice($qty,$lists,$oBasket); //This value is correct print_r($oPrice); $oProduct->loadAmountPriceInfo(); $oPrice = $oProduct->getBasketPrice($qty,$lists,$oBasket); //This value is wrong print_r($oPrice); | ||||
Additional Information | Ich bin mir nicht sicher ob sich dieser Fehler einfach so reproduzieren lässt, ich könnte auch einen umfangreicheren use case bereitstellen. | ||||
Tags | Scale Price | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
related to | 0003092 | resolved | arvydas_vapsva | article: "not isBuyable()" does not equal "isNotBuyable()" |
|
Translation: Following test code: public function getProduct($loadVariants=true) { $myConfig = oxConfig::getInstance(); $myUtils = oxUtils::getInstance(); if ( $this->_oProduct === null ) { //this option is only for lists and we must reset value //as blLoadVariants = false affect "ab price" functionality $myConfig->setConfigParam( 'blLoadVariants', $loadVariants ); $myConfig->setConfigParam( 'blPerfLoadPrice', true ); $sOxid = oxConfig::getParameter( 'anid' ); // object is not yet loaded $this->_oProduct = oxNew( 'oxarticle' ); $this->_oProduct->load( $sOxid ); } return $this->_oProduct; } $oProduct = $this->getProduct(); //$oProduct is a multi variant article with amount prices //I just cut out the fetching of the select lists (POST), the basket (SESSION) and the quantity (POST) $oPrice = $oProduct->getBasketPrice($qty,$lists,$oBasket); //This value is correct print_r($oPrice); $oProduct->loadAmountPriceInfo(); $oPrice = $oProduct->getBasketPrice($qty,$lists,$oBasket); //This value is wrong print_r($oPrice); |
|
Translation of additional info: I'm not sure if this error is so easy to reproduce, if needed I could also supply a more detailed use case. |
|
Reminder sent to: aggrosoft Hi, I could not reproduce this bug, please could you provide the more detailed use case? Regards, |
|
Currently we cannot solve the problems like this, because it needs quite large refactoring in core classes. We added a note to our plans to keep this in mind, when we will go to refactor oxarticle class, but for now this issue is Suspended, and must be considered during refactoring. Thanks for your feedback. |