Re: creating a shopping cart.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2005-10-01 at 09:31, Emil Novak wrote:
> Hi!
> 
> The best way is already presented in PHP manual:
> http://www.php.net/oop . In this example you create an object, which
> you can - naturaly pass over Session, etc.
> 
> If you'll use OOP (Object-Oriented Programming), it is preffered in
> PHP5 to use OOP5 (OOP for PHP5). You can find details on
> http://www.php.net/oop5 .

While I would personally use OOP for a shopping cart, there is nothing
that indicates it is the "best" way. Anything that can be done using
objects can also be done procedurally using arrays. Additionally, PHP4
is quite sufficient for shopping carts versus necessarily moving to
PHP5. There are already many many shopping cart solutions implemented in
PHP4 thus PHP5 is obviously not a necessity even if it might be nice.
What the originally poster needed to know was how to go about it, and
yes the session is probably the route. The OP can also use permanent
cookies if supported by the visitor to remember the visitor upon
subsequent return, but this can also be facilitated with a login system
for registered members.

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.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux