cancel
Showing results for 
Search instead for 
Did you mean: 

Configurable product conflict with shopping cart rule

Configurable product conflict with shopping cart rule

I'm having a problem on my CE 1.9.2.4 store where a configurable product won't add to cart properly (i.e. select color, size, click add-to-cart button, and cart is still empty)

Simple products add to the cart just fine.

I found the source of the problem appears to be caused by a shopping cart price rule that I have set on an entirely different product category (and limited to that category).  If I disable the shopping cart price rule, the configurable product adds to cart just fine.

 

My shopping cart price rule is configured as follows:

CONDITION

If ALL  of these conditions are TRUE :

If total quantity  is  2  for a subselection of items in cart matching ALL  of these conditions:

Category  is  70   (note: Category 70 is NOT the configurable product's category)

 

ACTION

Apply

Fixed amount

Discount Amount * 1
Maximum Qty Discount is Applied To 0
Discount Qty Step (Buy X) 0
Apply to Shipping AmountNo
Free ShippingNo
Stop Further Rules ProcessingNo

 

I have two other shopping cart price rules that are similar to the above (bigger discount for bigger quantities from the same product category).  If any of the three shopping cart price rules are active, the none of my configurable products will add to cart (but the simple product that the shopping cart price rule was created for works fine and those products add to cart).

 

Any ideas why this conflict exists between the shopping cart price rule and being to add a configurable product to cart?

 

 

3 REPLIES 3

Re: Configurable product conflict with shopping cart rule

I ran into this issue myself before:
It turns out this is a core bug introduced in CE 1.9.1 and EE 1.14.1 

See below for the fix. Despite what the patch says it an apply to CE and EE

Magento just provided a patch for this as PATCH_SUPEE-4814_EE_1.14.1.0_v1.sh Changes are in: app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php on line 114:
From:
if (parent::validate($item)) {
To:
if (Mage_Rule_Model_Condition_Combine::validate($item)) {

Here is the official Magento Patch for this error https://gist.github.com/piotrekkaminski/54529dadb0bc01a62a2d
 
Additional info / where I officially learned this solution was found at 
http://magento.stackexchange.com/questions/37395/magento-debug-trace/44112#44112 credit to Phil Birnie

Re: Configurable product conflict with shopping cart rule

Phil,

 

Thank you so much for sharing your insight!  That one simple edit has solved my problem.  I hope that fix makes it to core soon.

 

-- Brett

Re: Configurable product conflict with shopping cart rule

Phil was the guy who did the stack exchange answer which helped me and I just passed it along to you.

 

My name is Maier - I am glad it helped. I encountered this issue 2x and both times it took a while to isolate what was going on. First time i just got rid of that cart rule, second time I applied the solution. 

 

Cheers!

 

-Maier