Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to redirect empty cart to home page
 
mageshkumar
Jr. Member
 
Total Posts:  3
Joined:  2010-10-19
 

Hi,
i have site if empty cart is happening is still on the cart page, i want redirect to home page if cart is empty.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagikMahesh
Member
 
Total Posts:  36
Joined:  2012-04-10
 


If there are no items in your cart and then you want to redirect to home page then open and edit file,
app/design/frontend/default/your-theme/template/checkout/cart/noItems.phtml
add redirect code at the end of this file.
Then you will be automatically redirect to home page.

<?php header("Location: ".$this->getContinueShoppingUrl());?>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top