You Have Placed No Orders in Magento

We were recently informed by one of our clients that had a customer of theirs complain that when they went into the “My Account” section of their Magento Commerce store, and logged in, when checking on their orders, they get a message that says “You have placed no orders“. We did some research and found this fix:

As always, ALWAYS BACKUP!

First, go to file: \app\code\core\Mage\Sales\Block\Order\History.php

Approximately line 49, find this code:

->addAttributeToFilter(’state’, array(’in’ => Mage::getSingleton(’sales/order_config’)->getVisibleOnFrontStates()))

Comment that line out so it looks like this:

/** ->addAttributeToFilter(’state’, array(’in’ => Mage::getSingleton(’sales/order_config’)->getVisibleOnFrontStates())) */

Save the file.

Next, go to: app/code/core/Mage/Sales/etc/config.xml

and add <visible_on_front/> to the states you want to see in the frontend, like this:

<new translate=”label”>

<label>New</label>

<statuses>

<pending/>

<processing/>

<holded/>

<complete/>

<closed/>

<canceled/>

</statuses>

<visible_on_front/>

</new>

<pending translate=”label”>

<label>Pending</label>

<statuses>

<pending/>

<processing/>

<holded/>

<complete/>

<closed/>

<canceled/>

</statuses>

<visible_on_front/>

</pending>

Save that file.

Go to your cache in admin and refresh.

Your customers should now be able to see their orders when they log in to their account of your Magento Store.

You must be logged in to post a comment.