All those fields DO exist in my database. Here's a describe on my idx_discount_coupon table:
Code:
mysql> describe idx_discount_coupon;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| coupon_id | int(11) | NO | PRI | NULL | auto_increment |
| coupon_code | varchar(255) | YES | | NULL | |
| coupon_value | varchar(50) | YES | | NULL | |
| link_type | varchar(255) | YES | | NULL | |
| start_date | date | YES | | NULL | |
| expired_date | date | YES | | NULL | |
| expired_usage | int(11) | YES | | NULL | |
| usage_count | int(11) | YES | | NULL | |
+---------------+--------------+------+-----+---------+----------------+
8 rows in set (0.00 sec)
Here's an all fields query on that table:
Code:
mysql> select * from idx_discount_coupon;
+-----------+--------------+--------------+-----------------------+------------+--------------+---------------+-------------+
| coupon_id | coupon_code | coupon_value | link_type | start_date | expired_date | expired_usage | usage_count |
+-----------+--------------+--------------+-----------------------+------------+--------------+---------------+-------------+
| 1 | PRM090216 | 1 | {"PREMIUM":"PREMIUM"} | NULL | NULL | 1 | NULL |
| 2 | PRM090021602 | 14 | {"PREMIUM":"PREMIUM"} | NULL | NULL | 1 | NULL |
+-----------+--------------+--------------+-----------------------+------------+--------------+---------------+-------------+
2 rows in set (0.00 sec)
The second coupon is the one we're interested in. The FIRST one was set up to try to reduce the amount due to $1. I did it wrong. But in EACH case, the coupons were defined as expired based on usage. But LOOK close at the usage_count column. I'd say the null value in the numeric usage_count column which SHOULD contain a 1 could be the underlying cause of this abort. But I'm no PHP programmer and I didn't write the code. So, I'm only guessing.