Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
Izzmo
Nick George
Send A Message
Rating
Not
Rated
Please login to rate source codes.

Click here to register a free account with us.
General Details
PHP (Hypertext Preprocess...
Posted 342 Days Ago
849 Views
Received 0 Ratings
More Codes By This Author
Portable Contact Form v2
[PHP] Shopping Cart Class...
Pascal's Triangle with Bi...
Bill Change
Portable Contact Form
Articles By This Author
Embed flash into your web...
Introduction to Pseudo Co...
Command Line and Batch Fi...
Redirect your site from n...
Another way to disable th...

[PHP] Shopping Cart Class (SESSION-based)


Description
This is a very easy to use PHP class that is also very portable. Everything is explained in the class on what it is and how to use it.
Technical
Required PHP 5.x and use of SESSION's
Source Code
Comments
Please login to post comments.
 
Izzmo     Posted 336 Days Ago
 
 
Message sent.
 
pro-health-herbal-su     Posted 338 Days Ago
 
 
Izzmo,

This is a gods send if I can get it to work.
The main question is how to put it together with what is in place, or does it
replace ?? , and how ?? new at php.

On the product pages I have;

<form id="form1" name="form1" method="post"
action="">
<input type="hidden" name="product"
value="<tr>
<td><? print_r($product[1][0]) ; ?></td>
<td><? print_r($style[1][1]) ; ?></td>
<td><? print_r($weight[1][2]) ; ?></td>
<td><? print_r($sprice[1][3]) ;
?></td></tr>">
<input type="submit" name="Submit1" value="Ad
To Cart">
</form>

To place the info on the checkout page is;

<table align="center" borber="0" Width="700">
<tr>
<td width="200">Product</td>
<td width="200">Style</td>
<td width="100">Weight</td>
<td width="100">Price</td>
</tr>
<tr>
<td>&nbsp;<td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<?php
foreach ($_SESSION as $key => $value) {
if (strpos($key, 'Submit') === 0) {
continue;
}
echo "$value", "<br>" ;
}
?>
</table>

The information is held is session with id's as;

$_session['product'] = "product[1][0]" ;
$_session['style'] = "style[1][1]" ;
$_session['weight'] = "weight[1][2]" ;
$_session['sprice'] = "sprice[1][3]" ;

$product[1][0] = "Alfalfa" ;
$style[1][1] = "Cut And Sifted" ;
$weight[1][2] = "1 lbs." ;
$sprice[1][3] = "17.78" ;
$shipping[1][5] = "5.00" ;

So, the question is, how does this get intagrated with.

The web page is; http://www.pro-health-herbal-supplements.com

The php is being worked live on the server, page was posted 2 weeks ago.
You can understand my eurgency about getting the session cart compleated.
Thank You Gary
Page 1 of 1
More "PHP (Hypertext Preprocessor)" Source Codes By This Author
Recently Posted "PHP (Hypertext Preprocessor)" Source Codes
Recently Rated "PHP (Hypertext Preprocessor)" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
Which sounds better on your coder profiles, and makes more sense to you (think twitter, facebook, etc)?

Followers / Following
Fans / Following
Fans / Fan Of


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
1.20 Year Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2010, Scott Thompson, All Rights Reserved