PHP Basket Class with OOP eCSess_01_07
One shopping solution of many is a session solution with classes (OOP).
Standard Features of PHP Basket Class with OOP:
- Cookie control,
- presentation of products,
- basket handling (add, remove, increase, reduce quantity, zero result handling, subtotal and total),
- session check plus detection of string manipulations.
The handling of the orders is done by the basket class.
That for we need two sessions: one for the basket with the orders and one for the quantities of orders (which are identified through arrays and the product id).
In the next step we control, if the user takes the same order more then once. Whith a control variable (+/-) and a foreach loop we increase or reduce the quantity.
The shopping basket is a combination between a while-list-each- and a database-query. If quantity result is zero, order will be removed from basket.
Security Feature of PHP Basket Class with OOP:
Intrudors will be recognized by a explode script that determines string manipulations (in this example a table name, but also very usefull for other strings).
More popular E-Commerce
- AJAX Hotel Booking Form 4.0 (2 years, 4 months 28 days ago)
- Simple IPN: Free Paypal IPN PHP Script for Digital Download Products 1.0 (3 years, 3 months ago)
- Php-Residence hotel management system 1.3.2 (1 year, 2 months 24 days ago)
- Shopzilla Comparison Shopping Script 2.1 (3 years, 4 months 19 days ago)
- EzInvoice - Invoice Management System 3.1 (2 years, 11 months 24 days ago)
Listing Files

basketOOP_3.gif- 36.8 KB
- 11/20/2007 07:47:14

basketOOP_2.gif- 11.2 KB
- 11/20/2007 07:49:14

php_publ201107.htm- 7.7 KB
- 11/20/2007 11:08:02

basketOOP_6.gif- 12.8 KB
- 11/20/2007 08:33:24

basketOOP_4.gif- 9.6 KB
- 11/20/2007 07:48:48

basketOOP_5.gif- 9.9 KB
- 11/20/2007 08:32:22

basketOOP_1.gif- 43.6 KB
- 11/20/2007 07:41:46

readme.txt- 5.0 KB
- 11/20/2007 09:26:36

detected_user.php- 683 Bytes
- 11/19/2007 11:17:06

tab_names.php- 44 Bytes
- 11/20/2007 07:28:42

testcookie_func.php- 476 Bytes
- 11/24/2007 08:04:16

index.php- 455 Bytes
- 11/19/2007 12:34:38

intr.detect.class.php- 2.3 KB
- 11/20/2007 08:22:26

checksess.class.php- 389 Bytes
- 11/20/2007 07:09:48

products.class.php- 2.4 KB
- 11/20/2007 07:09:26

basket.class.php- 5.9 KB
- 11/20/2007 08:29:50
- FREE MySQL Cloud Database Super Simple, Zero-Management MySQL Cloud DB. Use It FREE!
- Pinterest clone Start your own pin board social network today. Get Pintastic and start your own pinterest clone network.
- MYRE Real Estate Software Professional Real Estate solutions by MYREPHP PROGRAMMING!
