Someone posted a message sometimes ago that in the product listing page, when ‘add to cart’ is clicked, it goes to the homepage (index.php), I cannot find that post from the search (that’s why we think advanced search would be useful : ) after trying many combination of keywords.
Anyhow, I stumbled the very same problem last night. First I didn’t see this problem when I had only the ‘default’ theme (let’s called it theme1), when I add a product to cart, it stays at the same page as I have the setting not re-direct to cart page.
Long story shorts, I started working on second theme (theme 2), and due to the Hierarchy of Themes, when I added theme 2, my theme 1’s homepage showing up in the theme2’s homepage - because my theme1 files are located in the ‘default’ folders’ and that Default is the Lowest Hierarchy.
So I recreated my themes hierarchy like so, and have the ‘theme1’ as default theme in the design > themes configuration.
Everything seems working fine, until I started testing add cart function, only to find that it re-directs to homepage if ‘add cart’ is performed in any of the listing page. The problem occurs in both theme1 and theme2. But it doesn’t have the same problem when I am in product view page.
The 2 list.phtml shared the identical codes, and I have compared the add cart code with another magento site that has only ‘default’ theme that shows no similar problem when add cart is performed. I suspect this is a bug, but before I file a bug report, I would like to find out first so that I don’t abuse bug report system. The demo site also have two themes, therefor I figure it won’t take you more than 2 minutes to test this out - right now the demo site is configured the add cart redirects to cart page.
So if you could kindly change the setting ‘After adding a product redirect to shopping cart’ to NO, and run 2 test in both Default and Modern themes in any of the listing page, is much appreciated.