Question:
MySQL and PHP HElp... I think I did this custom computer store shopping cart wrong?
bri0987
2007-10-07 11:34:45 UTC
I'm in the process of making a "Custom Computer shopping cart" Much like Alienware or AvaDirect... I am having trouble and I think its because of my database structure.

What I'm looking for is a database structure just like these TWO company Web Sites below:
2 examples:
((
http://www.element-tech.co.uk/build.php?products_id=470
and
http://www.alienware.com/configurator_pages/Aurora_7500_b.aspx?syscode=PC-AURORA-7500-B&subcode=SKU-DEFAULT
))

Currently my database is set up but I suck at structuring the way the tables and are into the database.

Anyone out there have any methods OR tips OR has made a database for this type of project and can tell me what they did.

Any help - I will be grateful.

Thank you.
Three answers:
anonymous
2007-10-07 12:43:24 UTC
Your initial tables need to be :

components (id int(6) primary key auto_increment, description varchar(35) unique key, type_id int(6), obsolete int(1) default 0);

component_type (id int(6) primary key auto_increment, type_descn varchar(35) unique key);

client_selection (order_id int(6) not null, component_id int(6));

orders (id int(6) primary key auto_increment, user_id int(6), Order_date date);

Coupled with a client table using an auto_increment id field and carrying each user's details you can link each build to the client, and an order. A client can make hundreds of orders this way, the data is linked by id, and each build can be distinguished from previous orders. A quantity order could be created using an additional table for build_1, build_2 etc, including a quantity field, the primary key id from this can be used to link groups of components to each of a different machine on the same order. You would then add a field to the client_selection table to identify which part fits in which machine. Keep the fields in each table to a minimum, use id links to identify data to it's client, machine, order, build etc. A price table listing prices against component id allows for simple costing updates, a table for prices at date of order against component id on the order could mean selling at one price today, increasing the price tomorrow and building the machine next week without upsetting the client. He gets billed what he was quoted. Small amounts of data and linking makes the system flexible, don't be afraid to modify tables as required during testing.
kolibrizas
2007-10-07 11:56:51 UTC
Strange words: "but I suck" :D whatch out! Try not use word stuck again, as very quick mistake is being done! :D lol. I am just kidding. I do not think database is very difficult. Just add goods, prices, of course carts and etc. You should try looking for security issues on such things! Good luck! please invite me to your page as it is done, ok?
melissa
2016-05-18 05:25:37 UTC
Hi, I'd be happy to assist with your project PM me Kind regards Brian


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...