View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000921||OXID eShop (all versions)||1.01. Products (product, categories, manufacturer, promotions etc.)||public||2009-05-22 10:50||2012-12-07 14:29|
|Product Version||4.1.2 revision 18998|
|Target Version||Fixed in Version||4.1.3 revision 19918|
|Summary||0000921: When LoadVariants is switched off in admin, fromPrices in article-listings are not affected by currency- or vat.-chamges|
|Description||Reproducable 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 Information||I 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).
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. )
||_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.|