Basically, with CCGV(trad) the coupon code is automatically generated at line 42 in admin/gv_mail.php:
CODE
$id1 = create_coupon_code($mail['customers_email_address']);
I found it calls to admin/includes/add_ccgvdc_application_top.php:
QUOTE
function create_coupon_code($salt="secret", $length=SECURITY_CODE_LENGTH) {
$ccid = md5(uniqid("","salt"));
$ccid .= md5(uniqid("","salt"));
$ccid .= md5(uniqid("","salt"));
$ccid .= md5(uniqid("","salt"));
srand((double)microtime()*1000000); // seed the random number generator
$random_start = @rand(0, (128-$length));
$good_result = 0;
while ($good_result == 0) {
$id1=substr($ccid, $random_start,$length);
$query = tep_db_query("select coupon_code from " . TABLE_COUPONS . " where coupon_code = '" . $id1 . "'");
if (tep_db_num_rows($query) == 0) $good_result = 1;
}
return $id1;
}
Is there a way to just use a text box and input the coupon code I want to use? I am by far no programmer, but this system is so simple to use thanks to all of the contributions and great support!
Thanks!