Closed (duplicate)
Project:
Commerce Extra Rules Conditions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2011 at 09:12 UTC
Updated:
8 Nov 2012 at 15:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
mrfelton commentedHere is a patch. Though after implementing it I realized that actually what I was looking for was more like 'order contains a product with a particular taxonomy term'! doh!
Comment #2
graker commentedI patched the module and tried to create a rule with this condition.
I put "commerce-line-item:order" as data selector and choose one of product types.
The event was "Calculating the sell price of a product" because I'd like to create a discount if certain product is in the cart.
But when I put this condition in the rule, lots of errors appear when displaying the cart:
Although, I'm not sure, maybe it's not an issue of the patch, maybe it's just that the order is not created until checkout?
upd: it seems like an issue of the patch - I replaced "commerce-line-item:order" with "site:current-cart-order" and errors remain.
upd2: anyways, it seems that you can replace this condition with the other one in the module: "Total product of type quantity comparision". It is just a little less comfortable, but it works.
Comment #3
torgospizzaThis looks like it may be a duplicate of #1331230: Contribution: New rule condition "Total product of type quantity comparison".
Comment #4
idflood commentedI think too that it's a duplicate and the other version is even more flexible. I've used the other condition to do exactly what is described in this issue summary.
Feel free to change the status of this issue if this is not the case.