MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

RE: Partly SOLVED: Account Balance/Gift Certificate/Discount MV:3.12



******    message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com>     ******

In a late night reading of Programming Perl (O'Reily) the Camel Book - I
found on pp550-1 a library modele called Text::Soundex in which words are
hashed into a 4 character string that approximates the sound of the
original string.  Example:

use Text::Soundex;

$code = soundex $lastname;

If you applied the customer's last name, say 'Knuth' the $code would be
'K530'.
I figured this could be useful in generating a unique serial number for a
gift certificate, with the addition of a non-formatted date and time.

Just my initial thought.

-Ryan

At 08:47 AM 4/30/99 , Russ wrote:
>******    message to minivend-users from "Russ" <russ@khouse.org>     ******
>
>Yes and Yes!
>
>Here is my global sub to put a gift certificate in a file and return a
>random string which is the code for the gift certificate.  It's not
>completely a moot point, because whenever I get around to making gift
>certificates for sale, they will have to be accessed by some unique code!
>
>
>GlobalSub <<EndOfSub
>sub gift_certificate {
>my($username, $amount) = @_;
>my($string, $file);
>$file = "/home/minivend/catalogs/newcb/products/gift_certificate.txt";
>$string = random_string();
>open (FILE, ">>$file") || return "Can't open $file\n";
>print FILE "$string\t$username\t$amount\n";
>close (FILE);
>return "$string";
>}
>EndOfSub
>
>-----Original Message-----
>From: owner-minivend-users@minivend.com
>[mailto:owner-minivend-users@minivend.com]On Behalf Of Ryan Hertz
>Sent: Thursday, April 29, 1999 4:49 PM
>To: minivend-users@minivend.com
>Subject: Re: Partly SOLVED: Account Balance/Gift Certificate/Discount
>MV:3.12
>
>
>******    message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com>
>******
>
>Russ, did you ever tackle the unique numbering system, or is that moot
>since you attach the 'gift cert' to the user's account?
>


Ryan Hertz                                              tel  520-645-3812
Webmaster                                               tel  800-645-BAIT
Advertising Director                                    fax  520-645-2588
Gary Yamamoto Custom Baits, Inc.            http://www.yamamoto.baits.com
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: