-
Notifications
You must be signed in to change notification settings - Fork 65
CiviDiscount does not affect line item amounts #224
Comments
Agileware ref CIVICRM-1286 |
This may actually be a core issue, but seeing as cividiscount is the affected workflow, this seemed like a better place to start from. |
@agileware-fj I filed this core issue a few months ago: Incorrect line item created for back-end membership sign-up using price set and CiviDiscount. Do the conditions and symptoms fit? I was only able to replicate it in the specific conditions described there:
I spent some time looking at it in a debugger and found that the price set was being instantiated twice, once with the discount, once without, causing the line items to be calculated without the discount. However if there was only one item, a different route through the code kicked in, overriding the line item amount. I came up with a couple of approaches to fixing but they need more testing and review. I'm aiming to work on this a bit today/tomorrow, I'll update here with any progress & a link to a PR if I get that far. Cheers, Dave |
@agileware-fj Core PR created: civicrm/civicrm-core#14994 - would be great if you could test & review. |
@agileware-fj That PR had test failures, I'm going for an alternative approach: civicrm/civicrm-core#15004 - again would be great if you could test & review. |
@Monish please monitor this thread and help push to complete and merge in coming days. |
@davejenx sounds about right, except we didn't need to add an additional amount. Sound like this is most likely a core issue based on that, although seems like there are some opinions on your second PR's approach already. |
After fix to dev/core#860 and some more extensive testing, I've determined that this is not a cividiscount issue. Closing. |
CiviDiscount does not affect line item amounts
Steps to reproduce:
Expected results:
Actual results:
I suspect this may be the results of hook_civicrm_buildAmount not actually being conferred to line items.
The text was updated successfully, but these errors were encountered: