Probably not that simple...

Say User A requests the auction page 5 minutes before the auction expires.
He sits there looking at the page for 10 minutes before he decides what he
wants to do. By the time, he enters his bid, the auction has officially
closed. So when he submits his bid, he gets a "gotcha" message telling him
the auction has closed. Not what User A wants to hear!

So I think a JavaScript timer would be in order so users could see a
countdown to the auction close time. Having said that, I don't recall that
I've ever actually implemented that type of functionality on any of my web
applications...but you should be able to do a Google search on "Javascript
timer" and turn up something. You'll probably want to make use of MX 7's
ToScript() function to set a Javascript variable to the auction's expiration
timestamp.

Dina
(BTW, sorry for the delayed response)




On 10/8/06, Justin Holzer <[EMAIL PROTECTED]> wrote:
>
> Doug,
>
> There's no reason that you should need to add any kind of logic to
> "expire"
> an auction. You especially would not need to do anything in your
> Application.cfm/Application.cfc. When a user views an auction, just check
> the auction end date/time against the current date/time, and if the end
> date
> has already passed, set some kind of a flag:
>
> ie. <cfset isAuctionFinished = dateCompare( now(), auction_end_date ) EQ 1
> />
>
> That's it. All you have to do at that point is just check in your code if
> the auction is finished, and take the necessary action based on that. I am
> leaving out tons of implementation specific details, and of course you'ld
> want to validate your data, but the general idea is that you just check if
> the auction is finished whenever a user views it. You're having to
> retrieve
> that auction data anyways, so what's the big deal in adding one extra
> check
> to see if it's finished? I don't see any reason to run a scheduled job
> when
> it's not a problem to do the check in real time.
>
> As for the preferred payment, why not give the seller the opportunity to
> do
> both things you talked about? In their profile, let them choose a
> preferred
> method, but at the same time, give them the option to use a different
> method
> on a per-auction basis.
>
> - Justin
>
> On 10/8/06, Doug Brown <[EMAIL PROTECTED]> wrote:
> >
> > Dina,
> >
> >
> > Thanks for the reply. As for the first question, [auction_end] I
> > understand
> > how to set-up the table as far as that goes, but am not sure if I should
> > simply run the code for checking the expire date/time in the
> > application.cfm
> > or another way. What would you do?
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Dina Hess" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[email protected]>
> > Sent: Sunday, October 08, 2006 9:34 AM
> > Subject: Re: database design revisted
> >
> >
> > > [auction expire]
> > >
> > > auction_start_date
> > > days_listed
> > > auction_end_date
> > >
> > > Maybe I'm missing something here, but it appears that when an auction
> is
> > > initially configured, you can set the auction_end_date by
> > > adding auction_start_date and days_listed. From there, all you need to
> > do
> > is
> > > compare auction_end_date to the current date.
> > >
> > > [payment_method]
> > >
> > > I would set up master tables for payments options and shipping options
> > for
> > > use with separate preference tables for payment and shipping:
> > >
> > > (assume SQL Server database...untested)
> > >
> > > -- master table for payment options
> > > create table payment_options (
> > >    pmt_option_id int identity not null primary key,
> > >    pmt_option_desc varchar (50)
> > > );
> > >
> > > -- master table for shipping options
> > > create table shipping_options (
> > >    shp_option_id int identity not null primary key,
> > >    shp_option_desc varchar (50)
> > > );
> > >
> > > create table seller_pmt_preferences (
> > >    user_id int not null
> > >      references user (user_id),
> > >    pmt_option_id  int not null
> > >      references payment_options (pmt_option_id),
> > >    constraint pk_seller_pmt_pref
> > >      primary key clustered (user_id, pmt_option_id)
> > > );
> > >
> > > create table seller_shp_preferences (
> > >    user_id int not null
> > >       references user (user_id),
> > >    shp_option_id int not null
> > >       references shipping_options (shp_option_id),
> > >     constraint pk_seller_shp_pref
> > >      primary key clustered (user_id, shp_option_id)
> > > );
> > >
> > > Then use the following query syntax to pull the seller options for
> > display:
> > >
> > > <!--- get seller payment options --->
> > > select p.pmt_option_id, p.pmt_option_desc
> > > from payment_options p inner join seller_pmt_preferences s
> > > on s.pmt_option_id = p.pmt_option_id
> > > where s.user_id = <cfqueryparam cfsqltype="cf_sql_integer"
> > > value="#form.user_id#">
> > >
> > > Dina
> > >
> > >
> > >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256012
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to