magento-configurable-simple icon indicating copy to clipboard operation
magento-configurable-simple copied to clipboard

min_price wrong on catalog_product_index_price

Open fabrice-dresscodes opened this issue 5 years ago • 1 comments

Hello,

I'm not sure but why 'OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Configurable'

has

        'max_price'     => new Zend_Db_Expr('MAX(inner.max_price)'),

but not

        'min_price'     => new Zend_Db_Expr('MIN(inner.min_price)'),

I had issue with minimal price on product listing but not on product view.

The table 'catalog_product_index_price"."min_price" was wrong before I added => new Zend_Db_Expr('MIN(inner.min_price)'), on line 127

Magento 1.9.3.1

fabrice-dresscodes avatar Apr 05 '19 13:04 fabrice-dresscodes

Hello, We had the same problem with Magento 1.9 with MariaDB 10.1. The subquery is not ordered like on MySql so the displayed price is not always the best.

If we modify the min_price it displays the buggy price and below "Special price = min_price" on the product list page, so instead we modified the price and the orig_price (modifying only the price displays the buggy price stricked though and then the correct price) :

...
            'orig_price'    => new Zend_Db_Expr('MIN(inner.min_price)'),
            'price'         => new Zend_Db_Expr('MIN(inner.min_price)'),
             'min_price',
             'max_price'     => new Zend_Db_Expr('MAX(inner.max_price)'),
...

mbautista avatar Jul 25 '19 09:07 mbautista