Magento – Cart Price Rules and Downloadable Product Core Bug

magento-1.7

Ran into an interesting bug today and was wondering if anyone else has come across it.

I took a default Magento CE installation (1.7.0.2) and added in the dummy data. Then created a new category called "Software" in the Computer > Electronics category and added a single Downloadable Product to it.

I then attempted to create a price rule where if you added a product that had a category of Furniture (category 22) to the cart along with a downloadable product (category 35), you would get a flat, $15 dollar discount on your order.

Just to start off, I created a coupon that would be applied if any item with category ID of 22 was added to the cart.

Conditions

Actions

This works just fine if you add just, say, an Ottoman to your cart… but if you then also add a downloadable product to your cart, the rule fails to apply.

Success

Success

Success

Success, Part 2

Fail

Failure

If I attempt to do anything with price rules when there's a downloadable product in the cart, the rule fails.

Any ideas?

ANSWER

Turns out this is simply a little bit of a complex rule. Final settings to accomplish what I wanted looked like this…

Actions

Conditions

Conditions

Actions

Best Answer

The problem is that you're applying the rule to all items in the cart, so when it checks the Virtual product, it sees that it is not in category 22, and it fails the rule.

If you want to apply the discount whenever an item from category 22 and category 35 are both in the cart, change your 'Conditions' rule to:

~ If ANY of these conditions are true:

~~ If total quantity greater than 0 for a subselection of items matching ANY these conditions:

~~~ Category is 22

~~~ Category is 35

I think my brain wrapped that correctly. If it's not quite right, it should at least get you on the right track.

enter image description here enter image description here

I used category 8 here, but that's just where I set up my own test Virtual product.