shopping cart - customise items

tonMachine100 used Ask the Experts™
I'm working on an shopping cart. I've used some sample code i've found on the web as a basis but now i need some help as the requirements of the project have developed.

As it stands there are 3 pages - a product page, a product customization page and a cart page.

The requirement is for a customer to be able to select a product from the product page - the product_id is then passed through to the customization page where the user can select which material and color they would like the product to be, then the product id and customization details will be passed through to the cart and displayed.

At the moment the product id is passed through to the final cart screen but the color and material values (captured through 2 picklists) are not being displayed.

The product colour and material details are stored in 3 separate tables (t_products, t_material, and t_colour). There are no links between the three tables (t_material and t_colours are just lookup tables).

I've attached:
 a screen shot of the 3 pages and a mock up of how i'd like the cart page to display the items and custom item data
The three .php files
The mysql create table and insert statements

Can somebody give me some guidance around how the code in the cart.php file needs to be adapted to display the customized items.

Any help is appreciated
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016
I don't have time right now to dig into the details, but I can make a quick suggestion.  After each form is submitted, copy the form input data into the session array.  Just do session_start() at the top of each script and do something like $_SESSION['POST'][] = $_POST; in each script that receives posted input.  Then when you are trying to see where the data went, you can find it with something like var_dump($_SESSION['POST']);



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial