View Issue Details

IDProjectCategoryView StatusLast Update
0004210OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2012-12-07 15:20
ReporterArunas 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.6.2 revision 46646 
Target VersionFixed in Version4.6.6 revision 54646 
Summary0004210: oxArticle::getPrice( $iAmount ) doesn't calculate scale prices after the method oxArticle::loadAmountPriceInfo() is called
DescriptionoxArticle::getPrice( $iAmount ) doesn't calculate scale prices after the method oxArticle::loadAmountPriceInfo() is called.

The problem is in the oxArticle::loadAmountPriceInfo() (and deeper), after it's called it reformats the prices in all the oxPrice fields of the price list.

For example:
Before calling the oxArticle::loadAmountPriceInfo() method you have "200.2" in the price value of oxPrice, after calling you have "100,20".

In oxArticle::getPrice( $iAmount ) the original product price is compared to the scale price goes something like : 150.2 < 100,20 (because it treats the scale price as a string)

This shouldn't work like this, because lets say i want to get the list of scale prices to print, then do a calculation with the same object.
Steps To Reproduce1) Create a product with scale prices
2) Write a script that loads the product to the oxArticle object
3) Call method oxArticle::loadAmountPriceInfo()
4) Call method oxArticle::getPrice ( $iAmount ) and pass a value that would normaly change the price
5) The price inside the returned oxPrice object is still the original, when it should've been one from the scale price configuration

TagsScale Price
ThemeBoth
BrowserAll
PHP Versionany
MySQL Versionany

Relationships

related to 0004563 resolvedLinas Kukulskis Broken article price "calculation" after template change 

Activities

Linas Kukulskis

2012-10-04 17:25

reporter   ~0007556

removed unnecessary formating