cancel
Showing results for 
Search instead for 
Did you mean: 

Magento Add to Cart just redirecting to home page not adding

Magento Add to Cart just redirecting to home page not adding

Regular products work just fine in store but configurable products don't. When you click on "Add To Cart" on a configurable product it just tries loading for about 5 seconds and then redirects you to home page without adding to cart.fantomworks.com/store/ss-pass.html here is an example of what's going on. Try adding that item to the cart. but you can add fantomworks.com/store/drs-patch-8644.html to the cart without issue I'm at my whit's end. Any thoughts??

1 REPLY 1

Re: Magento Add to Cart just redirecting to home page not adding

debug all flow for adding product to cart. In process I found that collectTotal function of quote is not setting price and continuously loops to bug which make redirect to home page. 
Validation for configurable product is failed in this file /store/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php
This file on line number 117 having this function call on configurable  product Item validation if (parent::validate($item)) { 
which is somehow because this validate($item) function is not in it parent class. Instead this validate($item) is in Class Mage_Rule_Model_Condition_Combine so modified it to if (Mage_Rule_Model_Condition_Combine::validate($item)) {.