Magento 1.9.3.1 / 1.9.2.1 – Abandoned Cart Report Broken

I updated a site to 1.9.3.1 this past week and the Abandoned Cart report just went blank. It turns out to be a bug in the core code that requires a middle initial. 

How to fix the Broken Abandoned Cart Report

You will find the issue in this file:

“app/code/core/Mage/Reports/Model/Resource/Quote/Collection.php”

About line #209 – Change the “->joinInner(” to “->joinLeft(”

->joinInner(
                array('cust_mname' => $attrMiddlenameTableName),
                implode(' AND ', array(
                    'cust_mname.entity_id = main_table.customer_id',
                    $adapter->quoteInto('cust_mname.attribute_id = ?', (int) $attrMiddlenameId),
                )),
                array('middlename' => 'cust_mname.value')
            )

All done. Clear your cache and reload the report. It should populate now.
If the issue pops up again you may need to change the customer table to default to NULL on the middle name row.

-Jon

Leave a Reply