[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Keeping track of how much a user has spent...
Dear Ed,
Thank you - I experimented a little and found that adding the line:
[value name=credit_limit set="[scratch credit_limit]" hide=1]
right before the [userdb save] cleaned it all up.
-Russ
-----Original Message-----
From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-users-admin@interchange.redhat.com]On Behalf Of Ed
LaFrance
Sent: Tuesday, January 22, 2002 1:13 PM
To: interchange-users@interchange.redhat.com
Subject: Re: [ic] Keeping track of how much a user has spent...
At 12:14 PM 01/22/2002 -0700, you wrote:
>Hello,
>
>I want to keep track of how much money a user has spent on my store in his
>userdb record. In the log_transaction file, I figured I could hijack the
>credit_limit function and just reverse it.
>
>There is a line like this:
>[seti total_cost][total-cost noformat=1][/seti]
>
>then the Add main order data lines...
>
>Then this:
>
>set credit_limit: [seti credit_limit][data
> table=userdb
> col=credit_limit
> key="[data session username]"
> value="[scratch total_cost]"
> increment=1
> ][/seti]
>
>Seems like it would work right? Well, it doesn't.
>
>I think it has something to do with a [userdb save] going on in the
>receipt.html file (to make sure that all the users newly entered data is
>saved), possibly overwriting the value with the old scratch value. Is
there
>a better way to do this?
>
>-Russ
That's probably right. I guess your options would be:
1. move the above code so that it is parsed after the [userdb save], and
add a [userdb load] thereafter to update the values hash;
2. Leave the code in place, but add this immediately after:
[value name=credit_limit set="[scratch credit_limit]" hide=1]
- Ed L.
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users