You are here: Re: [PHP] creating a shopping cart. « PHP « IT news, forums, messages
Re: [PHP] creating a shopping cart.

Posted by adriano ghezzi on 10/02/05 02:53

depends imho there are a lot of reasons to use a db approach, unless
you are working on a really poor system,
first is persistent in any case you'll never lost an item
is the only way to make your software scalable to hundreds of users,
using array you have everything in memory, you must set up your
persistent system unless you trust a lot sessions that basically is a
file on disk
but as everything it's up to you

I really suggest you to go on db I can't see any disadvantage
bye

2005/10/1, Robert Cummings <robert@interjinn.com>:
> On Sat, 2005-10-01 at 11:41, adriano ghezzi wrote:
> > you need a db based approach, just setup a couple of tables in mysql
> >
> > items table
> > one record per item
> >
> > current cart table
> > one record per each item added to cart with unique session id
> >
> > order table
> > one record per each item ordered with unique order id
> >
> > you'll transfer records here from current cart when user checkout
>
> A DB approach is nice, but not necessary. Serialization of a shopping
> cart array that contains the contents of the cart is sufficient. While a
> DB is a natural solution, I've heard of systems that use the file system
> or even email the request to a fulfillment address.
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация