Magento: Orders made using Paypal are not dispalyed in Customer’s ‘My Orders’ section

Problem:

I placed an order in Magento using Paypal payment method. Everything went fine. I was able to pay through Paypal. However, when I login to the shop as a customer, I see that ‘My Orders‘ section is empty. I could not find information of the order I recently placed.

Cause:

Your order status might be either ‘Pending‘ or ‘Pending Payment‘. By default, Magento doesn’t allow these two types of orders to be displayed in customer’s end.

Solution:

Add the following code inside global element of app/etc/local.xml


<sales>
	<order>
		<states>                    
			<pending translate="label">
				<label>Pending</label>
				<statuses>
					<pending default="1"/>
				 </statuses>
				 <visible_on_front>1</visible_on_front>
			</pending>
			<pending_payment translate="label">
				<label>Pending Payment</label>
				<statuses>
					<pending_payment default="1"/>
				</statuses>
				<visible_on_front>1</visible_on_front>
			</pending_payment>
		</states>
	</order>
</sales>

Now, your customers should be able to view their orders which have ‘pending’ or ‘pending payment’ status.

Note: Core file containing this data is app/code/core/Mage/Sales/etc/config.xml

Hope it helps. Thanks.