Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Rules integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2011 at 04:05 UTC
Updated:
27 Feb 2013 at 13:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
essbee commentedI am close to having a rule condition "Total product of type quantity comparison" which would at least allow one to determine how many of a certain product type were in the cart.
I have the rule admin side of things working, but can't work out how to determine the product type of a line item as it is not contained within the line_item array.
Any input here greatly appreciated.
Comment #2
essbee commentedI have managed to create a new Rule condition called "Total product of type quantity comparison"
This condition is the same as the "Total product quantity comparison" but also takes a product type, and only counts items of that type.
I have posted it to Commerce Extra Rule Conditions as that seemed the best place for it. Hopefully they integrate it into the project.
http://drupal.org/project/commerce_conditions
Cheers,
Sam
Comment #3
mossy2100I have only just seen this issue :) I did check the issue queue before implementing the feature, but I must not have seen this item or realised that it's the same as the one I was working on. Anyway, the attached patch adds a condition "Order contains a particular product type" to commerce_order.rules.inc. If you think it's useful, please use!
Comment #4
mossy2100Did anyone from commerce look at my patch?
Comment #5
acrazyanimal commentedI second the request for this to be added to the commerce module itself. Thanks.
Comment #7
acrazyanimal commentedI've tested the patch on my end and it seems to work fine. Looking at the failed test results I can't determine that this patch is causing a problem. From the log messages it looks to have been applied okay. What should the next step be to resolve this???
Comment #8
mossy2100Thanks for testing the patch. I'm not sure how to proceed. Do I have the tests that I can run myself?
Sorry for not responding sooner - for some reason I'm not receiving any notifications from d.o.
Comment #9
mossy2100#3: commerce-order_product_type_rule-1249442-1.patch queued for re-testing.
Comment #11
acrazyanimal commentedLets see if this works, I just recreated the patch against the current dev. I still don't understand why the last version failed.
Comment #12
acrazyanimal commentedAwesome! Super useful rule, I use it all the time now. Thanks mossy2100. I included your authorship in the recreated patch so you get your cred. :)
Comment #13
mgiffordPatch applies nicely. What testing is required before this can be marked RTBC and brought into the module?
Comment #14
acrazyanimal commentedA-hem! Is there any reason that this patch is not making its way into the commerce module?
Comment #15
rszrama commentedI'm betting it was simply the version number mismatch. Reviewed, cleaned up, and committed. Thanks for bringing it back from the dead. : )
Commit: http://drupalcode.org/project/commerce.git/commitdiff/e749374
Comment #16
acrazyanimal commentedAwesome thanks!