How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Promotions - Number of Uses Tracking when Manually Applying a Promotion



Currently, the number of times a promotion is used does not increment when manually applying a promotion code to an existing service. The manual application of promotion codes is often done for clients who either forgot to enter the code or were unaware the code existed before purchase.

The following query indicates that the total services with a specific promotion do not match the total uses count in the promotions table entry.

mysql> SELECT COUNT(id) AS uses FROM tblhosting WHERE promoid= 10 UNION SELECT uses FROM tblpromotions WHERE id = 10;
+------+
| uses |
+------+
| 4 |
| 2 |
+------+

Solution: Increase or decrease the uses column for a promotion code by the value of 1 in the table tblpromotions when manually applying or removing a promotion code to an existing service.

Post the first comment

Login to post a comment.