Hi there!

I just noticed, that coupons generated based on an invite with successfull buy always have the creation-date 01.01.1970 (Unix-timestamp 0).

Not a big issue to me, but would be nice to have the right date ;)

Comments

v8comp’s picture

There is a fix for this included in my patch here: http://drupal.org/node/1121078#comment-6275002

Or just change the db_query line in the uc_invite_discount_order() function to add the 'created' field:

$result = db_query("INSERT INTO {uc_coupons} (name, code, value, type, status, valid_from, valid_until, max_uses, minimum_order, data, created) VALUES ('%s', '%s', %f, '%s', %d, %d, %d, %d, %d, '%s', %d)", $name, $code, $value, $type, $status, time(), $valid_until, $max_uses, $minimum_usage_order, serialize($data), time());