We're currently experiencing a strange behaviour with the price_index
table. We're having grouped products with several simple products associated, e.g.
Grouped product
- Associated product 1 – 25,93€
- Associated product 2 – 26,96€
For whatever reason the price_index
table indicates the max_price
as 49,74€ for that particular product. The $this->getLoadedProductCollection()
SQL query results in showing what I suspected: http://screens.schloebe.biz/image_2013-06-04_09_32_41_001.png
A re-index didn't help as for indicating the max_price
as the actual highest price of all associated products as for my understanding.
Sorry that I can't give you more info at this time, but I'm not getting what might be wrong with the price indexing mechanism (or is there something I don't get?).
I'll help with any info neccessary. Thanks!
Best Answer
Off the top of my head, I don't know how Magento calculates the
max_price
for a grouped product.However, the code that does this is located here
What I'd do is add some temporary debugging code to this method, and reindex the product prices
Specifically, at the bottom of the method
add an
echo
or some logging above theinsertFromSelect
callI did this for the sample data, and got a query like this
Although based on extensions you have installed, yours may end up being a different query, so definitely add the debugging code yourself.
Dissecting this query should help point you towards the hows/whys of Magento's grouped product pricing, as well as determine if