Akopia Akopia Services

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

[mv] Can this be faster?



******    message to minivend-users from Chris Rapier <rapier@psc.edu>     ******

I'm using the following code to try and prevent users from signing up
for multiple accounts. I need to do this because the users get a 1st
order bonus. The customer code is a number that will be (hopefully)
unique to each user based on their billing name and city/state/zip. I
know this approach isn't perfect but I can't think of a better way at
the moment.

The following code should be mostly self explanatory. I was wondering if
anyone could see a better way to handle this? 

[loop search="fi=userdata.txt/un=yes/ra=yes"]
 [seti db_customer_code][data table=userdata column=customer_code
key="[loop-code]"][/seti]
 [seti uname][loop-code][/seti]
  [if type="scratch" term="customer_code" op="=~" compare="/[scratch
db_customer_code]/"]
    [if type="!scratch" term="uname" op="=~" compare="/[value
mv_username]/"]
     [set bonus_flag]2[/set]
  [/if]
 [/if]
[/loop]

Chris Rapier
-
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: