I've tried looking around but haven't seen anything specific to my problem. On install the rules have errors. I can't find any docs or anything in the queue so I'll post them here. for Coupon Redeem:

Error: Data selector coupon:commerce-coupon-fixed-amount for parameter data is invalid.

and for Coupon Validate:

Error: The component commerce_coupon_basic_validate_uses_of_coupon_component fails the integrity check. Error: Data selector commerce_coupon:commerce-coupon-number-of-uses for parameter data is invalid.

Running updated Rules, cleared cache, disabled/uninstalled Commerce Coupon, and tried reinstalling but same issue both times. It's late so I might be missing something. I've also been told on occasion that I'm stupid so that might be it too.

Thanks.

Comments

pcambra’s picture

Status:Active» Postponed (maintainer needs more info)

Have you tried the -dev version?

I can't reproduce this, some additional details would help.

RKS’s picture

What kind of details would you like? All I did was install and the Rules come out invalid. I haven't tried dev but i will and let you know if that fixes it.

Darren Shelley’s picture

You will receive this error because the entity metainfo for "commerce_coupon_number_of_uses" is not provided unless you have created a 'coupon type'. See commerce_coupon_entity_property_info_alter(&$info)

I feel this issue should be addressed, enabling via drush will throw the rules integrity error. This caused me, I feel to have to unnecessarily debug the module. Had i not seen the error i would have just got on and added a coupon type and everything would have been okay.

pcambra, what do you think the best solution going forward is, I recommend either:
- include a default coupon type OR
- rule is off by default, and is enabled if any coupon types present

pcambra’s picture

Status:Postponed (maintainer needs more info)» Active

Setting back to active, we need to address this issue, however, what is the point of having the coupon module installed without any coupon type.

Thanks for the details Darren.

firfin’s picture

I agree that there is little point to having coupon module without having a coupon type ( let alone coupons.) But it does raise questions. So maybe a (note / faq / known problems/issues section)* in the readme would be sufficient?
And maybe a notice for drush installs (not sure if that is even possible) ?

* = choose your favorite

RKS’s picture

Yeah, that's what happened to me, too. I saw the error first and never got to the point of creating a coupon type. Had I not, I would have just created a coupon and never noticed anything. For the time being while you decide what you want to do, would you like me to add this to your documentation? Just to ignore the error at first and create a coupon type?

firfin’s picture

Seems to me as a good (at least temporarily) idea RKS.
Go for it :-)

Kebz’s picture

Issue summary:View changes

It's throwing too many errors for the "coupon validation". Should I negate??

Coupon Validation: Check the number of redemptions
Machine name: commerce_coupon_validate_uses_of_coupon, Weight: 0
Error: *The utilized component commerce_coupon_validate_uses_of_coupon_component fails the integrity check.*

ERRORS come up for:

Editing rule "Coupon Validation: Set the coupon as invalid if number of uses is reached"

Conditions
Elements Operations

Entity has field
Parameter: Entity: [commerce_coupon], Field: commerce_coupon_number_of_uses
editdelete

AND
Error: *Data selector commerce_coupon:commerce-coupon-number-of-uses for parameter data is invalid.*
editdeleteAdd conditionAdd orAdd and

OR
Error: *Data selector commerce_coupon:commerce-coupon-number-of-uses for parameter data is invalid.*
editdeleteAdd conditionAdd orAdd and

Data comparison
Parameter: Data to compare: [commerce_coupon:commerce..., Operator: is lower than, Data value: [number-of-redemptions]
Error: *Data selector commerce_coupon:commerce-coupon-number-of-uses for parameter data is invalid.*
editdelete

Data comparison
Parameter: Data to compare: [commerce_coupon:commerce..., Data value: [number-of-redemptions]
Error: *Data selector commerce_coupon:commerce-coupon-number-of-uses for parameter data is invalid*