Akopia Akopia Services

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

Re: [mv] Saved Cart Question?



On Sun, Mar 25, 2001 at 08:25:08PM -0700, OTR Comm wrote:
> cfm@maine.com wrote:
> > 
> 
> > 
> > Is that any different from an item disappearing from the store
> > during a session?  Do you have some sort of extra long session life
> > tied in with prepayments or some such?
> 
> Yeah, I have benn working on a 'patch' minivend 3.14 that lets me have a
> unique item (like a painting) in a gallery.
> 
> When the first person puts the unique item in their cart, anyone else
> who comes to the page with this item will see a 'Sale Pending' notice
> for the item and no one else can put it into their cart until a few
> options happen.
> 
> If the prson with the item completes the purchase, then the 'Sale
> Pending' notice changes to 'Sold' and that is that, no one else can
> purchase the item anyway.
> 
> If the person with the item in their cart removes it from their cart,
> the item is then available for some one else to purchase.
> 
> Now, what I have to do is cover the cases where the person with the item
> in their cart leaves their session going, but does not exit the store or
> remove the item from their cart and/or the case where someone saves
> their cart.

Yes, I can see the application.  My preference is to handle minivend
stuff through minivend *or* remove it from minivend entirely.  I'd 
not want to touch session files with anything except unlink().  So that 
asks the question, how to get minivend to do it.  Suppose you created a
page that had the necessary perl code to validate your conditions.
Now you just need to call it in the absence of the visitor.  So
you might create a log file of visitor, session id, and time.  Or
you might be able to pull that from the session read only.  Session
files would be easier than session.gdbm.  We'd probably just log it
in a separate db; it promises more long term utility that way.  You
might also put into that log some data what a visitor has just to
speed it up, eg the items and expiration times.

So each page in session has a [my_save_session] that does that.

You have an admin page with a [my_expire_items].

Then your outboard script iterates that db to find visitors that
are holding on to unpurchased items past the permitted time.  It
sends a GET/POST with session id to the minivend page including
[my_expire_items].  That script does the dirty work within the
minivend environment.  Maybe a post to basket with stacked item/qty
pairs will do the trick and you don't even need [my_expire_items].
Me, I'd rather do it in embedded perl than post to basket but that
is probably a matter of personal taste.

YMMV!

cfm

> 
> The first case I take care of with a perl script that runs every five
> minutes and checks the expiration date of the cart (I added cart_created
> and expire_date fields in the products record).  I will let someone keep
> an item in their cart for 24 hours, so if the date and time that the
> perl script checks the products database and finds an item with status
> 'Sale Pending' that has an expire_date older that 24 hours, the script
> resets the status for that item to 'Available'.
> 
> Now, the case where someone saves their cart means that I have to remove
> the unique item from their 'saved' cart after 24 hours.  To do this I
> have to be able to modify the userdb.gdbm file.
> 
> I can do all this when I have all my database setup in MySQL and
> Postgres, but some people may not want to use these databases.  When I
> get the 'patch' completed, I am going to make it available to the
> minivens-users list, but I just wanted to have the gdbm system working
> first.
> 
> Another this that I can to is take a non-refundable deposit on a credit
> card to hold an item for, say a week or 10 days.  The cron system runs
> perl scripts that monitor the status of these special items and when/if
> the deposit hold time is two days away from expiration, the scripts will
> e-mail the customer reminding them that they only have 2 days left
> before they forfeit their deposit.  Obvoiusly, this would only happen if
> they had not completed the purchase.
> 
> I do all my own direct credit card interfacing to Cybercash and First
> Data Corp, so I can process a deposit before I put the item in their
> cart and put the 'Sale Pending' notice up.
> 
> Murrah Boswell
> 
> > 
> > I just tried that and the item simply disappears from the cart but
> > with a qty 1 and price of zero.  We've got some custom cart code so
> > that might or might not be same for you.
> > 
> > Seems to me a little perl routine on the cart/checkout pages
> > could handle that nicely.  Or is there some specific reason you need
> > to remove it from the gdbm file itself, whether the visitor returns
> > or not?
> > 
> > cfm
> > 
> > >
> > > Does anyone know how this can be done?
> > >
> > > Thanks,
> > > Murrah Boswell
> > >
> > > _______________________________________________
> > > Minivend-users mailing list
> > > Minivend-users@minivend.com
> > > http://www.minivend.com/mailman/listinfo/minivend-users
> > 
> > --
> > 
> > Christopher F. Miller, Publisher                             cfm@maine.com
> > MaineStreet Communications, Inc         208 Portland Road, Gray, ME  04039
> > 1.207.657.5078                                       http://www.maine.com/
> > Content management, electronic commerce, internet integration, Debian linux
> > 
> > _______________________________________________
> > Minivend-users mailing list
> > Minivend-users@minivend.com
> > http://www.minivend.com/mailman/listinfo/minivend-users
> 
> _______________________________________________
> Minivend-users mailing list
> Minivend-users@minivend.com
> http://www.minivend.com/mailman/listinfo/minivend-users

-- 

Christopher F. Miller, Publisher                             cfm@maine.com
MaineStreet Communications, Inc         208 Portland Road, Gray, ME  04039
1.207.657.5078                                       http://www.maine.com/
Content management, electronic commerce, internet integration, Debian linux

_______________________________________________
Minivend-users mailing list
Minivend-users@minivend.com
http://www.minivend.com/mailman/listinfo/minivend-users


Search for: Match: Format: Sort by: