View Single Post
  #1  
Old 09-08-2005, 11:00 AM
 
gfiebich gfiebich is offline
 

Senior Member
  
Join Date: Feb 2003
Location: St. Paul, MN
Posts: 108
 

Default Shorten length of Gift Certificate codes

My client wasn't happy with the length of the auto-generated gift certificate codes (16 characters long). Here's the tweak I made to cause the system to generate shorter codes:

In /admin/giftcerts.php look for

Code:
$gcid = strtoupper(md5(uniqid(rand())));

and change this to

Code:
$gcid = substr(strtoupper(md5(uniqid(rand()))),0,6);

This simply trims the original gcid down to the last 6 characters. It should be noted that this statistically reduces the uniqueness of the the Gift Certificate code.

This was done in x-cart gold 4.0.13
__________________
NO LONGER USING X-CART - NOT ACTIVE IN THESE FORUMS