Results 1 to 3 of 3
-
06-20-2002, 10:12 PM #1Newbie
- Join Date
- Mar 2002
- Location
- hells, kitchen
- Posts
- 6
need help with php script one year free hosting offered
I am needing help with a shopping cart that i am building and i need someone who could help show me how to create the ability to declare options for products such as size and color and that each value for size and color could decrease or increase the base cost of a product.
250MB
15 GB transfer
10 Subdomains
100 email accounts
PHP 4.2
MYSQL
PERL
I just need some real help if you interested please contact me through pm or just reply to this message.
-
06-21-2002, 12:53 AM #2Newbie
- Join Date
- Nov 2001
- Posts
- 17
Assuming you have a table with products in it, you'll need to add another table that holds the options and corresponding price changes.
For instance:
Code:products options -------- ------- (id) (option_id) name product_id price price_diff name
If you'd like more help, feel free to email me using kurt@mackeybros.com and show me your current schema.
-
06-23-2002, 01:05 AM #3Disabled
- Join Date
- Jun 2002
- Location
- FL
- Posts
- 13
without using HTML tags, you could just use
$base_price = "10.99";
say thats the cost of your t shirt or something.....
now, to add lets say 2.50 , for an X-large, do this:
$new_base_price = "$base_price + 2.50";
echo "new price is :$new_base_price";
You can use simple math in PHP, Somthing + something or somthing * something, very easy