View Issue Details

IDProjectCategoryView StatusLast Update
0000921OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:29
Reportertjungcl Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.1.2 revision 18998 
Fixed in Version4.1.3 revision 19918 
Summary0000921: When LoadVariants is switched off in admin, fromPrices in article-listings are not affected by currency- or vat.-chamges
DescriptionReproducable in fresh demo-installation of EE 4.1.2,

- switch off LoadVariants in Adin
- go to Frontend: category Wohnen->Lampen
- change currency
=> Lichterkette ÖLLAMPE recalculates
=> the three others dont.
Additional InformationI skyped with Tomas about the involved functions _applyRangePrice, getPrice, _applyVat, etc.
I'm working on those on my own for a module that changes the pricing-model, so I am very interested in a fast solution (and the new code).

TagsProducts
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

tjungcl

2009-05-25 11:18

reporter   ~0000943

Last edited: 2009-05-25 11:26

I fixed it within my local pricing-module.
 
In short words, I
- killed the _assignPrices function (extended with an empty function)
- moved all the logic from _assignPrices to getPrice function
- rearranged the code in _appyRangedPrices for some performance

So now the prices are not calculated before everything else anymore, but just when the getPrice-function is called the first time for each product. The price-caching works as before, so every following getPrice-Call is as fast as usual.

In fact i even recognized a little gain in speed in large variant-lists.

(That way you can also display articles in a template without prices, if somebody wants that for some reason, and dont have to calculate prices. )

vilma_liorensaityte

2009-05-26 16:48

reporter   ~0000959

_applyRangePrice: where oxvarminprice will be set as article price added addition function "_calculatePrice". In this function taxes, currency and discounts will be applied to price.