(Now CiviCRM 4.7.0, Drupal Commons 7.50 and CiviDiscount 3.3)

If a user uses a coupon code, the coupon code is no longer tracking the number of times it is used or who used it. It appeared to be working until I realized that it only tracks two situations: if there was money exchanged (not a 100% discount) and/or if the coupon was used during a transaction put in on the backend and not by the user.

Furthermore, you should be able to assign an organization to the code so that the "codes assigned" and "codes used" is tracked. As it sits, those tabs do not report anything.

Screenshot of how discount code is set up: enter image description here

Screenshot of membership: enter image description here

Screenshot of price set used: enter image description here

Also, when I first look up "Test Organization for Code", the organization that I applied the the test discount to, the tab clearly shows that there is a code assigned, however, when the tab is clicked on, nothing shows and the value is changed to zero. This could be an important clue. enter image description here

enter image description here

Lastly, here you can see a MySQL table showing all recorded uses of the same code (item_id=2) but the data is being recorded differently. The last 4 were entered through CiviCRM and the first 2 were entered through a Contribution page, when it was still tracking; there should be about 25 rows, but the rest of the uses were never recorded: enter image description here

Here you can see where the discount code that was used is still reporting 0 uses: enter image description here

Here you can see where the test user that used the code is still showing that no code was used: enter image description here

Things I've Tried:

  • Changing CiviCRM to a standard install.
  • Upgrading Drupal Core, CiviCRM and CiviDiscount to latest major versions.
  • Was unable to reproduce the error on my own simplified sandbox using the same versions

(Edited from running CiviCRM 4.3.8 with Drupal 7.37 (Commons))

  • 2
    Have you updated CiviDiscount since you first installed it? CiviCRM 4.3.8 is a very old version, and updates to CiviDiscount wouldn't be tested against it. Do you have a test version of your site you could upgrade to the latest version of 4.6 or 4.7 and see if that solves your issue? Commented Jun 19, 2016 at 15:52
  • I upgraded the CiviCRM to 4.7, Drupal to 7.5 and CiviDiscount to 3.3 but still no luck.
    – Christia
    Commented Dec 31, 2016 at 0:40

2 Answers 2


I'll ad this as an answer so it's not lost in a comment. Steps to figure this out would be:

  1. CiviDiscount is installed on demo/dmaster: try and reproduce your scenario/bug on demo/dmaster - starting by adding discount config here: http://dmaster.demo.civicrm.org/civicrm/cividiscount

  2. If you can reproduce the issue you're seeing on: http://dmaster.demo.civicrm.org/civicrm - then file an issue here: https://github.com/dlobo/org.civicrm.module.cividiscount/issues

  3. If things are working properly on http://dmaster.demo.civicrm.org/civicrm - the issue may have been resolved and you would then look at upgrading your own instance to that CiviCRM version/CiviDiscount version.

All the best!

  • This is great information, thanks for adding! I edited my question to include that I have been unable to reproduce the problem on other sites.
    – Christia
    Commented Jan 2, 2017 at 4:04
  • Have you tried reproducing it on dmaster though? That is the one that really matters for possible bugs/issues Commented Jan 2, 2017 at 4:26
  • If you mean the one you just provided links to, then yes, I have set it up the same way as on my website and it works.
    – Christia
    Commented Jan 2, 2017 at 5:22
  • So you'll want to get to the same versions i.e. 4.7.14 and latest CiviDiscount Commented Jan 2, 2017 at 5:27

I was able to isolate the CiviDiscount tracking problem in a separate sandbox site. Using Drupal Commons at the latest version, CiviCRM 4.7.4, and CiviDiscount 3.3, with no customizations or other modules installed, I tested discount codes and they were not tracked, just as described in my question.

When I upgraded to the latest version of CiviCRM (4.7.14) the issue was resolved.

In my first round of testing using a sandbox, I had installed Drupal but not Drupal Commons and CiviCRM 7.4.9 and the discount code worked properly.

  • 1
    Glad you figured it out! Now onto 4.7.15 (just released) 😀 Commented Jan 5, 2017 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.