joinx Posted April 23, 2008 Share Posted April 23, 2008 I am doing an ecommerce site.. I allow my user to configure a pc so many options is given..like Motherboard: Monitor: etc...each item has a drop down list where the user select which one he wants.. Now i have to calculate the price of the whole pc and display it.. I have to connect to the database to do that... i know how to select one item but here i have so many items.. How to deal with that? Link to comment https://forums.phpfreaks.com/topic/102606-drop-down-list/ Share on other sites More sharing options...
craygo Posted April 23, 2008 Share Posted April 23, 2008 Well we need to know how your database is structured. To store your items you can either do it in sessions or have a table which holds the temporary items in it. A lot of ways to do things, all depends on what you have now. Ray Link to comment https://forums.phpfreaks.com/topic/102606-drop-down-list/#findComment-525483 Share on other sites More sharing options...
Xurion Posted April 24, 2008 Share Posted April 24, 2008 I'd suggest session vars, and only write the order to a database once the user has proceeded to checkout or paid. Link to comment https://forums.phpfreaks.com/topic/102606-drop-down-list/#findComment-526348 Share on other sites More sharing options...
joinx Posted April 24, 2008 Author Share Posted April 24, 2008 Well we need to know how your database is structured. To store your items you can either do it in sessions or have a table which holds the temporary items in it. A lot of ways to do things, all depends on what you have now. Ray I will simplify my question... I have a product table (id, name, price, description) etc.... Now i will allow my user to configure each part of the pc... eg for motherboard(3 item, i he select from the drop down list), etc... i already assign values to the product.. i need to select all these and display next page the total price....thn add this selection to the shopping cart.. so how should i proceed?? I have another prob also...i store the url of the images of my product in my database.. but unable to retrieve them... thnx Link to comment https://forums.phpfreaks.com/topic/102606-drop-down-list/#findComment-526432 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.